[FFmpeg-devel] Question about frame->pts, outlink->time_base, and outlink->frame_rate

Nicholas Robbins nickrobbins at yahoo.com
Wed Jan 29 01:09:15 CET 2014


> On Tuesday, January 28, 2014 6:09 PM, Andrey Utkin <andrey.krieger.utkin at gmail.com> wrote:

> > 2014-01-29 Nicholas Robbins <nickrobbins at yahoo.com>:
>>  Pardon me, but I don't know what that sentence means. If I wanted to 
> access it in, perhaps in my filter_init function, how would I set it? I 
> can't find any path there following pointers of the various structs I can 
> access from AVFilterContext.
> 
> Pardon me too, but i've re-read your initial posting three times and
> didn't get the point of your timestamp operations.
> Do you want frames to be played back 8 times slower? Or do you just
> slightly change timestamps to modify a bit a time interval between
> particular frames?

I slightly change the timestamps to remove judder. So if the frames were at 1,2,3,5,6,7,8,10,.... with a timebase of 1/100, I change them to something like 10, 20, 30, 40, 50, 60, 70, 80... with a timebase of 1/800. If is didn't change the timebase, I would have rounding error, and still small judder. It's actually probably fine, but I want to make sure I understand what is happening.

> If you are unsatisfied with 1/1000 time_base in output file, then
> which timebase is appropriate for you? 

If I could just multiply the time_base by 1/8 I would have no rounding in the filter.

> Which media container type do
> you use, and are you able to use another if it fits better?

I plan on using libx264 in matroska, but in terms of testing and understanding I could use something different.

I've written the patch already and its behavior is about 99% of what I want, so if getting that last 1% is not worth it, I'm fine with that, but I want to make sure what I think is happening is in fact happening.

Nicholas Robbins


More information about the ffmpeg-devel mailing list