Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question

migrated from stackoverflow.com Oct 13 '09 at 13:33

This question came from our site for professional and enthusiast programmers.

3 Answers 3

You can do this with ffmpeg quite easily:

ffmpeg -i input.mpeg -i input.mp3 -c copy output.mpeg
share|improve this 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
share|improve this answer

i wasnt able with mencoder either, but had good results with avidemux (linux) or virtualdub (windows)

if you need scripting then have a look at http://forum.doom9.org/showthread.php?t=124626 (scripting of avidemux)

share|improve this answer
    
It seems like this is going to be the way to go. Thanks for the advice! –  Riley Dutton Aug 25 '09 at 14:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.