[FFmpeg-devel] Question about frame->pts, outlink->time_base, and outlink->frame_rate
Nicholas Robbins
nickrobbins at yahoo.com
Tue Jan 28 23:53:18 CET 2014
> On Tuesday, January 28, 2014 5:16 PM, Nicolas George <george at nsup.org> wrote:
> > Le nonidi 9 pluviôse, an CCXXII, Nicholas Robbins a écrit :
>> However, when the stream gets written to a file, it still has timebase
>> 1/1000 and PTS's with gaps of 33, 34, 66 or 67. They aren't quite
> the same
>> PTS's however. They vary by one or two sometimes.
>
> I suspect you are observing the treatments that ffmpeg performs on the
> frames after the filtering phase (and after encoding): adjusting the time
> base and possibly duplicating / dropping frames to account for the
> constraints of the output format.
So what format would have the least of these restrictions so I can test to make sure my filter is doing what I want?
>
>> So I tried changing some other things in config_out_props. I found that if
>> I set outlink->frame_rate = av_make_q(1,0) it would still forget the new
>> timebase, but it would use the new PTS's. Sort of. I found gaps of ~42
>> which is the new gaps divided by 8. Seems like it converted the new
> PTS's
>> from the new time_base to the old one and save them.
>
> AVFilterLink.frame_rate is used by ffmpeg to determine the output frame rate
> it will advertise in the file header and possibly enforce if the format does
> not support generic timestamps. For the filters, it is mostly informational.
> You should set it to a relevant value if possible.
>
> Regards,
>
> --
> Nicolas George
The output is variable frame rate.
More information about the ffmpeg-devel
mailing list