mkvmerge(1) - Merge multimedia streams into a Matroska(TM) file
-q, --quiet
    Suppress status output.
-o, --output file-name
    Write to the file file-name. If splitting is used then this parameter is treated a bit differently.
    See the explanation for the --split option for details.
-w, --webm
    Create a WebM compliant file. This is also turned on if the output file name's extension is "webm".
    This mode enforces several restrictions. The only allowed codecs are VP8 video and Vorbis audio
    tracks. Neither chapters nor tags are allowed. The DocType header item is changed to "webm".
--title title
    Sets the general title for the output file, e.g. the movie name.
    --default-language language-code
        Sets the default language code that will be used for all tracks unless overwritten with the
        --language option. The default language code is 'und' for 'undefined'.

Segment info handling (global options)
    --segmentinfo filename.xml
        Read segment information from a XML file. This file can contain the segment family UID, segment UID,
        previous and next segment UID elements. An example file and a DTD are included in the MKVToolNix
        distribution.
    --segment-uid SID1,SID2,...
        Sets the segment UIDs to use. This is a comma-separated list of 128bit segment UIDs in the usual UID
        form: hex numbers with or without the "0x" prefix, with or without spaces, exactly 32 digits.

        Each file created contains one segment, and each segment has one segment UID. If more segment UIDs
        are specified than segments are created then the surplus UIDs are ignored. If fewer UIDs are
        specified than segments are created then random UIDs will be created for them.

Chapter and tag handling (global options)
    --chapter-language language-code
        Sets the ISO639-2 language code that is written for each chapter entry. Defaults to 'eng'. See the
        section about chapters below for details.

        This option can be used both for simple chapter files and for source files that contain chapters but
        no information about the chapters' language, e.g. MP4 and OGM files.
--chapter-charset character-set
    Sets the character set that is used for the conversion to UTF-8 for simple chapter files. See the
    section about text files and character sets for an explanation how mkvmerge(1) converts between
    character sets.

    This switch does also apply to chapters that are copied from certain container types, e.g. Ogg/OGM
    and MP4 files. See the section about chapters below for details.
--cue-chapter-name-format format
--chapters file-name
    Read chapter information from the file file-name. See the section about chapters below for details.
    --global-tags file-name
        Read global tags from the file file-name. See the section about tags below for details.

General output control (advanced global options)
    --track-order FID1:TID1,FID2:TID2,...
        This option changes the order in which the tracks for an input file are created. The argument is a
        comma separated list of pairs IDs. Each pair contains first the file ID (FID1) which is simply the
        number of the file on the command line starting at 0. The second is a track ID (TID1) from that file.
        If some track IDs are omitted then those tracks are created after the ones given with this option
        have been created.
--cluster-length spec
    Limit the number of data blocks or the duration of data in each cluster. The spec parameter can
    either be a number n without a unit or a number d postfixed with 'ms'.

    If no unit is used then mkvmerge(1) will put at most n data blocks into each cluster. The maximum
    number of blocks is 65535.

    If the number d is postfixed with 'ms' then mkvmerge(1) puts at most d milliseconds of data into each
    cluster. The minimum for d is '100ms', and the maximum is '32000ms'.

    mkvmerge(1) defaults to putting at most 65535 data blocks and 5000ms of data into a cluster.

    Programs trying to find a certain frame can only seek directly to a cluster and have to read the
    whole cluster afterwards. Therefore creating larger clusters may lead to imprecise or slow seeking.
--no-cues
    Tells mkvmerge(1) not to create and write the cue data which can be compared to an index in an AVI.
    Matroska(TM) files can be played back without the cue data, but seeking will probably be imprecise
    and slower. Use this only if you're really desperate for space or for testing purposes. See also
    option --cues which can be specified for each input file.
--clusters-in-meta-seek
    Tells mkvmerge(1) to create a meta seek element at the end of the file containing all clusters. See
    also the section about the Matroska(TM) file layout.
--disable-lacing
    Disables lacing for all tracks. This will increase the file's size, especially if there are many
    audio tracks. This option is not intended for everyday use.
--enable-durations
    Write durations for all blocks. This will increase file size and does not offer any additional value
    for players at the moment.
--timecode-scale factor
    Forces the timecode scale factor to factor. Valid values are in the range 1000..10000000 or the
    special value -1.
--link
    Link files to one another when splitting the output file. See the section on file linking below for
    details.
--link-to-previous segment-UID
    Links the first output file to the segment with the segment UID given by the segment-UID parameter.
    See the section on file linking below for details.
--link-to-next segment-UID
    Links the last output file to the segment with the segment UID given by the segment-UID parameter.
    See the section on file linking below for details.
--append-mode mode
    Determines how timecodes are calculated when appending files. The parameter mode can have two values:
    'file' which is also the default and 'track'.

    When mkvmerge appends a track (called 'track2_1' from now on) from a second file (called 'file2') to
    a track (called 'track1_1') from the first file (called 'file1') then it has to offset all timecodes
    for 'track2_1' by an amount. For 'file' mode this amount is the highest timecode encountered in
    'file1' even if that timecode was from a different track than 'track1_1'. In track mode the offset is
    the highest timecode of 'track1_1'.

    Unfortunately mkvmerge cannot detect which mode to use reliably. Therefore it defaults to 'file'
    mode. 'file' mode usually works better for files that have been created independently of each other;
    e.g. when appending AVI or MP4 files. 'track' mode may work better for sources that are essentially
    just parts of one big file, e.g. for VOB and EVO files.

    Subtitle tracks are always treated as if 'file' mode were active even if 'track' mode actually is.
--append-to SFID1:STID1:DFID1:DTID1[,...]
    This option controls to which track another track is appended. Each spec contains four IDs: a file
    ID, a track ID, a second file ID and a second track ID. The first pair, "source file ID" and "source
    track ID", identifies the track that is to be appended. The second pair, "destination file ID" and
    "destination track ID", identifies the track the first one is appended to.

    If this option has been omitted then a standard mapping is used. This standard mapping appends each
    track from the current file to a track from the previous file with the same track ID. This allows for
    easy appending if a movie has been split into two parts and both file have the same number of tracks
    and track IDs with the command mkvmerge -o output.mkv part1.mkv +part2.mkv.

+
    A single '+' causes the next file to be appended instead of added. The '+' can also be put in front
    of the next file name. Therefore the following two commands are equivalent:

        $ mkvmerge -o full.mkv file1.mkv + file2.mkv
        $ mkvmerge -o full.mkv file1.mkv +file2.mkv
--attachment-mime-type MIME type

    MIME type of the following attachment. Applies to the next --attach-file or --attach-file-once
    option. A list of officially recognized MIME types can be found e.g. at the IANA homepage[2]. The
    MIME type is mandatory for an attachment.
--attachment-name name
    Sets the name that will be stored in the output file for this attachment. If this option is not given
    then the name will be derived from the file name of the attachment as given with the --attach-file or
    the --attach-file-once option.
    --attach-file file-name, --attach-file-once file-name
        Creates a file attachment inside the Matroska(TM) file. The MIME type must have been set before this
        option can used. The difference between the two forms is that during splitting the files attached
        with --attach-file are attached to all output files while the ones attached with --attach-file-once
        are only attached to the first file created. If splitting is not used then both do the same.

        mkvextract(1) can be used to extract attached files from a Matroska(TM) file.

Options that can be used for each input file
    -a, --audio-tracks [!]n,m,...
        Copy the audio tracks n, m etc. The numbers are track IDs which can be obtained with the --identify
        switch. They're not simply the track numbers (see section track IDs). Default: copy all audio tracks.

        If the IDs are prefixed with !  then the meaning is reversed: copy everything but the IDs listed
        after the !.
-d, --video-tracks [!]n,m,...
    Copy the video tracks n, m etc. The numbers are track IDs which can be obtained with the --identify
    switch. They're not simply the track numbers (see section track IDs). Default: copy all video tracks.

    If the IDs are prefixed with !  then the meaning is reversed: copy everything but the IDs listed
    after the !.
-s, --subtitle-tracks [!]n,m,...
    Copy the subtitle tracks n, m etc. The numbers are track IDs which can be obtained with the
    --identify switch. They're not simply the track numbers (see section track IDs). Default: copy all
    subtitle tracks.

    If the IDs are prefixed with !  then the meaning is reversed: copy everything but the IDs listed
    after the !.
-b, --button-tracks [!]n,m,...
    Copy the button tracks n, m etc. The numbers are track IDs which can be obtained with the --identify
    switch. They're not simply the track numbers (see section track IDs). Default: copy all button
    tracks.

    If the IDs are prefixed with !  then the meaning is reversed: copy everything but the IDs listed
    after the !.
--track-tags [!]n,m,...
    Copy the tags for tracks n, m etc. The numbers are track IDs which can be obtained with the
    --identify switch (see section track IDs). They're not simply the track numbers. Default: copy tags
    for all tracks.

    If the IDs are prefixed with !  then the meaning is reversed: copy everything but the IDs listed
    after the !.
-m, --attachments [!]n[:all|first],m[:all|first],...
    Copy the attachments with the IDs n, m etc to all or only the first output file. Each ID can be
    followed by either ':all' (which is the default if neither is entered) or ':first'. If splitting is
    active then those attachments whose IDs are specified with ':all' are copied to all of the resulting
    output files while the others are only copied into the first output file. If splitting is not active
    then both variants have the same effect.

    The default is to copy all attachments to all output files.

    If the IDs are prefixed with !  then the meaning is reversed: copy everything but the IDs listed
    after the !.
-A, --no-audio
    Don't copy any audio track from this file.
-D, --no-video
    Don't copy any video track from this file.
-S, --no-subtitles
    Don't copy any subtitle track from this file.
-B, --no-buttons
    Don't copy any button track from this file.
-T, --no-track-tags
    Don't copy any track specific tags from this file.
--no-chapters
    Don't copy chapters from this file.
-M, --no-attachments
    Don't copy attachments from this file.
--no-global-tags
    Don't copy global tags from this file.
--chapter-charset character-set
    Sets the charset that is used for the conversion to UTF-8 for chapter information contained in the
    source file. See the section about text files and character sets for an explanation how mkvmerge(1)
    converts between character sets.
--chapter-language language-code
    Sets the ISO639-2 language code that is written for each chapter entry. This option can be used for
    source files that contain chapters but no information about the chapters' languages, e.g. for MP4 and
    OGM files.
-y, --sync TID:d[,o[/p]]
    Adjust the timecodes of the track with the id TID by d ms. The track IDs are the same as the ones
    given with --identify (see section track IDs).

    o/p: adjust the timestamps by o/p to fix linear drifts.  p defaults to 1 if omitted. Both o and p can
    be floating point numbers.

    Defaults: no manual sync correction (which is the same as d = 0 and o/p = 1.0).

    This option can be used multiple times for an input file applying to several tracks by selecting
    different track IDs each time.
--cues TID:none|iframes|all
    Controls for which tracks cue (index) entries are created for the given track (see section track
    IDs). 'none' inhibits the creation of cue entries. For 'iframes' only blocks with no backward or
    forward references ( = I frames in video tracks) are put into the cue sheet. 'all' causes mkvmerge(1)
    to create cue entries for all blocks which will make the file very big.

    The default is 'iframes' for video tracks and 'none' for all others. See also option --no-cues which
    inhibits the creation of cue entries regardless of the --cues options used.

    This option can be used multiple times for an input file applying to several tracks by selecting
    different track IDs each time.
--default-track TID[:bool]
    Sets the 'default' flag for the given track (see section track IDs) if the optional argument bool is
    not present. If the user does not explicitly select a track himself then the player should prefer the
    track that has his 'default' flag set. Only one track of each kind (audio, video, subtitles, buttons)
    can have his 'default' flag set. If the user wants no track to have the default track flag set then
    he has to set bool to 0 for all tracks.

    This option can be used multiple times for an input file applying to several tracks by selecting
    different track IDs each time.
--forced-track TID[:bool]
    Sets the 'forced' flag for the given track (see section track IDs) if the optional argument bool is
    not present. A player must play all tracks for which this flag is set to 1.

    This option can be used multiple times for an input file applying to several tracks by selecting
    different track IDs each time.
--blockadd TID:level
    Keep only the BlockAdditions up to the level level for the given track. The default is to keep all
    levels. This option only affects certain kinds of codecs like WAVPACK4.
--track-name TID:name
    Sets the track name for the given track (see section track IDs) to name.
--language TID:language
    Sets the language for the given track (see section track IDs). Both ISO639-2 language codes and
    ISO639-1 country codes are allowed. The country codes will be converted to language codes
    automatically. All languages including their ISO639-2 codes can be listed with the --list-languages
    option.

    This option can be used multiple times for an input file applying to several tracks by selecting
    different track IDs each time.
-t, --tags TID:file-name
    Read tags for the track with the number TID from the file file-name. See the section about tags below
    for details.
--aac-is-sbr TID[:0|1]
    Tells mkvmerge(1) that the track with the ID TID is SBR AAC (also known as HE-AAC or AAC+). This
    options is needed if a) the source file is an AAC file (not for a Matroska(TM) file) and b) the AAC
    file contains SBR AAC data. The reason for this switch is that it is technically impossible to
    automatically tell normal AAC data from SBR AAC data without decoding a complete AAC frame. As there
    are several patent issues with AAC decoders mkvmerge(1) will never contain this decoding stage. So
    for SBR AAC files this switch is mandatory. The resulting file might not play back correctly or even
    not at all if the switch was omitted.

    If the source file is a Matroska(TM) file then the CodecID should be enough to detect SBR AAC.
    However, if the CodecID is wrong then this switch can be used to correct that.

    If mkvmerge wrongfully detects that an AAC file is SBR then you can add ':0' to the track ID.
--timecodes TID:file-name
    Read the timecodes to be used for the specific track ID from file-name. These timecodes forcefully
    override the timecodes that mkvmerge(1) normally calculates. Read the section about external timecode
    files.
--default-duration TID:x
    Forces the default duration of a given track to the specified value. Also modifies the track's
    timecodes to match the default duration. The argument x must be postfixed with 's', 'ms', 'us', 'ns'
    or 'fps' to specify the default duration in seconds, milliseconds, microseconds, nanoseconds or
    'frames per second' respectively. The number x itself can be a floating point number or a fraction.

    If the default duration is not forced then mkvmerge will try to derive the track's default duration
    from the container and/or codec used. One case in which this option is of use is when adding
    AVC/h.264 elementary streams because these do not contain information about their number of frames or
    a default duration for each frame. For such files mkvmerge(1) will assume a default duration of
    '25fps' unless overridden.

    This option can also be used to change the FPS of video tracks without having to use an external
    timecode file.
--nalu-size-length TID:n
    Forces the NALU size length to n bytes. This parameter is only used if the AVC/h.264 elementary
    stream packetizer is used. If left out it defaults to 4 bytes, but there are files that contain
    frames or slices that are all smaller than 65536 bytes. For such files you can use this parameter and
    decrease the size to 2.
    --compression TID:n
        Selects the compression method to be used for the track. Note that the player also has to support
        this method. Valid values are 'none', 'zlib', 'lzo'/'lxo1x', 'bz2'/'bzlib' and 'mpeg4_p2'/'mpeg4p2'.
        The values 'lzo'/'lxo1x' and 'bz2'/'bzlib' are only available if mkvmerge(1) has been compiled with
        support for the liblzo(TM) and bzlib(TM) compression libraries, respectively.

        The compression method 'mpeg4_p2'/'mpeg4p2' is a special compression method called 'header removal'
        that is only available for MPEG4 part 2 video tracks.

        The default for some subtitle tracks is 'zlib' compression. This compression method is also the one
        that most if not all playback applications support. Support for other compression methods other than
        'none' is not assured.

Options that only apply to video tracks
    -f, --fourcc TID:FourCC
        Forces the FourCC to the specified value. Works only for video tracks in the 'MS compatibility mode'.
--display-dimensions TID:widthxheight

    Matroska(TM) files contain two values that set the display properties that a player should scale the
    image on playback to: display width and display height. These values can be set with this option,
    e.g. '1:640x480'.

    Another way to specify the values is to use the --aspect-ratio or the --aspect-ratio-factor option
    (see below). These options are mutually exclusive.
--aspect-ratio TID:ratio|width/height

    Matroska(TM) files contain two values that set the display properties that a player should scale the
    image on playback to: display width and display height. With this option mkvmerge(1) will
    automatically calculate the display width and display height based on the image's original width and
    height and the aspect ratio given with this option. The ratio can be given either as a floating point
    number ratio or as a fraction 'width/height', e.g. '16/9'.

    Another way to specify the values is to use the --aspect-ratio-factor or --display-dimensions options
    (see above and below). These options are mutually exclusive.
--aspect-ratio-factor TID:factor|n/d
    Another way to set the aspect ratio is to specify a factor. The original aspect ratio is first
    multiplied with this factor and used as the target aspect ratio afterwards.

    Another way to specify the values is to use the --aspect-ratio or --display-dimensions options (see
    above). These options are mutually exclusive.
--cropping TID:left,top,right,bottom
    Sets the pixel cropping parameters of a video track to the given values.
    --stereo-mode TID:n|keyword
        Sets the stereo mode for the video track with the track ID TID. The mode can either be a number n
        between 0 and 14 or one of these keywords:

        'mono', 'side_by_side_left_first', 'top_bottom_right_first', 'top_bottom_left_first',
        'checkerboard_right_first', 'checkerboard_left_first', 'row_interleaved_right_first',
        'row_interleaved_left_first', 'column_interleaved_right_first', 'column_interleaved_left_first',
        'anaglyph_cyan_red', 'side_by_side_right_first', 'anaglyph_green_magenta',
        'both_eyes_laced_left_first', 'both_eyes_laced_right_first'.

Options that only apply to text subtitle tracks
    --sub-charset TID:character-set
        Sets the character set for the conversion to UTF-8 for UTF-8 subtitles for the given track ID. If not
        specified the charset will be derived from the current locale settings. Note that a charset is not
        needed for subtitles read from Matroska(TM) files or from Kate streams, as these are always stored in
        UTF-8. See the section about text files and character sets for an explanation how mkvmerge(1)
        converts between character sets.

        This option can be used multiple times for an input file applying to several tracks by selecting
        different track IDs each time.

Other options
    -i, --identify file-name
        Will let mkvmerge(1) probe the single file and report its type, the tracks contained in the file and
        their track IDs. If this option is used then the only other option allowed is the filename.
-I, --identify-verbose file-name
    Will let mkvmerge(1) probe the single file and report its type, the tracks contained in the file and
    their track IDs. If this option is used then the only other option allowed is the filename.

    This option causes mkvmerge(1) to output additional information about the container and each track
    within. The extra information is surronded by square brackets. It consists of space-saparated
    key/value pairs where keys and values are separated by a colon.

    Each value is escaped according to the rules described in the section about escaping special
    characters in text.
-l, --list-types
    Lists supported input file types.
--list-languages
    Lists all languages and their ISO639-2 code which can be used with the --language option.
--priority priority
    Sets the process priority that mkvmerge(1) runs with. Valid values are 'lowest', 'lower', 'normal',
    'higher' and 'highest'. If nothing is given then 'normal' is used. On Unix like systems mkvmerge(1)
    will use the nice(2) function. Therefore only the super user can use 'higher' and 'highest'. On
    Windows all values are useable for every user.
--command-line-charset character-set
    Sets the character set to convert strings given on the command line from. It defaults to the
    character set given by system's current locale. This settings applies to arguments of the following
    options: --title, --track-name and --attachment-description.
--output-charset character-set
    Sets the character set to which strings are converted that are to be output. It defaults to the
    character set given by system's current locale.
-r, --redirect-output file-name
    Writes all messages to the file file-name instead of to the console. While this can be done easily
    with output redirection there are cases in which this option is needed: when the terminal
    reinterprets the output before writing it to a file. The character set set with --output-charset is
    honored.
--ui-language code
    Forces the translations for the language code to be used (e.g. 'de_DE' for the German translations).
    It is preferable to use the environment variables LANG, LC_MESSAGES and LC_ALL though. Entering
    'list' as the code will cause mkvmerge(1) to output a list of available translations.
--capabilities
    Lists information about optional features that have been compiled in and exit. The first line output
    will be the version information. All following lines contain exactly one word whose presence
    indicates that the feature has been compiled in. These features are:

       'BZ2' -- the bzlib(TM) compression library. Affects the available compression methods for the
        --compression option.

       'LZO' -- the lzo(TM) compression library. Affects the available compression methods for the
        --compression option.

       'FLAC' -- reading raw FLAC files and handling FLAC tracks in other containers, e.g.  Ogg(TM) or
        Matroska(TM).
-h, --help
    Show usage information and exit.
-V, --version
    Show version information and exit.
--check-for-updates
    Checks online for new releases by downloading the URL
    http://mkvtoolnix-releases.bunkus.org/latest-release.xml. Four lines will be output in key=value
    style: the URL from where the information was retrieved (key version_check_url), the currently
    running version (key running_version), the latest release's version (key available_version) and the
    download URL (key download_url).