ffmpeg skips first imput frame
I have a folder of 20 images (00000000.png to 00000019.png) and wanted to convert them into a DV video file. The problem here is that ffmpeg skips image 00000000.png. From the output below, I can see that ffmpeg recognizes the input to be 100s (00:01:40.00) in length but only encodes 95 seconds. [johann at johann committee]$ ffmpeg -f image2 -r 1:5 -i %08d.png -y -f dv -vcodec dvvideo -r 25 -s pal -aspect 4:3 -an test.dv FFmpeg version SVN-r20372, Copyright (c) 2000-2009 Fabrice Bellard, et al. built on Nov 7 2009 10:57:27 with gcc 4.4.2 20091027 (Red Hat 4.4.2-7) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --extra-version=rpmfusion --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect libavutil 50. 3. 0 / 50. 3. 0 libavcodec 52.37. 1 / 52.37. 1 libavformat 52.39. 2 / 52.39. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1. 4. 1 / 1. 4. 1 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 [image2 @ 0x13b45e0]max_analyze_duration reached [png @ 0x13b5c40]Found 1 unreleased buffers! Seems stream 0 codec frame rate differs from container frame rate: 0.20 (1/5) -> 1.00 (1/1) Input #0, image2, from '%08d.png': Duration: 00:01:40.00, start: 0.000000, bitrate: N/A Stream #0.0: Video: png, rgb24, 720x576, 1 tbr, 0.20 tbn, 0.20 tbc Output #0, dv, to 'test.dv': Stream #0.0: Video: dvvideo, yuv411p, 720x576 [PAR 16:15 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 25 tbc Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding frame= 2375 fps=145 q=0.0 Lsize= 333984kB time=95.00 bitrate=28800.0kbits/s video:333984kB audio:0kB global headers:0kB muxing overhead 0.000000% [png @ 0x13b5c40]Found 2 unreleased buffers! [johann at johann committee]$
Johann Amin wrote:
I have a folder of 20 images (00000000.png to 00000019.png) and wanted to convert them into a DV video file. The problem here is that ffmpeg skips image 00000000.png.
For some reason, the numbering starts at 1. If you rename them 00000001.png to 00000020.png it will be fine. -- Peter
On 04/08/2010 01:06 PM, Peter wrote:
Johann Amin wrote:
I have a folder of 20 images (00000000.png to 00000019.png) and wanted to convert them into a DV video file. The problem here is that ffmpeg skips image 00000000.png.
For some reason, the numbering starts at 1. If you rename them 00000001.png to 00000020.png it will be fine.
Doesn't seem to make a difference. I changed 00000000.png to 00000020.png but now it skips 00000001.png instead.
Johann Amin wrote:
On 04/08/2010 01:06 PM, Peter wrote:
Johann Amin wrote:
I have a folder of 20 images (00000000.png to 00000019.png) and wanted to convert them into a DV video file. The problem here is that ffmpeg skips image 00000000.png.
For some reason, the numbering starts at 1. If you rename them 00000001.png to 00000020.png it will be fine.
Doesn't seem to make a difference. I changed 00000000.png to 00000020.png but now it skips 00000001.png instead.
I was embarrassed to have given you a useless answer, so I did some investigation, and I see what the problem is, and I think it's a bug. If it's a feature, then it doesn't seem to be a very useful one. Your first image is indeed being included, but only for one frame, so you don't see it. Here's what's happening: Imagine you specify an input frame rate of 5 (-r 5) and an output frame rate of 25 (-r 25) then you would expect each input frame to appear five times in the output stream, but you only see it once. For example: Input stream: 012345 Desired output: 000001111122222333334444455555 Actual output: 01111122222333334444455555 I would like to ask everyone else if they think this is a bug, and also, offer a suggestion for a workaround - keep a png of black solid colour in your folder named 00000000.png, and name your images numbered from 00000001.png. The initial black screen for one frame should pass unnoticed. Strangely, I think the bug may be similar in nature to this error form: <http://www.digitalartform.com/motionBlur.htm> -- Peter
participants (2)
-
jaymin@gmx.net -
pscientist@inbox.com