[Ffmpeg-devel] Re: [PATCH] x264 avc encoding, movenc avcC, ctts

Stefan Gehrer stefan.gehrer
Mon Feb 20 12:53:41 CET 2006


Stefan Gehrer wrote:
> I might be mistaken here, but my impression was that in a mp4/mov file
> one would put what in the H.264 spec is called "RBSP (raw bytestream 
> packet)"
> syntax.
> If you put a start code (0x000001) and a byte containing
> forbidden_zero_bit, nal_ref_idc and nal_unit_type in front of the RBSP
> and escape all byte sequences 0x0000 as 0x000003, you get what is 
> called a
> NAL unit. This is what you need to create an ES and therefore you want
> this in MPEG1/2 systems (ISO 13818-1) stuff.
>
> However, I did not read this up but had that impression after looking at
> .mov files in a hexeditor and not finding any startcodes. ;)
>
> Regards
> Stefan Gehrer
After some quick reading I think I already have to correct myself. From
the H.264 spec, sub-clause 7.4.1, the note at the beginning:

"... The format of NAL units for both packet-oriented transport and byte
stream is identical except that each NAL unit can be preceded by a start
code prefix and extra padding bytes in the byte stream format."

So I guess RBSP is never used, always NAL units. In .mov/.mp4 it
is just without the start code prefix. Anyone has another interpretation?

Regards
Stefan Gehrer





More information about the ffmpeg-devel mailing list