Dropping Tracks

MKVs

The best way to do this with with mkvmerge

# Observe the tracks you're interested in 
mkvinfo input.mkv

# Write a new file
mkvmerge -o output.mkv --audio-tracks 0 --subtitle-tracks 15 input.mkv

# Remove the all subtitle tracks because you don't like VobSub
mkvmerge -o output.mkv --audio-tracks 0 --no-subtitles input.mkv

To script it:

IFS=$(echo -en "\n\b")
for X in `ls *.mkv`; do Y=`echo $X|sed 's/\.mkv/.new.mkv/'`;mkvmerge -o "$Y" --audio-tracks 0 --subtitle-tracks 15 "$X" ;done
for X in `ls *.new.mkv`; do Y=`echo $X|sed 's/\.new.mkv/.mkv/'`;mv "$X" "$Y";done

When there are lots of tracks, it can be hard to find the right ones. You can sometimes grab just the language tracks you're interested in

for X in `ls *.mkv`; do Y=`echo $X|sed 's/\.mkv/.new.mkv/'`;mkvmerge -o "$Y"  --audio-tracks eng --subtitle-tracks eng "$X" ;done

But if there are commentaries, you'll have to hunting. A look at the default tracks can help

for X in `ls *.mkv`; do echo "-----------";echo $X;mkvmerge --identify --identification-format verbose-text $X | grep default_track:1 | grep -v video;done



https://mkvtoolnix.download/doc/mkvmerge.html

Note: Don't bother trying to specify the language track if it's english, as it will not be labeled explicitly as that is how the default is handled. In fact, to find the english tracks look for the tracks with no languange

Comments