开发者

FFMPEG - Stream series of images into MP4 with sound synchronization at specified frame rate

I was reading this question's ( Create a Video Stream (AVI) from a Series of Images ) answer, which sounds pretty much like what I am looking for. The only question I have is if I have a .wav audio file I wish to use, can FFMPEG synchronize the sound with the images at a specific frame rat开发者_C百科e?

For example, I have 3000 images and I want them to play at 30 frames per second with some sound that is 100 seconds long. Can FFMPEG generate, from the 3000 images and 100 second long .wav file, into an MP4 that is 100 seconds long?

My app is in .NET, so using an FFMPEG .NET wrapper of some kind is acceptable IF it is Mono friendly.


Here is an example invocation of ffmpeg that takes frames named sphere00.png through sphere29.png together with one second audio track audio.wav and creates an out.mp4 file that shows the frames at 30 fps together with the sound.

ffmpeg -r 30 -f image2 -i "sphere%02d.png" -i audio.wav out.mp4

Couldn't be easier!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜