2004-08-21 15:50:22 +00:00
|
|
|
.TH MKVEXTRACT "1" "August 2004" "mkvextract v1.2.0" "User Commands"
|
2003-07-26 08:57:31 +00:00
|
|
|
|
|
|
|
|
2003-06-22 10:04:16 +00:00
|
|
|
.SH NAME
|
|
|
|
mkvextract \- extract tracks from Matroska files into other files
|
2003-07-26 08:57:31 +00:00
|
|
|
|
|
|
|
|
2003-06-22 10:04:16 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B mkvextract
|
2003-07-26 08:57:31 +00:00
|
|
|
tracks <\fIinname\fR> [\fIoptions\fR] [\fITID1\fR:\fIout1\fR [\fITID2\fR:\fIout2\fR ...]]
|
|
|
|
.br
|
|
|
|
.B mkvextract
|
|
|
|
tags <\fIinname\fR> [\fIoptions\fR]
|
|
|
|
.br
|
|
|
|
.B mkvextract
|
|
|
|
attachments <\fIinname\fR> [\fIoptions\fR] [\fIAID1\fR:\fIout1\fR [\fIAID2\fR:\fIout2\fR ...]]
|
|
|
|
.br
|
|
|
|
.B mkvextract
|
2003-07-29 18:59:48 +00:00
|
|
|
chapters <\fIinname\fR> [\fIoptions\fR]
|
|
|
|
.br
|
|
|
|
.B mkvextract
|
2004-07-24 17:06:46 +00:00
|
|
|
cuesheet <\fIinname\fR> [\fIoptions\fR]
|
2004-07-21 19:31:40 +00:00
|
|
|
.br
|
|
|
|
.B mkvextract
|
2003-07-26 08:57:31 +00:00
|
|
|
<\-h|\-V>
|
|
|
|
|
|
|
|
|
2003-06-22 10:04:16 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.LP
|
2003-07-26 08:57:31 +00:00
|
|
|
This program extracts specific parts from a Matroska file to other useful
|
|
|
|
formats. The first argument tells \fBmkvextract\fR what to extract. Currently
|
2004-07-21 19:31:40 +00:00
|
|
|
supported is the extraction of \fBtracks\fR, \fBtags\fR, \fBattachments\fR,
|
|
|
|
\fBchapters\fR and \fBCUE sheets\fR.
|
2003-07-26 08:57:31 +00:00
|
|
|
The second argument is the name of the source file. It must be a Matroska file.
|
|
|
|
|
|
|
|
.LP
|
|
|
|
Command line syntax for the \fBtracks\fR extraction mode:
|
2003-06-22 10:04:16 +00:00
|
|
|
.TP
|
|
|
|
\fB\-c\fR \fIcharset\fR
|
|
|
|
Sets the charset to convert the next text subtitle track to. Only valid if the
|
2003-11-05 18:19:10 +00:00
|
|
|
next track ID targets a text subtitle track. It defaults to UTF-8.
|
2003-06-22 10:04:16 +00:00
|
|
|
.TP
|
2003-11-16 20:06:40 +00:00
|
|
|
\fB\-\-no\-ogg\fR
|
|
|
|
Only valid for FLAC tracks. Normally FLAC tracks are embedded in an Ogg
|
|
|
|
transport stream. With this switch they are extracted to raw FLAC files
|
|
|
|
instead.
|
2003-11-16 18:54:57 +00:00
|
|
|
.TP
|
2004-07-21 22:27:07 +00:00
|
|
|
\fB\-\-cuesheet\fR
|
|
|
|
Causes \fBmkvextract\fR to extract a CUE sheet from the chapter information
|
|
|
|
and tag data for the following track into a file whose name is the track's
|
|
|
|
output name with ".cue" appended to it.
|
|
|
|
.TP
|
2003-06-22 10:04:16 +00:00
|
|
|
\fITID\fR:\fIoutname\fR
|
|
|
|
Causes extraction of the track with the ID \fITID\fR into the file
|
|
|
|
\fIoutname\fR if such a track exists in the source file. This option can be
|
2003-07-31 12:17:10 +00:00
|
|
|
given multiple times. The track IDs are the same as the ones output by
|
2003-06-22 10:04:16 +00:00
|
|
|
\fBmkvmerge\fR's \fB--identify\fR option.
|
2004-03-21 16:25:41 +00:00
|
|
|
.br
|
|
|
|
Each output name should be used only once. The exception are RealAudio and
|
|
|
|
RealVideo tracks. If you use the same name for different tracks then those
|
|
|
|
tracks will be saved in the same file. Example:
|
|
|
|
.br
|
|
|
|
\fBmkvextract tracks input.mkv 1:output-two-tracks.rm 2:output-two-tracks.rm\fR
|
2003-06-22 10:04:16 +00:00
|
|
|
.TP
|
|
|
|
\fB\-v\fR, \fB\-\-verbose\fR
|
|
|
|
Be verbose and show all the important Matroska elements as they're read.
|
2003-07-26 08:57:31 +00:00
|
|
|
|
|
|
|
.LP
|
|
|
|
Command line syntax for the \fBtags\fR extraction mode:
|
|
|
|
.TP
|
|
|
|
\fB\-v\fR, \fB\-\-verbose\fR
|
|
|
|
Be verbose and show all the important Matroska elements as they're read.
|
|
|
|
|
|
|
|
.LP
|
|
|
|
Command line syntax for the \fBattachments\fR extraction mode:
|
|
|
|
.TP
|
|
|
|
\fIAID\fR:\fIoutname\fR
|
|
|
|
Causes extraction of the attachment with the ID \fIAID\fR into the file
|
|
|
|
\fIoutname\fR if such an attachment exists in the source file. This option can
|
2003-07-31 12:17:10 +00:00
|
|
|
be given multiple times. The attachment IDs are the same as the ones output by
|
2003-07-26 08:57:31 +00:00
|
|
|
\fBmkvmerge\fR's \fB--identify\fR option.
|
|
|
|
.TP
|
|
|
|
\fB\-v\fR, \fB\-\-verbose\fR
|
|
|
|
Be verbose and show all the important Matroska elements as they're read.
|
|
|
|
|
2003-07-29 18:59:48 +00:00
|
|
|
.LP
|
|
|
|
Command line syntax for the \fBchapters\fR extraction mode:
|
|
|
|
.TP
|
2003-08-30 14:25:12 +00:00
|
|
|
\fB\-s\fR, \fB\-\-simple\fR
|
2004-04-13 13:44:27 +00:00
|
|
|
Exports the chapter information in the simple format used in the OGM tools
|
2003-08-30 14:25:12 +00:00
|
|
|
(CHAPTER01=..., CHAPTER01NAME=...). In this mode some information has to be
|
|
|
|
discarded. Default is to output the chapters in XML format.
|
|
|
|
.TP
|
2003-07-29 18:59:48 +00:00
|
|
|
\fB\-v\fR, \fB\-\-verbose\fR
|
|
|
|
Be verbose and show all the important Matroska elements as they're read.
|
|
|
|
|
2004-07-21 19:31:40 +00:00
|
|
|
.LP
|
2004-07-24 17:06:46 +00:00
|
|
|
Command line syntax for the \fBcuesheet\fR extraction mode:
|
2004-07-21 19:31:40 +00:00
|
|
|
.TP
|
|
|
|
\fB\-v\fR, \fB\-\-verbose\fR
|
|
|
|
Be verbose and show all the important Matroska elements as they're read.
|
|
|
|
|
2003-07-26 08:57:31 +00:00
|
|
|
.LP
|
|
|
|
If one of the following options is used as the only command line argument
|
|
|
|
additional information about \fBmkvextract\fR is output.
|
2003-06-22 10:04:16 +00:00
|
|
|
.TP
|
|
|
|
\fB\-h\fR, \fB\-\-help\fR
|
|
|
|
Show usage information.
|
|
|
|
.TP
|
|
|
|
\fB\-V\fR, \fB\-\-version\fR
|
|
|
|
Show version information.
|
|
|
|
|
2003-07-26 08:57:31 +00:00
|
|
|
|
2003-06-22 10:04:16 +00:00
|
|
|
.SH 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:
|
|
|
|
.TP
|
|
|
|
V_MS/VFW/FOURCC
|
|
|
|
Fixed FPS video tracks with this CodecID are written to AVI files.
|
|
|
|
.TP
|
2004-03-21 16:25:41 +00:00
|
|
|
V_REAL/*
|
|
|
|
RealVideo tracks are written to RealMedia files.
|
|
|
|
.TP
|
2003-06-22 10:04:16 +00:00
|
|
|
A_MPEG/L3, A_AC3
|
|
|
|
These will be extracted to raw MP3 and AC3 files.
|
|
|
|
.TP
|
|
|
|
A_PCM/INT/LIT
|
|
|
|
Raw PCM data will be written to a WAV file.
|
|
|
|
.TP
|
|
|
|
A_AAC/MPEG2/*
|
|
|
|
All MPEG2 AAC files will be written into an AAC file with ADTS headers before
|
|
|
|
each packet.
|
|
|
|
.TP
|
|
|
|
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.
|
|
|
|
.TP
|
|
|
|
A_VORBIS
|
|
|
|
Vorbis audio will be written into an Ogg/Vorbis file.
|
|
|
|
.TP
|
2004-03-21 16:25:41 +00:00
|
|
|
A_REAL/*
|
|
|
|
RealAudio tracks are written to RealMedia files.
|
|
|
|
.TP
|
2004-07-23 22:59:28 +00:00
|
|
|
A_TTA1
|
|
|
|
TrueAudio tracks are written to TTA files. Please note that due to Matroska's
|
|
|
|
limited timecode precision the extracted file's header will be different
|
|
|
|
regarding two fields: data_length (the total number of samples in the file)
|
|
|
|
and the CRC.
|
|
|
|
.TP
|
2003-06-22 10:04:16 +00:00
|
|
|
S_TEXT/UTF8
|
|
|
|
Simple text subtitles will be written as SRT files.
|
|
|
|
.TP
|
|
|
|
S_TEXT/SSA, S_TEXT/ASS
|
|
|
|
SSA and ASS text subtitles will be written as SSA/ASS files respectively.
|
2003-07-26 08:57:31 +00:00
|
|
|
.LP
|
|
|
|
\fBTags\fR are converted to a XML format. This format is the same that
|
|
|
|
\fBmkvmerge\fR supports for reading tags.
|
|
|
|
.LP
|
|
|
|
\fBAttachments\fR are written to they output file as they are. No conversion
|
|
|
|
whatsoever is done.
|
2003-07-29 18:59:48 +00:00
|
|
|
.LP
|
|
|
|
\fBChapters\fR are converted to a XML format. This format is the same that
|
2004-04-10 09:34:09 +00:00
|
|
|
\fBmkvmerge\fR supports for reading chapters. Alternatively a stripped-down
|
|
|
|
version can be output in the simple OGM style format.
|
2003-07-26 08:57:31 +00:00
|
|
|
|
2003-06-22 10:04:16 +00:00
|
|
|
|
2003-06-22 12:27:46 +00:00
|
|
|
.SH 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 \fBmkvmerge\fR with the \fB--identify\fR
|
|
|
|
option:
|
|
|
|
.LP
|
|
|
|
$ \fBmkvmerge -i movie.mkv\fR
|
|
|
|
.br
|
|
|
|
File 'movie.mkv': container: Matroska
|
|
|
|
.br
|
|
|
|
Track ID 1: video (V_MS/VFW/FOURCC, DIV3)
|
|
|
|
.br
|
|
|
|
Track ID 2: audio (A_MPEG/L3)
|
|
|
|
.br
|
|
|
|
Track ID 3: audio (A_VORBIS)
|
|
|
|
.br
|
|
|
|
Track ID 4: subtitles (S_TEXT/UTF8)
|
|
|
|
.br
|
|
|
|
Track ID 5: subtitles (S_TEXT/UTF8)
|
|
|
|
.LP
|
2004-04-13 13:44:27 +00:00
|
|
|
Now you can call \fBmkvextract\fR like this:
|
2003-06-22 12:27:46 +00:00
|
|
|
.LP
|
2003-07-26 08:57:31 +00:00
|
|
|
$ \fBmkvextract tracks movie.mkv 3:audio.ogg 4:subtitles.srt\fR
|
2004-03-21 16:25:41 +00:00
|
|
|
.LP
|
|
|
|
Another example. Let's assume you have a Matroska file with one RealVideo v10
|
|
|
|
track, one Vorbis audio track and one RealAudio (COOK) track. The
|
|
|
|
identification output might look like this:
|
|
|
|
.LP
|
|
|
|
$ \fB mkvmerge -i movie2.mkv\fR
|
|
|
|
.br
|
|
|
|
File 'movie2.mkv': container: Matroska
|
|
|
|
.br
|
|
|
|
Track ID 1: video (V_REAL/RV40)
|
|
|
|
.br
|
|
|
|
Track ID 2: audio (A_VORBIS)
|
|
|
|
.br
|
|
|
|
Track ID 3: audio (A_REAL/COOK)
|
|
|
|
.LP
|
|
|
|
Let's further assume you want only need the video and the RealAudio track but
|
|
|
|
both in the same output file. This is possible for RealMedia files by using
|
|
|
|
the same output name for those tracks that you want to end up in the same
|
|
|
|
file:
|
|
|
|
.LP
|
|
|
|
$ \fBmkvextract tracks movie2.mkv 1:extracted.rm 3:extracted.rm\fR
|
2003-06-22 12:27:46 +00:00
|
|
|
|
2003-06-22 10:04:16 +00:00
|
|
|
.SH AUTHOR
|
|
|
|
.I mkvextract
|
|
|
|
was written by Moritz Bunkus <moritz@bunkus.org>.
|
|
|
|
.SH SEE ALSO
|
2003-06-22 12:27:46 +00:00
|
|
|
.BR mkvmerge (1),
|
2003-06-22 10:04:16 +00:00
|
|
|
.BR mkvinfo (1)
|
|
|
|
.SH WWW
|
|
|
|
The newest version can always be found at
|
|
|
|
.UR http://www.bunkus.org/videotools/mkvtoolnix/
|
|
|
|
<http://www.bunkus.org/videotools/mkvtoolnix/>
|
|
|
|
.UE
|