[FFmpeg-user] ffprobe -show_frames and coded_picture_number

Robert Krüger krueger at lesspain.de
Sat Aug 10 09:58:06 CEST 2013

On Sat, Aug 10, 2013 at 5:43 AM, thljcl <jiachielee at live.com> wrote:
> What you are saying is that some sources do not have constant frame rate of
> 24000/1001 FPS despite having the “average frame rate” close to 24000/1001
> FPS, thus speeding up the audio would cause the video and audio to be out of
> sync.
> The truth is, to me, regardless of the original frame rate of the source, I
> do not need to speed up or slow down the audio in order to keep the audio
> and video in sync. I do understand that speeding up the audio is the
> standard practice being used by television stations in PAL regions to keep
> the audio and video in sync from the source of 24 FPS. Such practice makes
> sense before digital age; without re-encoding the video/audio, speeding up
> the audio would keep video and audio in sync. With ffmpeg, however, there is
> no need to change the playback speed to keep the audio and video in sync.
> Let me briefly explains how the video filter “fps” works.
> Basically, with -vf "fps=25" as an output option, you can change the frame
> rate to constant frame rate of 25 FPS; ffmpeg would duplicate frames if the
> source is of lower frame rate; ffmpeg would drop frames if the source is of
> higher frame rates. In fact, that’s how I create a slideshow which consists
> a lot of duplicated frames (slides) as I wrote at
> http://ffmpeg-users.933282.n4.nabble.com/Create-slideshow-with-ffmpeg-from-still-images-td4660277.html.
> You can read those posts as reference. By duplicating and dropping frames,
> there would be minimal change of playback speed, subject to the round-off
> error. In practice, there would be no need for the change of audio speed or
> to actually know how the frame rate of the source varies over time.

this is bad advice if your input has more or less constant frame rate
and you care about smooth motion as you will have visible degradation
of perceived quality when changing frame rates that way.

More information about the ffmpeg-user mailing list