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

Thomas Evangelidis tevang3 at gmail.com
Thu May 31 00:21:27 CEST 2012


Hi Lou,

Many thanks for your elaborate comments! I removed the ffmpeg version I
installed from the Ubuntu repositories along with the linked libraries and
reinstalled the version you recommended. However I get a different type of
error this time:

$ ffmpeg -r 50 -qscale 5 -i WT_Hbonds.%05d.ppm
test.mp4
ffmpeg version git-2012-05-30-a1fc1d2 Copyright (c) 2000-2012 the FFmpeg
developers
  built on May 30 2012 23:57:41 with gcc 4.5.2
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
--enable-version3 --enable-x11grab
  libavutil      51. 55.100 / 51. 55.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.101 / 54.  6.101
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Please use -q:a or -q:v, -qscale is ambiguous
[image2 @ 0x20e9280] Stream #0: not enough frames to estimate rate;
consider increasing
probesize

Input #0, image2, from
'WT_Hbonds.%05d.ppm':

  Duration: 00:00:20.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: ppm, rgb24, 1280x745, 25 tbr, 25 tbn, 25 tbc
File 'test.mp4' already exists. Overwrite ? [y/N] y
w:1280 h:745 pixfmt:rgb24 tb:1/50 sar:0/1 sws_param:flags=2
[buffersink @ 0x20ea4a0] No opaque field provided
[format @ 0x20ea5c0] auto-inserting filter 'auto-inserted scaler 0' between
the filter 'Parsed_null_0' and the filter
'format'
[buffer @ 0x20eb220] TB:0.020000
[scale @ 0x20ead80] w:1280 h:745 fmt:rgb24 sar:0/1 -> w:1280 h:745
fmt:yuv420p sar:0/1 flags:0x4
[libx264 @ 0x20f05e0] height not divisible by 2 (1280x745)
Output #0, mp4, to
'test.mp4':

    Stream #0:0: Video: h264, yuv420p, 1280x745, q=-1--1, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (ppm -> libx264)
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height


I keep getting this error message for every combination of options I use. I
also checked in the list that the solution of " #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height" is to remove all x264
binaries, redownload the latest x264 and recompile ffmpeg. Yet those
version of x264 and ffmpeg I installed are the latest. The only thing I 've
changed in the recommended installation procedure is that instead of saving
and installing the programs/libraries in my home directory, I installed
them in ~/Programs subdirectory. I don't know if this really matters. Do
you have any other idea what may be wrong???

Thanks in advance.
Thomas


On 30 May 2012 22:14, Lou <lou at lrcd.com> wrote:

> 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<https://launchpad.net/%7Ejon-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.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 

======================================================================

Thomas Evangelidis

PhD student

Biomedical Research Foundation, Academy of Athens

4 Soranou Ephessiou , 115 27 Athens, Greece

email: tevang at bioacademy.gr

          tevang3 at gmail.com


website: https://sites.google.com/site/thomasevangelidishomepage/


More information about the ffmpeg-user mailing list