我正在尝试使用几百个PNG图像创建视频。 PNG图像看起来不错,例如这是MacOS X Preview中的两个:
它们大约有1200像素的正方形,16位RGB,没有透明度。
但是我尝试将几百个视频放入视频中会遇到以下问题 - 几乎每一帧都有这种黄色腐败(人工制品?),你在劣质视频中看到的那种块状闪烁的东西:
我正在使用的ffmpeg命令是这样的:
ffmpeg -f image2 -i /tmp/image-%07d.png -vcodec mpeg4 -vb 20M -r 20 poincare.mov
我尝试过更改一些参数,但我可能更改了错误的参数。知道我应该改变哪些参数,以及有什么价值?
控制台输出为:
ffmpeg -f image2 -i /tmp/image-%07d.png -vcodec mpeg4 -vb 30M -r 30 poincare.mov
FFmpeg version UNKNOWN, Copyright (c) 2000-2010 the FFmpeg developers
built on Nov 9 2010 12:20:29 with gcc 4.2.1 (Apple Inc. build 5664)
configuration: --prefix=/Users/worth/OtherApps/ffmpeg/ffmpeg/../local/x86_64 --enable-static --enable-shared --enable-gpl --enable-version3 --enable-libmp3lame --enable-pthreads --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-libvpx --enable-memalign-hack --disable-debug --disable-stripping --arch=x86_64
libavutil 50.33. 0 / 50.33. 0
libavcore 0.12. 0 / 0.12. 0
libavcodec 52.94. 3 / 52.94. 3
libavformat 52.84. 0 / 52.84. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.59. 0 / 1.59. 0
libswscale 0.12. 0 / 0.12. 0
Input #0, image2, from '/tmp/image-%07d.png':
Duration: 00:08:55.44, start: 0.000000, bitrate: N/A
Stream #0.0: Video: png, rgb48be, 1200x1198, 25 fps, 25 tbr, 25 tbn, 25 tbc
File 'poincare.mov' already exists. Overwrite ? [y/N] y
[buffer @ 0x101301ae0] w:1200 h:1198 pixfmt:rgb48be
[ffsink @ 0x101301d50] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x101302090] w:1200 h:1198 fmt:rgb48be -> w:1200 h:1198 fmt:yuv420p flags:0xa0000004
Output #0, mov, to 'poincare.mov':
Metadata:
encoder : Lavf52.84.0
Stream #0.0: Video: mpeg4, yuv420p, 1200x1198, q=2-31, 30000 kb/s, 30 tbn, 30 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=13386 fps= 27 q=2.0 Lsize= 536132kB time=535.43 bitrate=8202.7kbits/s
video:535981kB audio:0kB global headers:0kB muxing overhead 0.028261%
答案 0 :(得分:1)
使用mp4
FFmpeg应默认为libx264
ffmpeg -f image2 -i /tmp/image-%07d.png poincare.mp4