[x264-devel] Re: Is the input size wrong with the vbv buffer?

Loren Merritt lorenm at u.washington.edu
Thu Mar 29 20:52:29 CEST 2007


On Thu, 29 Mar 2007, alexander tian wrote:
> On 2007/3/28, Loren Merritt wrote:
>
>> A NAL unit is just the type and contents, not including the "00 00 00 01".
>> Startcode could be considered "data associated with an access unit", but
>> it might not be present at all, depending on what container is used. And
>> libx264 can't possibly know what container you're putting the output
>> stream in.
>
> Yes, you are right. A NAL unit is only the type and contents. It doesn't
> include the "start_code_prefix".
>
> But I do not clearly know what you mean. Does the different container
> correspond to different way? What does the container mean here? Could you
> explain it in detail? Or give me some references please.

If H.264 is stored in H.264 elementary stream (what x264 produces with 
filename *.264), or in mpeg-ts or avi, then it will contain startcodes.
But if H.264 is stored in mp4 or matroska, there are no startcodes and 
it's up to the demuxer to know how big each NAL is through other means. 
Most containers have to store the frame sizes anyway, so startcodes 
provide no extra information, or (in the case of multiple NALs per 
frame) at least take more bytes than other methods of encoding the NAL 
breaks.

--Loren Merritt

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list