2012-02-04 128 views
2

我正試圖從幾百個PNG圖像創建一個視頻。我的PNG圖像看起來很好,例如在MacOS X的預覽這裏有兩個:如何提高靜態PNG圖像的視頻質量?

two images

他們是約1200像素的正方形,16位RGB,沒有透明度。

但我試圖使這些幾百到視頻中遇到以下問題 - 幾乎每幀有這個黃色的腐敗(文物?)之類的塊狀flickery東西,你在質量差的視頻看到:

video still

我使用的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

嘗試的x264編碼解碼器 – 2012-02-04 20:43:00

+0

也可以考慮嘗試MJPEG編解碼器,爲我的作品好。 – 2012-02-04 20:51:21

+0

'ffmpeg -f image2 -i /tmp/image-%07d.png -vcodec mpeg4 -sameq -r 20 poincare.mov'工作嗎? – stewe 2012-02-04 21:06:56

回答

1

隨着mp4 FFmpeg的應該默認爲libx264

ffmpeg -f image2 -i /tmp/image-%07d.png poincare.mp4 
+0

好的,謝謝!請再試一次。 – cormullion 2012-04-09 19:23:44