[x264-devel] Start codes and Annex B

Tim Pitman tapitman11 at gmail.com
Thu Aug 9 19:14:57 CEST 2012


I'm trying to understand H.264 start codes and the way x264 implements
them. When looking at a raw encoded stream in a hex editor, most of my
NALUs start with the 24 bit 0x000001 code, but some of them start with
the full 32 bit 0x00000001. My understanding of the spec is that
either start code is valid. x264.h, concerning b_annexb, states:

"if set, place start codes (4 bytes) before NAL units, otherwise place
size (4 bytes) before NAL units."

So I would expect to always see the 32 bit codes or sizes. Does
x264cli always use 3 byte start codes instead of size? Why not 4
bytes? Is there any way to control b_annexb from the command line?

Thanks,
Tim


More information about the x264-devel mailing list