How to remove an audio track from an avi file

If you want to remove an unwanted audio track from a dual audio avi movie file, you can use the following command with Mencoder:

mencoder original_dual_audio_file.avi -o target_file.avi -oac copy -ovc copy -aid 2

or with Ffmpeg:

ffmpeg -i original_dual_audio_file.avi -vcodec copy -map 0:0 -acodec copy -map 0:2 target_file.avi

These will create a file named target_file.avi retaining only the second audio track (aid 2).

Advertisements

FFprobe how to

This one line command will search for all avi video files in a volume (dvd) with find, analyzes the specs with ffprobe, and filters the output through grep

find /media/cdrom/ -name '*.avi' -exec ffprobe {} \; 2>&1 | grep -F -f patternfile

Notes:

2>&1 is necessary because the ffprobe output is in stderr, not stdout

patternfile contains all the patterns to be matched by grep, one in each line.