[FFmpeg-trac] #1788(FFmpeg:open): setting the output frame rate of image outputs

FFmpeg trac at avcodec.org
Thu Oct 25 19:25:27 CEST 2012

#1788: setting the output frame rate of image outputs
             Reporter:  burek       |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  FFmpeg
              Version:  git-master  |               Resolution:
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  1           |
Changes (by Cigaes):

 * analyzed:  0 => 1
 * status:  new => open
 * version:  unspecified => git-master
 * component:  undetermined => FFmpeg
 * reproduced:  0 => 1


 This is related to the rounding heuristics for the video sync
 implementation in {{{ffmpeg.c}}}:
         // FIXME set to 0.5 after we fix some dts/pts bugs like in
         if (delta < -1.1)
             nb_frames = 0;

 In this code, {{{delta}}} is the difference between the current time on
 the stream and the time of the incoming frame. If no frame rate adjustment
 is necessary, it is always 1. Theoretically, the frame should be dropped
 as soon as it is less than 1, but as you can see, the current code gives
 it a little head start.

 Replacing -1.1 by 1 fixes your problem but breaks a lot of FATE tests. I
 do not know that part of the code enough to determine whether changing it
 would be correct.

 In the meantime, you can use the {{{fps}}} filter: {{{-vf fps=fps=1/5}}}
 (or possibly {{{-vf fps=fps=1/5:round=down}}} with a patch I just sent).

Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1788#comment:1>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list