Remove and add an audio track with mencoder
May 05, 2009 04:05:08 Last update: January 15, 2010 02:50:49
Remove the sound track. The default output format is avi, even though the input file is mpeg.
Add a sound track:
Replace the sound track and encode to mpeg:
Looks like mencoder does not support multiple audio tracks. Check avimux from transcode project, or avidemux2.
mencoder -ovc copy -nosound PandaKing.mpg -o PK-nosound.avi
Add a sound track:
mencoder -ovc copy -audiofile PandaKing.ac3 -oac copy PK-nosound.avi -o KFP.avi
Replace the sound track and encode to mpeg:
mencoder -ovc copy -audiofile PandaKing.zh.ac3 -oac copy KFP.avi -of mpeg -mpegopts \ format=mpeg2:vaspect=16/9 -o KFP.mpg
Looks like mencoder does not support multiple audio tracks. Check avimux from transcode project, or avidemux2.