3

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 rate?

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.

Community
  • 1
  • 1
Adam
  • 3,014
  • 5
  • 33
  • 59

1 Answers1

3

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!

Nathan Whitehead
  • 1,942
  • 2
  • 16
  • 19