Home » Questions » Computers [ Ask a new question ]

Remove Audio stream from XVID files

Remove Audio stream from XVID files

I have a bunch of Xvid files that each have an audio stream that I do not want. How can I strip the audio track I don't want using the Linux command line?

Asked by: Guest | Views: 58
Total answers/comments: 2
Guest [Entry]

"Frankly, I think you'll prefer using the ffmpeg solution. But I figured mencoder (mplayer's encoder) could do this too ... and it can, but only as a side-effect -- since it's built on top of a player, it can only process one audio stream at a time. If you were reversing the process (adding a second audio stream to a file that only had one), you'd need a different tool.

The -aid X option selects the audio stream (replace X with the stream's ID number). It looks like the mplayer output you've quoted shows the proper ID numbers already, so try with those. This keeps the first audio stream (use -aid 2 if you want the second):

$ mencoder orig.avi -o new.avi -oac copy -ovc copy -aid 1

Other commandline AVI tools that might help are:

avidemux (you can script with -nogui)
transcode"
Guest [Entry]

"If you have windows machine . Use virtualdubmod, then select streams->stream list and disable the audio stream and add your custom audio track, select video->direct stream copy and last file->save as avi. You can prepare your own an audio editor like Audacity.

For Linux :

ffmpeg ( this has command line option )

Avidemux

Cinelerra

dvd::rip"