Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

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.

share|improve this question

migrated from sound.stackexchange.com Feb 21 at 10:20

This question came from our site for sound engineers, producers, editors, and enthusiasts.

1 Answer 1

up vote 1 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.