我的Delphi應用程序已經創建了一個名爲frame_001.png的幀序列給frame_100.png。使用Delphi或FFMpeg從圖像序列創建電影
我需要編譯成一個影片剪輯。我想,也許最簡單的就是在命令行中調用的ffmpeg,根據自己的文檔:
For creating a video from many images:
ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi
The syntax foo-%03d.jpeg specifies to use a decimal number composed of three digits padded with zeroes to express the sequence number. It is the same syntax supported by the C printf function, but only formats accepting a normal integer are suitable.
來源:http://ffmpeg.org/ffmpeg-doc.html#SEC5
但是我的文件(無損)png格式,所以我必須使用ImageMagick轉換第一。現在
我的命令行是:
ffmpeg.exe -f image2 -i c:\temp\wentelreader\frame_%05d.jpg -r 12 foo.avi
但後來我得到的錯誤:
[image2 @ 0x133a7d0]Could not find codec parameters (Video: mjpeg) c:\temp\wentelreader\Frame_C:\VID2EVA\Tools\Mencoder\wentel.bat5d.jpg: could not find codec parameters
我在做什麼錯?
或者,這可以很容易地與德爾福完成?
謝謝Rob!現在回想起來很明顯... 我現在得到以下錯誤,嘗試出批處理文件: c:\ temp \ wentelreader \ Frame_%05d.jpg:發生I/O錯誤 通常意思是該輸入文件被截斷和/或損壞。 frame_001。png只是一個例子,我決定稍後引用我的代碼。真正的文件名是Frame_00000.jpg - Frame_03961.jpg。 –
確定更新 - 使用原始PNG,它現在似乎工作。我想我的jpegs路徑不對。 再次感謝! –