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

Nicolas George george at nsup.org
Wed Jan 29 13:06:36 CET 2014

Le nonidi 9 pluviôse, an CCXXII, Nicholas Robbins a écrit :
> So what format would have the least of these restrictions so I can test to
> make sure my filter is doing what I want?

NUT is probably the format with the less restrictions for this kind of
issue, but you will probably want your filter to work correctly with
Matroska and similar modern and widely formats anyway; Matroska more or less
enforces a 1/1000 time base. Just use the showinfo filter to dump the
timestamps after the filter.

> The output is variable frame rate.

In that case, you need to figure out something that makes sense: maybe the
expected average frame rate, or the inverse of the GCD of the intervals
between the frames. At worst, set it to the same value as the inverse of the
time base. If you do not set it, the library will set it to the same as the

The rule of thumb is: if the output of your filter needs to be muxed in
constant frame rate, what would it need to be?


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140129/6d9aab54/attachment.asc>

More information about the ffmpeg-devel mailing list