我有一系列 PNG 图像,分别称为 Temp01.png、Temp02.png、...、Temp99.png,我正尝试使用 ffmpeg 将它们转换为电影。我使用的命令如下:
ffmpeg -i Temp%02d.png -f avi -vcodec huffyuv output.avi
...但无济于事。该命令在 Mac OS X 10.5 和 Ubuntu 12.10 上完美运行,但在 Fedora 187 上却不行。
在 Fedora 上运行时,ffmpeg 会生成一个大小大致正确的电影文件,但只显示整部电影的第一帧,即在整个电影长度中都显示图像 Temp01.png。使用控制输入和/或输出帧速率-r
似乎除了修改电影长度外什么也不做。没有生成任何错误消息。
我已经从存储库重新安装了 ffmpeg 和所有相关的 gstreamer 包。如果有人能帮助我诊断问题或为我指明正确的方向,我将不胜感激。
FFmpeg 的输出如下:
ffmpeg version 1.0.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 4 2012 08:14:17 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, image2, from 'Temp%02d.png':
Duration: 00:00:03.64, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgb24, 947x946, 25 fps, 25 tbr, 25 tbn, 25 tbc
[huffyuv @ 0xfa6f20] using huffyuv 2.2.0 or newer interlacing flag
Output #0, avi, to 'output.avi':
Metadata:
ISFT : Lavf54.29.104
Stream #0:0: Video: huffyuv (HFYU / 0x55594648), rgb24, 947x946, q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png -> huffyuv)
Press [q] to stop, [?] for help
frame= 17 fps=0.0 q=0.0 size= 28257kB time=00:00:00.68 bitrate=340418.8kbitsframe= 30 fps= 28 q=0.0 size= 49862kB time=00:00:01.20 bitrate=340389.5kbitsframe= 41 fps= 26 q=0.0 size= 68142kB time=00:00:01.64 bitrate=340379.2kbitsframe= 54 fps= 26 q=0.0 size= 89747kB time=00:00:02.16 bitrate=340372.5kbitsframe= 67 fps= 26 q=0.0 size= 111351kB time=00:00:02.68 bitrate=340368.4kbitsframe= 78 fps= 25 q=0.0 size= 129632kB time=00:00:03.12 bitrate=340365.9kbitsframe= 87 fps= 24 q=0.0 size= 144588kB time=00:00:03.48 bitrate=340364.4kbitsframe= 91 fps= 24 q=0.0 Lsize= 151237kB time=00:00:03.64 bitrate=340367.1kbits/s
video:151230kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.005079%
以下是在 Mac OS X 10.5 上运行的 ffmpeg 静态构建的输出。在这种情况下,影片按预期生成。
ffmpeg version 1.1.2 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 7 2013 11:12:33 with gcc 4.0.1 (GCC) (Apple Inc. build 5493)
configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --arch=x86 --enable-runtime-cpudetect
libavutil 52. 13.100 / 52. 13.100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.106 / 54. 59.106
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, image2, from 'Temp%02d.png':
Duration: 00:00:03.64, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgb24, 1440x1080, 25 fps, 25 tbr, 25 tbn, 25 tbc
[huffyuv @ 0x1809e20] using huffyuv 2.2.0 or newer interlacing flag
Output #0, avi, to 'output.avi':
Metadata:
ISFT : Lavf54.59.106
Stream #0:0: Video: huffyuv (HFYU / 0x55594648), rgb24, 1440x1080, q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png -> huffyuv)
Press [q] to stop, [?] for help
frame= 91 fps= 15 q=0.0 Lsize= 216506kB time=00:00:03.64 bitrate=487257.2kbits/s
video:216498kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.003548%