Monday, June 21, 2010

Add separate audio to a video file using FFMPEG

There was a need to put the "Wavin Flag" song with a video of football tricks and stuff. So i turned to FFMPEG. After tinkering with the command line parameters as much as i could do, I found the easy way is to specify the audio file and the video file as inputs and FFMPEG gave me a single video file with the desired result.

The syntax woule be

ffmpeg -i input_audio.mp3 -i input_video combined_video

Take a look at the example command.

ffmpeg.exe -i audiofile.mp3 -i source_video.mpg -b 800k output.mpg

I used -b 800k, to make sure that the output video would be with 800kbps bit rate.

No comments: