Add an audio track to an existing MPEG movie (using MEncoder?)

audiomencodervideo

I have an existing MPG (MPEG-1) video file. The video has no sound. I have an audio track (currently in MP3 format, but I could record it in AC3 or some other required format if that's what it will take for it to work). The two files are the same "length" (meaning that when played, both are 5 seconds long, for example).

I just want to add the audio track on to the video track, using mencoder. The resulting video file can be another MPEG file, or it can be an AVI file (any format playable by a standard Windows Vista computer, at any rate).

I have tried using MEncoder to do the trick, but every time the resulting video file seems very corrupted. Here's the command I'm currently using:

.\mplayer\mencoder.exe -ovc copy -audiofile temp.mp3 -oac copy temp.mpg -of mpeg -o output.mpg

I have also tried:

.\mplayer\mencoder.exe -ovc copy -audiofile temp.ac3 -oac copy temp.mpg -o output.avi

Best Answer

a little old but the way to do this would be

mencoder -ovc copy -audiofile silent.mp3 -oac copy input.avi -o output.avi
Related Question