3

I've got a multitude of MKV files each containing two audio tracks that correspond to two languages. In each of the files, the English language is the second track and it's the only track I need for these MKV files. So how do I easily discard the first audio track in each of the MKV files.

N.B. My primary OS is Windows but if there really is no easy way to have it done on Windows, I could be interested in a Linux answer too.

1 Answer 1

1

I don't know Windows, but I have just gone through this in Mac OS X (Linux Applicable).

mkvtoolnix is your friend here, and is available for Windows.

I used the GUI to check (a sample of) my files to make sure the audio tracks that I wanted to keep and delete were in the same order in the files. Then I manipulated the options in the GUI to match what I wanted.

Finally, I used the "copy to clipboard" button to copy the command line output to the clipboard and massaged it into a bash script to run on a directory of the files I wanted strip the audio from.

I know it's quick and dirty (and maybe not to your liking), but you can probably use it as a starting point to massage into what you really want to do.

#!/bin/bash

for file in *.mkv; do mkvmerge -o "$file-noeng.mkv"  --language "1:jpn" --track-name "1:AVC-HD" --default-track "1:yes" --forced-track "1:no" --display-dimensions "1:1920x1080" --language "3:jpn" --track-name "3:AAC" --default-track "3:no" --forced-track "3:no" --language "4:eng" --track-name "4:ASS" --default-track "4:no" --forced-track "4:no" -a "3" -d "1" -s "4" --attachments "1" -T "--no-global-tags" "$file" --track-order "0:1,0:3,0:4";

done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.