Log in

View Full Version : Demux all track in a MKV?


johnggg
15th October 2008, 22:10
Is there a way to demux all the tracks in a MKV (essentially just a dump of the contents of a MKV)? Preferabbly from the command line.

setarip_old
15th October 2008, 22:45
Hi!

Can't you use the same software you used to originally mux the tracks into an MKV container? - Or, better still, don't you already have the original tracks that you used to mux into an MKV container?

linyx
15th October 2008, 23:33
MKVExtract (http://coreforge.org/projects/mkvextractgui/) accepts commandline (http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvextract.html) input.

KoD
16th October 2008, 17:21
Just read the help file for mkvextract.

1. View Track IDs and Attachement IDs
mkvmerge -i "c:\my.mkv"

Will output something like:

File 'C:\my.mkv': container: Matroska
Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_VORBIS)
Track ID 3: subtitles (S_TEXT/ASS)
Attachment ID 2316365590: type 'application/x-truetype-font', size 34584 bytes, file name 'Arial.ttf'
Attachment ID 3118192100: type 'application/x-truetype-font', size 38700 bytes, file name 'Futura.otf'
Attachment ID 115212518: type 'application/x-truetype-font', size 127584 bytes, file name 'Georgia.ttf'

2. Extract tracks
mkvextract tracks "C:\my.mkv" 1:"C:\video.h264" 2:"C:\audio.ogg" 3:"C:\subtitle.ass"

3. Extract track timecodes
mkvextract timecodes_v2 "C:\my.mkv" 1:"C:\video.timecodes.txt" 2:"C:\audio.timecodes.txt" 3:"C:\subtitle.timecodes.txt"

4. Extract attachements (fonts in this case)
mkvextract attachments "C:\my.mkv" 2316365590:"C:\Arial.ttf" 3118192100:"C:\Futura.otf" 115212518:"C:\Georgia.ttf"

5. Extract chapters (the result will be an empty file if it has no chapters)
mkvextract chapters "C:\my.mkv" > "C:\chapters.xml"

johnggg
17th October 2008, 03:55
I'm very much aware of how mkvextract works. The problem is that you have to specify exactly which track you want to demux. I'm looking for a way to just demux everything (video, audio, subtitle, etc) when given a MKV.

Take eac3to for example. Feed it a VOB and demux (eac3to -demux) and it demuxes everything (video, audio, subtitle) without you having to go through the trouble of specifying which tracks you are interested in. It just "dumps" all of the contents of the VOB.

I was wondering if there was something similar for MKV.