MKVEXTRACT

NAME
SYNOPSIS
DESCRIPTION
NOTES
EXAMPLES
AUTHOR
SEE ALSO
WWW

NAME

mkvextract − extract tracks from Matroska files into other files

SYNOPSIS

mkvextract tracks <inname> [options] [TID1:out1 [TID2:out2 ...]]
mkvextract
tags <inname> [options]
mkvextract
attachments <inname> [options] [AID1:out1 [AID2:out2 ...]]
mkvextract
chapters <inname> [options]
mkvextract
<−h|−V>

DESCRIPTION

This program extracts specific parts from a Matroska file to other useful formats. The first argument tells mkvextract what to extract. Currently supported is the extraction of tracks, tags, attachments and chapters. The second argument is the name of the source file. It must be a Matroska file.

Command line syntax for the tracks extraction mode:

−c charset

Sets the charset to convert the next text subtitle track to. Only valid if the next track ID targets a text subtitle track.

TID:outname

Causes extraction of the track with the ID TID into the file outname if such a track exists in the source file. This option can be given multiple times. The track IDs are the same as the ones output by mkvmerge’s --identify option.

−v, −−verbose

Be verbose and show all the important Matroska elements as they’re read.

Command line syntax for the tags extraction mode:

−v, −−verbose

Be verbose and show all the important Matroska elements as they’re read.

Command line syntax for the attachments extraction mode:

AID:outname

Causes extraction of the attachment with the ID AID into the file outname if such an attachment exists in the source file. This option can be given multiple times. The attachment IDs are the same as the ones output by mkvmerge’s --identify option.

−v, −−verbose

Be verbose and show all the important Matroska elements as they’re read.

Command line syntax for the chapters extraction mode:

−v, −−verbose

Be verbose and show all the important Matroska elements as they’re read.

If one of the following options is used as the only command line argument additional information about mkvextract is output.

−h, −−help

Show usage information.

−V, −−version

Show version information.

NOTES

The decision about the output format is based on the track type, not on the extension used for the output file name. The following track types are supported at the moment:

V_MS/VFW/FOURCC

Fixed FPS video tracks with this CodecID are written to AVI files.

A_MPEG/L3, A_AC3

These will be extracted to raw MP3 and AC3 files.

A_PCM/INT/LIT

Raw PCM data will be written to a WAV file.

A_AAC/MPEG2/*

All MPEG2 AAC files will be written into an AAC file with ADTS headers before each packet.

A_AAC/MPEG4/*

All MPEG4 AAC files will be written into an AAC file with ADTS headers before each packet. The ADTS headers will not contain the deprecated emphasis field.

A_VORBIS

Vorbis audio will be written into an Ogg/Vorbis file.

S_TEXT/UTF8

Simple text subtitles will be written as SRT files.

S_TEXT/SSA, S_TEXT/ASS

SSA and ASS text subtitles will be written as SSA/ASS files respectively.

Tags are converted to a XML format. This format is the same that mkvmerge supports for reading tags.

Attachments are written to they output file as they are. No conversion whatsoever is done.

Chapters are converted to a XML format. This format is the same that mkvmerge supports for reading chapters. NOTE: At the moment mkvmerge does not yet support this format, but it will in the upcoming release which will be in mid August.

EXAMPLES

Let’s assume you’ve made a Matroska file with one video track, two audio tracks and two subtitle tracks, and you need the second audio track and the first subtitle track. So first fire up mkvmerge with the --identify option:

$ mkvmerge -i movie.mkv
File ’movie.mkv’: container: Matroska
Track ID 1: video (V_MS/VFW/FOURCC, DIV3)
Track ID 2: audio (A_MPEG/L3)
Track ID 3: audio (A_VORBIS)
Track ID 4: subtitles (S_TEXT/UTF8)
Track ID 5: subtitles (S_TEXT/UTF8)

Now you can call mkvmextract like this:

$ mkvextract tracks movie.mkv 3:audio.ogg 4:subtitles.srt

AUTHOR

mkvextract was written by Moritz Bunkus <moritz@bunkus.org>.

SEE ALSO

mkvmerge(1), mkvinfo(1)

WWW

The newest version can always be found at <http://www.bunkus.org/videotools/mkvtoolnix/>