[FFmpeg-user] video plays the same frame after 2 seconds

Lou lou at lrcd.com
Wed May 30 21:14:35 CEST 2012


On Wed, 30 May 2012 21:53:59 +0300
Thomas Evangelidis <tevang3 at gmail.com> wrote:

> Dear all,
> 
> I am using the following command line to create a good quality video from
> 500 image files:
> 
> $ ffmpeg -an -i WT_Hbonds.%05d.ppm -sameq -r 10 -vframes 500 test.mp4

The "-sameq" option is not recommended in this case. It does not mean
"same quality" as the documentation used to imply. It's a complicated
option and 99% of the time the best use of it is to not use it at all.
When using the mpeg4 encoder, as you are, use "-qscale" instead with a
value between 2 and 5. A lower value is higher quality.

> The output is as follows:
> 
> FFmpeg version 0.6.4-4:0.6.4-0ubuntu0.11.04.1, Copyright (c) 2000-2010 the
> Libav developers

This is not from FFmpeg. We recommend that you use ffmpeg from FFmpeg
which can be acquired from Jon Severinsson's FFmpeg PPA at:

https://launchpad.net/~jon-severinsson/+archive/ffmpeg

...or easily compiled by following the instructions at:

https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide

>     Stream #0.0: Video: ppm, rgb24, 1280x745, 25 tbr, 25 tbn, 25 tbc

^ Input images are set at 25 frames per second.

> frame=  201 fps=  4 q=0.0 Lsize=   12340kB time=20.10 bitrate=5029.1kbits/s
> dup=0 drop=299

^ 299 frames have been dropped.

> Notice the pre-last line which indicated that only 201/500 frames were
> written. The video resolution is good but the animation hangs after 2
> seconds, namely the video keeps playing the same frame till the end. I
> tried to reduce the image resolution from 1280x745 to 889x517 but the same
> thing happens. Does anyone know what may be wrong?

Your input ppm files are being read at "-r 25". This is the default
unless you declare your own -r as an input option (before -i). Try
moving "-r 10" as an input option (the output will inherit this rate).
Otherwise ffmpeg will drop, as in your case, or duplicate frames if
there is a difference between the input and output -r.


More information about the ffmpeg-user mailing list