Skip to Content

Delete audio track from mkv file

Lately I tried to remove some streams from MKV file - I wanted: video, audio in my language and no subtitles. I achieved it with mkvtoolnix utils.

Firstly I have to identify streams in file:

$ mkvmerge -i input_file.mkv
File 'test.mkv': container: Matroska
Track ID 0: video (V_MPEG4/ISO/AVC)
Track ID 1: audio (A_DTS)
Track ID 2: audio (A_AC3)
Track ID 3: audio (A_DTS)
Track ID 4: audio (A_AC3)
Track ID 5: subtitles (S_TEXT/UTF8)
Track ID 6: subtitles (S_TEXT/UTF8)
Chapters: 16 entries

You could use more verbose tool mkvinfo for that purpose too.

Now we know what to do next:

$ mkvmerge -o out.mkv -d 0 --audio-tracks 2 --no-subtitles input_file.mkv
mkvmerge v6.3.0 ('You can't stop me!') built on Jun 29 2013 11:48:33
'test.mkv': Using the demultiplexer for the format 'Matroska'.
'test.mkv' track 0: Using the output module for the format 'AVC/h.264'.
'test.mkv' track 2: Using the output module for the format 'AC3'.
The file 'out.mkv' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Muxing took 3 minutes 10 seconds.

This is the fastest way - no need for conversion of any stream.

Source: http://bunin.livejournal.com/357913.html