[x264-devel] Re: Problems with PTS and b frames

Bill May wmay at cisco.com
Wed Dec 14 19:25:29 CET 2005



Laurent Aimar wrote:
> On Tue, Dec 13, 2005, Bill May wrote:
>> ts    saved   i_pts   type
>> 0     (0 nals returned)
>> 33    (0 nals returned)
>> 66    (0 nals returned
>> 99     0       0    IDR
>> 122    33      66   P
>> 155    66      33   B
>> 188    99      122  P
>> 221    122     99   B
>  x264 returns reordered input pts. You need to add an offset
> to be able to use them. This offset is equal to
>  max_reorder_buffer_size * maximum_delay_between_frame.
> 
> In case you are not using pyramidal B frame :
>  max_reorder_buffer_size equals 1 (0 without B frames).
>  maximum_delay_between_frame has to be greater or equal to 1/min_frame_rate
> (becarefull, for example, with realtime PAL acquisition you may not always
> get exact 25fps, sometime a bit lower or higher)
> 
> In your case this gives 33ms and (0,66,33,..) + 33 gives what you want.

Laurent,

Thanks for a clear definition.

Is there a way to get max_reorder_buffer_size programmatically ?  It looks
like p_mp4->i_init_delay is what I want - is that correct ?  It uses
p_param->i_bframe ? (p_param->b_bframe_pyramid ? 2 : 1) : 0.

Thanks again.
Bill

-- 
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