mkvextract --version (return code: 0)
mkvextract v15.0.0 ('Duel with the Devil') 64-bit
mkvextract --help (return code: 0)
mkvextract <mode> <source-filename> [options] <extraction-spec>
Usage:
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 cuesheet <inname> [options]
mkvextract timecodes_v2 <inname> [TID1:out1 [TID2:out2...]]
mkvextract cues <inname> [options] [TID1:out1 [TID2:out2...]]
mkvextract <-h|-V>
The first word tells mkvextract what to extract. The second must be the source file. There are few global options that can be used with all modes. All other options depend on the mode.
Global options:
-f, --parse-fully Parse the whole file instead of relying on the index.
-v, --verbose Increase verbosity.
-q, --quiet Suppress status output.
--ui-language <code> Force the translations for 'code' to be used.
--command-line-charset <charset>
Charset for strings on the command line
--output-charset <cset> Output messages in this charset
-r, --redirect-output <file>
Redirects all messages into this file.
@option-file.json Reads additional command line options from the specified JSON file (see man page).
-h, --help Show this help.
-V, --version Show version information.
Track extraction:
The first mode extracts some tracks to external files.
-c charset Convert text subtitles to this charset (default: UTF-8).
--cuesheet Also try to extract the cue sheet from the chapter information and tags for this track.
--blockadd level Keep only the BlockAdditions up to this level (default: keep all levels)
--raw Extract the data to a raw file.
--fullraw Extract the data to a raw file including the CodecPrivate as a header.
TID:out Write track with the ID TID to the file 'out'.
Example:
mkvextract tracks "a movie.mkv" 2:audio.ogg -c ISO8859-1 3:subs.srt
Tag extraction:
The second mode extracts the tags and converts them to XML. The output is written to the standard output. The output can be used as a source for mkvmerge.
Example:
mkvextract tags "a movie.mkv" > movie_tags.xml
Attachment extraction:
The third mode extracts attachments from the source file.
AID:outname Write the attachment with the ID 'AID' to 'outname'.
Example:
mkvextract attachments "a movie.mkv" 4:cover.jpg
Chapter extraction:
The fourth mode extracts the chapters and converts them to XML. The output is written to the standard output. The output can be used as a source for mkvmerge.
-s, --simple Exports the chapter information in the simple format used in OGM tools (CHAPTER01=... CHAPTER01NAME=...).
--simple-language language Uses the chapter names of the specified language for extraction instead of the first chapter name found.
Example:
mkvextract chapters "a movie.mkv" > movie_chapters.xml
Cue sheet extraction:
The fifth mode tries to extract chapter information and tags and outputs them as a cue sheet. This is the reverse of using a cue sheet with mkvmerge's '--chapters' option.
Example:
mkvextract cuesheet "audiofile.mka" > audiofile.cue
Timecode extraction:
The sixth mode finds the timecodes of all blocks for a track and outputs a timecode v2 file with these timecodes.
Example:
mkvextract timecodes_v2 "a movie.mkv" 1:timecodes_track1.txt
Cue extraction:
This mode extracts cue information for some tracks to external text files.
Example:
mkvextract cues "a movie.mkv" 0:cues_track0.txt