PDA

View Full Version : Mux new audio into mpeg2 file


dahlany
28th December 2008, 08:13
I'm attempting to mux a new audio file into an exiting mpeg2 file
without any recoding. The original mpeg2 file contains its own audio which I want to replace with the new audio file.

This attempt only dumps the mpeg2.mpg file with the original audio.
mplayer -audiofile audio.wav mpeg2.mpg -dumpstream -dumpfile output.mpg

I found this on another thread, but not sure how to incorporate
a new audio file into this command or if it is proper for the need.
mencoder -ovc copy -oac copy -of mpeg -mpegopts format=dvd:tsaf -o output.mpeg

yonta
28th December 2008, 09:28
This command seems to work.

mencoder source.mpg -audiofile newaudio.wav -ovc copy -oac copy -of mpeg -mpegopts youroptions -o output.mpg