2010-02-09 08:13:22 +00:00
'\" t
. \" Title: mkvpropedit
. \" Author: Moritz Bunkus <moritz@bunkus.org>
2013-06-27 18:16:17 +00:00
. \" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
2014-10-22 16:36:19 +00:00
. \" Date: 2014-10-22
2014-05-24 18:49:37 +00:00
. \" Manual: User Commands
2014-10-22 16:36:19 +00:00
. \" Source: MKVToolNix 7.3.0
2014-05-24 18:49:37 +00:00
. \" Language: English
2010-02-09 08:13:22 +00:00
. \"
2014-10-22 16:36:19 +00:00
.TH "MKVPROPEDIT" "1" "2014\-10\-22" "MKVToolNix 7\&.3\&.0" "User Commands"
2010-02-09 08:13:22 +00:00
. \" -----------------------------------------------------------------
2010-05-26 10:49:55 +00:00
. \" * Define some portability stuff
. \" -----------------------------------------------------------------
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. \" http://bugs.debian.org/507673
. \" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n (.g .ds Aq \(aq
.el .ds Aq '
. \" -----------------------------------------------------------------
2010-02-09 08:13:22 +00:00
. \" * set default formatting
. \" -----------------------------------------------------------------
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
2014-05-24 18:49:37 +00:00
.SH "NAME"
mkvpropedit \- Modify properties of existing Matroska(TM) files without a complete remux
.SH "SYNOPSIS"
2010-02-09 08:13:22 +00:00
.HP \w '\fBmkvpropedit\fR\ 'u
2014-05-24 18:49:37 +00:00
\fB mkvpropedit\fR [options] {source\- filename} {actions}
.SH "DESCRIPTION"
2010-02-09 08:13:22 +00:00
.PP
2014-05-24 18:49:37 +00:00
This program analyses an existing
2010-02-09 08:13:22 +00:00
Matroska(TM)
2014-05-24 18:49:37 +00:00
file and modifies some of its properties\& . Then it writes those modifications to the existing file\& . Among the properties that can be changed are the segment information elements (e\& .g\& . the title) and the track headers (e\& .g\& . the language code, \* (Aqdefault track\* (Aq flag or the name)\& .
2010-02-09 08:13:22 +00:00
.PP
2014-05-24 18:49:37 +00:00
Options:
2010-02-09 08:13:22 +00:00
.PP
\fB \- l\fR , \fB \- \- list\- property\- names\fR
.RS 4
2014-05-24 18:49:37 +00:00
Lists all known and editable property names, their type (string, integer, boolean etc) and a short description\& . The program exits afterwards\& . Therefore the
2010-02-09 08:13:22 +00:00
\fI source\- filename\fR
2014-05-24 18:49:37 +00:00
parameter does not have to be supplied\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- p\fR , \fB \- \- parse\- mode\fR \fI mode\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Sets the parse mode\& . The parameter \* (Aq\fI mode\fR \* (Aq can either be \* (Aqfast\* (Aq (which is also the default) or \* (Aqfull\* (Aq\& . The \* (Aqfast\* (Aq mode does not parse the whole file but uses the meta seek elements for locating the required elements of a source file\& . In 99% of all cases this is enough\& . But for files that do not contain meta seek elements or which are damaged the user might have to set the \* (Aqfull\* (Aq parse mode\& . A full scan of a file can take a couple of minutes while a fast scan only takes seconds\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
Actions that deal with track and segment info properties:
2010-02-09 08:13:22 +00:00
.PP
2014-05-24 18:49:37 +00:00
\fB \- e\fR , \fB \- \- edit\fR \fI selector\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Sets the
2010-02-09 08:13:22 +00:00
Matroska(TM)
2014-05-24 18:49:37 +00:00
file section (segment information or a certain track\* (Aqs headers) that all following
add,
set
and
delete
actions operate on\& . This option can be used multiple times in order to make modifications to more than one element\& .
.sp
By default
\fB mkvpropedit\fR (1)
will edit the segment information section\& .
2010-11-18 10:25:09 +00:00
.sp
2014-05-24 18:49:37 +00:00
See the section about
edit selectors
for a full description of the syntax\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- a\fR , \fB \- \- add\fR \fI name\fR =\fI value\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Adds a property
\fI name\fR
with the value
\fI value\fR \& . The property will be added even if such a property exists already\& . Note that most properties are unique and cannot occur more than once\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- s\fR , \fB \- \- set\fR \fI name\fR =\fI value\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Sets all occurrences of the property
\fI name\fR
to the value
\fI value\fR \& . If no such property exists then it will be added\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- d\fR , \fB \- \- delete\fR \fI name\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Deletes all occurrences of the property
\fI name\fR \& . Note that some properties are required and cannot be deleted\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
Actions that deal with tags and chapters:
2012-09-02 10:56:54 +00:00
.PP
2014-05-24 18:49:37 +00:00
\fB \- t\fR , \fB \- \- tags\fR \fI selector\fR :\fI filename\fR
2011-02-15 07:38:59 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Add or replace tags in the file with the ones from
filename
or remove them if
filename
is empty\& .
\fB mkvpropedit\fR (1)
reads the same XML tag format that
2011-02-15 07:38:59 +00:00
\fB mkvmerge\fR (1)
2014-05-24 18:49:37 +00:00
reads as well\& .
.sp
The
\fI selector\fR
must be one of the words
\fB all\fR ,
\fB global\fR
or
\fB track\fR \& . For
\fB all\fR \fB mkvpropedit\fR (1)
will replace or remove all tags in a file\& . With
2011-02-15 07:38:59 +00:00
\fB global\fR
2014-05-24 18:49:37 +00:00
only global tags will be replaced or removed\& .
.sp
With
\fB track\fR \fB mkvpropedit\fR (1)
will replace tags for a specific track\& . Additionally the tags read from
filename
will be assigned to the same track\& . The track is specified in the same way
edit selectors
are specified (see below), e\& .g\& .
\- \- tags track:a1:new\- audio\- tags\& .xml\& .
.RE
.PP
\fB \- c\fR , \fB \- \- chapters\fR \fI filename\fR
.RS 4
Add or replace chapters in the file with the ones from
filename
or remove them if
filename
is empty\& .
\fB mkvpropedit\fR (1)
reads the same XML and simple chapter formats that
2011-05-11 19:41:07 +00:00
\fB mkvmerge\fR (1)
2014-05-24 18:49:37 +00:00
reads as well\& .
2011-05-11 19:41:07 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
Actions for handling attachments:
2012-09-02 10:56:54 +00:00
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- add\- attachment\fR \fI filename\fR
2012-09-02 10:56:54 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Adds a new attachment from
\fI filename\fR \& .
2012-09-02 10:56:54 +00:00
.sp
2014-05-24 18:49:37 +00:00
If the option
2012-09-02 10:56:54 +00:00
\fB \- \- attachment\- name\fR
2014-05-24 18:49:37 +00:00
has been used prior to this option then its value is used as the new attachment\* (Aqs name\& . Otherwise it is derived from
\fI filename\fR \& .
2012-09-02 10:56:54 +00:00
.sp
2014-05-24 18:49:37 +00:00
If the option
2012-09-02 10:56:54 +00:00
\fB \- \- attachment\- mime\- type\fR
2014-05-24 18:49:37 +00:00
has been used prior to this option then its value is used as the new attachment\* (Aqs MIME type\& . Otherwise it is auto\- detected from the content of
\fI filename\fR \& .
2012-09-02 10:56:54 +00:00
.sp
2014-05-24 18:49:37 +00:00
If the option
2012-09-02 10:56:54 +00:00
\fB \- \- attachment\- description\fR
2014-05-24 18:49:37 +00:00
has been used prior to this option then its value is used as the new attachment\* (Aqs description\& . Otherwise no description will be set\& .
2012-09-02 10:56:54 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- replace\- attachment\fR \fI selector\fR :\fI filename\fR
2012-09-02 10:56:54 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Replaces one or more attachments that match
\fI selector\fR
with the file
\fI filename\fR \& . If more than one existing attachment matches
\fI selector\fR
then all of their contents will be replaced by the content of
\fI filename\fR \& .
2012-09-02 10:56:54 +00:00
.sp
2014-05-24 18:49:37 +00:00
The
\fI selector\fR
can have one of four forms\& . They\* (Aqre exlained below in the section
attachment selectors\& .
2012-09-02 10:56:54 +00:00
.sp
2014-05-24 18:49:37 +00:00
If the option
2012-09-02 10:56:54 +00:00
\fB \- \- attachment\- name\fR
2014-05-24 18:49:37 +00:00
has been used prior to this option then its value is used as the replaced attachment\* (Aqs name\& . Otherwise the name is not changed\& .
2012-09-02 10:56:54 +00:00
.sp
2014-05-24 18:49:37 +00:00
If the option
2012-09-02 10:56:54 +00:00
\fB \- \- attachment\- mime\- type\fR
2014-05-24 18:49:37 +00:00
has been used prior to this option then its value is used as the replaced attachment\* (Aqs MIME type\& . Otherwise the MIME type is not changed\& .
2012-09-02 10:56:54 +00:00
.sp
2014-05-24 18:49:37 +00:00
If the option
2012-09-02 10:56:54 +00:00
\fB \- \- attachment\- description\fR
2014-05-24 18:49:37 +00:00
has been used prior to this option then its value is used as the replaced attachment\* (Aqs description\& . Otherwise no description is not changed\& .
2012-09-02 10:56:54 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- delete\- attachment\fR \fI selector\fR
2012-09-02 10:56:54 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Deletes one or more attachments that match
\fI selector\fR \& .
2012-09-02 10:56:54 +00:00
.sp
2014-05-24 18:49:37 +00:00
The
\fI selector\fR
can have one of four forms\& . They\* (Aqre exlained below in the section
attachment selectors\& .
2012-09-02 10:56:54 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
Options for attachment actions:
2012-09-02 10:56:54 +00:00
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- attachment\- name\fR \fI name\fR
2012-09-02 10:56:54 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Sets the name to use for the following
2012-09-02 10:56:54 +00:00
\fB \- \- add\- attachment\fR
2014-05-24 18:49:37 +00:00
or
2012-09-02 10:56:54 +00:00
\fB \- \- replace\- attachment\fR
2014-05-24 18:49:37 +00:00
operation\& .
2012-09-02 10:56:54 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- attachment\- mime\- type\fR \fI mime\- type\fR
2012-09-02 10:56:54 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Sets the MIME type to use for the following
2012-09-02 10:56:54 +00:00
\fB \- \- add\- attachment\fR
2014-05-24 18:49:37 +00:00
or
2012-09-02 10:56:54 +00:00
\fB \- \- replace\- attachment\fR
2014-05-24 18:49:37 +00:00
operation\& .
2012-09-02 10:56:54 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- attachment\- description\fR \fI description\fR
2012-09-02 10:56:54 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Sets the description to use for the following
2012-09-02 10:56:54 +00:00
\fB \- \- add\- attachment\fR
2014-05-24 18:49:37 +00:00
or
2012-09-02 10:56:54 +00:00
\fB \- \- replace\- attachment\fR
2014-05-24 18:49:37 +00:00
operation\& .
2012-09-02 10:56:54 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
Other options:
2010-02-09 08:13:22 +00:00
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- command\- line\- charset\fR \fI character\- set\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Sets the character set to convert strings given on the command line from\& . It defaults to the character set given by system\* (Aqs current locale\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- output\- charset\fR \fI character\- set\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Sets the character set to which strings are converted that are to be output\& . It defaults to the character set given by system\* (Aqs current locale\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- r\fR , \fB \- \- redirect\- output\fR \fI file\- name\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Writes all messages to the file
\fI file\- name\fR
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
2010-02-09 08:13:22 +00:00
\fB \- \- output\- charset\fR
2014-05-24 18:49:37 +00:00
is honored\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- ui\- language\fR \fI code\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Forces the translations for the language
\fI code\fR
to be used (e\& .g\& . \* (Aqde_DE\* (Aq for the German translations)\& . It is preferable to use the environment variables
2010-02-09 08:13:22 +00:00
\fI LANG\fR ,
\fI LC_MESSAGES\fR
2014-05-24 18:49:37 +00:00
and
2010-02-09 08:13:22 +00:00
\fI LC_ALL\fR
2014-05-24 18:49:37 +00:00
though\& . Entering \* (Aqlist\* (Aq as the
\fI code\fR
will cause
\fB mkvextract\fR (1)
to output a list of available translations\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- debug\fR \fI topic\fR
2012-02-25 11:44:18 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Turn on debugging for a specific feature\& . This option is only useful for developers\& .
2012-02-25 11:44:18 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB \- \- engage\fR \fI feature\fR
2012-02-25 11:44:18 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Turn on experimental features\& . A list of available features can be requested with
\fB mkvpropedit \- \- engage list\fR \& . These features are not meant to be used in normal situations\& .
2012-02-25 11:44:18 +00:00
.RE
.PP
2013-12-31 21:00:32 +00:00
\fB \- \- gui\- mode\fR
.RS 4
Turns on GUI mode\& . In this mode specially\- formatted lines may be output that can tell a controlling GUI what\* (Aqs happening\& . These messages follow the format \* (Aq#GUI#message\* (Aq\& . The message may be followed by key/value pairs as in \* (Aq#GUI#message#key1=value1#key2=value2\& ...\* (Aq\& . Neither the messages nor the keys are ever translated and always output in English\& .
.RE
.PP
2010-02-09 08:13:22 +00:00
\fB \- v\fR , \fB \- \- verbose\fR
.RS 4
2014-05-24 18:49:37 +00:00
Be verbose and show all the important
2010-02-09 08:13:22 +00:00
Matroska(TM)
2014-05-24 18:49:37 +00:00
elements as they\* (Aqre read\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
\fB \- h\fR , \fB \- \- help\fR
.RS 4
2014-05-24 18:49:37 +00:00
Show usage information and exit\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
\fB \- V\fR , \fB \- \- version\fR
.RS 4
2014-05-24 18:49:37 +00:00
Show version information and exit\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2010-12-23 15:07:34 +00:00
\fB \- \- check\- for\- updates\fR
.RS 4
2014-05-24 18:49:37 +00:00
Checks online for new releases by downloading the URL
\m[blue]\fBhttp://mkvtoolnix\-releases\&.bunkus\&.org/latest\-release\&.xml\fR\m[] \& . 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\* (Aqs version (key
available_version) and the download URL (key
download_url)\& .
2010-12-23 15:07:34 +00:00
.sp
2014-05-24 18:49:37 +00:00
Afterwards the program exists with an exit code of 0 if no newer release is available, with 1 if a newer release is available and with 2 if an error occured (e\& .g\& . if the update information could not be retrieved)\& .
2010-12-23 15:07:34 +00:00
.sp
2014-05-24 18:49:37 +00:00
This option is only available if the program was built with support for libcurl\& .
2010-12-23 15:07:34 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB @\fR \fI options\- file\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
Reads additional command line arguments from the file
\fI options\- file\fR \& . Lines whose first non\- whitespace character is a hash mark (\* (Aq#\* (Aq) are treated as comments and ignored\& . White spaces at the start and end of a line will be stripped\& . Each line must contain exactly one option\& .
2010-12-20 19:12:59 +00:00
.sp
2014-05-24 18:49:37 +00:00
Several chars can be escaped, e\& .g\& . if you need to start a non\- comment line with \* (Aq#\* (Aq\& . The rules are described in
the section about escaping text\& .
2010-02-09 08:13:22 +00:00
.sp
2014-05-24 18:49:37 +00:00
The command line \* (Aq\fB mkvpropedit source\& .mkv \- \- edit track:a2 \- \- set name=Comments\fR \* (Aq could be converted into the following option file:
2010-02-09 08:13:22 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
# Modify source\& .mkv
source\& .mkv
# Edit the second audio track
2010-02-09 08:13:22 +00:00
\- \- edit
track:a2
2014-05-24 18:49:37 +00:00
# and set the title to \* (AqComments\* (Aq
2010-02-09 08:13:22 +00:00
\- \- set
2014-05-24 18:49:37 +00:00
name=Comments
2010-02-09 08:13:22 +00:00
.fi
.if n \{ \
.RE
. \}
.RE
2014-05-24 18:49:37 +00:00
.SH "EDIT SELECTORS"
2010-02-09 08:13:22 +00:00
.PP
2014-05-24 18:49:37 +00:00
The
2010-02-09 08:13:22 +00:00
\fB \- \- edit\fR
2014-05-24 18:49:37 +00:00
option sets the
2010-02-09 08:13:22 +00:00
Matroska(TM)
2014-05-24 18:49:37 +00:00
file section (segment information or a certain track\* (Aqs headers) that all following
add,
set
and
delete
actions operate on\& . This stays valid until the next
2010-02-09 08:13:22 +00:00
\fB \- \- edit\fR
2014-05-24 18:49:37 +00:00
option is found\& . The argument to this option is called the edit selector\& .
2010-11-18 10:25:09 +00:00
.PP
2014-05-24 18:49:37 +00:00
By default
\fB mkvpropedit\fR (1)
will edit the segment information section\& .
.SS "Segment information"
2010-02-09 08:13:22 +00:00
.PP
2014-05-24 18:49:37 +00:00
The segment information can be selected with one of these three words: \* (Aqinfo\* (Aq, \* (Aqsegment_info\* (Aq or \* (Aqsegmentinfo\* (Aq\& . It contains properties like the segment title or the segment
UID\& .
.SS "Track headers"
2010-02-09 08:13:22 +00:00
.PP
2014-05-24 18:49:37 +00:00
Track headers can be selected with a slightly more complex selector\& . All variations start with \* (Aqtrack:\* (Aq\& . The track header properties include elements like the language code, \* (Aqdefault track\* (Aq flag or the track\* (Aqs name\& .
2010-02-09 08:13:22 +00:00
.PP
\fB track:\fR \fI n\fR
.RS 4
2014-05-24 18:49:37 +00:00
If the parameter
2010-02-09 08:13:22 +00:00
\fI n\fR
2014-05-24 18:49:37 +00:00
is a number then the
\fI n\fR th track will be selected\& . The track order is the same that
\fB mkvmerge\fR (1)\* (Aqs
2010-02-09 08:13:22 +00:00
\fB \- \- identify\fR
2014-05-24 18:49:37 +00:00
option outputs\& .
2012-04-24 07:57:36 +00:00
.sp
2014-05-24 18:49:37 +00:00
Numbering starts at 1\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
\fB track:\fR \fI t\fR \fI n\fR
.RS 4
2014-05-24 18:49:37 +00:00
If the parameter starts with a single character
2010-02-09 08:13:22 +00:00
\fI t\fR
2014-05-24 18:49:37 +00:00
followed by a
2010-02-09 08:13:22 +00:00
\fI n\fR
2014-05-24 18:49:37 +00:00
then the
\fI n\fR th track of a specific track type will be selected\& . The track type parameter
2010-02-09 08:13:22 +00:00
\fI t\fR
2014-05-24 18:49:37 +00:00
must be one of these four characters: \* (Aqa\* (Aq for an audio track, \* (Aqb\* (Aq for a button track, \* (Aqs\* (Aq for a subtitle track and \* (Aqv\* (Aq for a video track\& . The track order is the same that
\fB mkvmerge\fR (1)\* (Aqs
2010-02-09 08:13:22 +00:00
\fB \- \- identify\fR
2014-05-24 18:49:37 +00:00
option outputs\& .
2012-04-24 07:57:36 +00:00
.sp
2014-05-24 18:49:37 +00:00
Numbering starts at 1\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
\fB track:\fR =\fI uid\fR
.RS 4
2014-05-24 18:49:37 +00:00
If the parameter starts with a \* (Aq=\* (Aq followed by a number
2010-02-09 08:13:22 +00:00
\fI uid\fR
2014-05-24 18:49:37 +00:00
then the track whose track
2010-02-09 08:13:22 +00:00
UID
2014-05-24 18:49:37 +00:00
element equals this
\fI uid\fR \& . Track
UIDs
can be obtained with
\fB mkvinfo\fR (1)\& .
2010-02-09 08:13:22 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fB track:\fR @\fI number\fR
2010-02-09 08:13:22 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
If the parameter starts with a \* (Aq@\* (Aq followed by a number
\fI number\fR
then the track whose track number element equals this
\fI number\fR \& . Track number can be obtained with
\fB mkvinfo\fR (1)\& .
2010-02-09 08:13:22 +00:00
.RE
2014-05-24 18:49:37 +00:00
.SS "Notes"
2010-02-09 08:13:22 +00:00
.PP
2014-05-24 18:49:37 +00:00
Due to the nature of the track edit selectors it is possible that several selectors actually match the same track headers\& . In such cases all actions for those edit selectors will be combined and executed in the order in which they\* (Aqre given on the command line\& .
.SH "ATTACHMENT SELECTORS"
2012-09-02 10:56:54 +00:00
.PP
2014-05-24 18:49:37 +00:00
An attachment selector is used with the two actions
2012-09-02 10:56:54 +00:00
\fB \- \- replace\- attachment\fR
2014-05-24 18:49:37 +00:00
and
\fB \- \- delete\- attachment\fR \& . It can have one of the following four forms:
2012-09-02 10:56:54 +00:00
.sp
.RS 4
.ie n \{ \
\h '-04' 1.\h '+01'\c
. \}
.el \{ \
.sp -1
.IP " 1." 4 .2
. \}
2014-05-24 18:49:37 +00:00
Selection by attachment ID\& . In this form the selector is simply a number, the attachment\* (Aqs ID as output by
\fB mkvmerge\fR (1)\* (Aqs identification command\& .
2012-09-02 10:56:54 +00:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04' 2.\h '+01'\c
. \}
.el \{ \
.sp -1
.IP " 2." 4 .2
. \}
2014-05-24 18:49:37 +00:00
Selection by attachment UID (unique ID)\& . In this form the selector is the equal sign
2012-09-02 10:56:54 +00:00
=
2014-05-24 18:49:37 +00:00
followed by a number, the attachment\* (Aqs unique ID as output by
\fB mkvmerge\fR (1)\* (Aqs verbose identification command\& .
2012-09-02 10:56:54 +00:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04' 3.\h '+01'\c
. \}
.el \{ \
.sp -1
.IP " 3." 4 .2
. \}
2014-05-24 18:49:37 +00:00
Selection by attachment name\& . In this form the selector is the literal word
2012-09-02 10:56:54 +00:00
name:
2014-05-24 18:49:37 +00:00
followed by the existing attachment\* (Aqs name\& . If this selector is used with
2012-09-02 10:56:54 +00:00
\fB \- \- replace\- attachment\fR
2014-05-24 18:49:37 +00:00
then colons within the name to match must be escaped as
\e c\& .
2012-09-02 10:56:54 +00:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04' 4.\h '+01'\c
. \}
.el \{ \
.sp -1
.IP " 4." 4 .2
. \}
2014-05-24 18:49:37 +00:00
Selection by MIME type\& . In this form the selector is the literal word
2012-09-02 10:56:54 +00:00
mime\- type:
2014-05-24 18:49:37 +00:00
followed by the existing attachment\* (Aqs MIME type\& . If this selector is used with
2012-09-02 10:56:54 +00:00
\fB \- \- replace\- attachment\fR
2014-05-24 18:49:37 +00:00
then colons within the MIME type to match must be escaped as
\e c\& .
2012-09-02 10:56:54 +00:00
.RE
2014-05-24 18:49:37 +00:00
.SH "EXAMPLES"
2010-02-09 08:13:22 +00:00
.PP
2014-05-24 18:49:37 +00:00
The following example edits a file called \* (Aqmovie\& .mkv\* (Aq\& . It sets the segment title and modifies the language code of an audio and a subtitle track\& . Note that this example can be shortened by leaving out the first
2010-02-09 08:13:22 +00:00
\fB \- \- edit\fR
2014-05-24 18:49:37 +00:00
option because editing the segment information element is the default for all options found before the first
2010-02-09 08:13:22 +00:00
\fB \- \- edit\fR
2014-05-24 18:49:37 +00:00
option anyway\& .
2010-02-09 08:13:22 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- edit info \- \- set "title=The movie" \- \- edit track:a1 \- \- set language=fre \- \- edit track:a2 \- \- set language=ita
2010-02-09 08:13:22 +00:00
.fi
.if n \{ \
.RE
. \}
.PP
2014-05-24 18:49:37 +00:00
The second example removes the \* (Aqdefault track flag\* (Aq from the first subtitle track and sets it for the second one\& . Note that
\fB mkvpropedit\fR (1), unlike
\fB mkvmerge\fR (1), does not set the \* (Aqdefault track flag\* (Aq of other tracks to \* (Aq0\* (Aq if it is set to \* (Aq1\* (Aq for a different track automatically\& .
2010-02-09 08:13:22 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- edit track:s1 \- \- set flag\- default=0 \- \- edit track:s2 \- \- set flag\- default=1
2011-02-15 07:38:59 +00:00
.fi
.if n \{ \
.RE
. \}
.PP
2014-05-24 18:49:37 +00:00
Replacing the tags for the second subtitle track in a file looks like this:
2011-02-15 07:38:59 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- tags track:s2:new\- subtitle\- tags\& .xml
2011-02-15 07:38:59 +00:00
.fi
.if n \{ \
.RE
. \}
.PP
2014-05-24 18:49:37 +00:00
Removing all tags requires leaving out the file name:
2011-02-15 07:38:59 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- tags all:
2011-05-11 19:41:07 +00:00
.fi
.if n \{ \
.RE
. \}
.PP
2014-05-24 18:49:37 +00:00
Replacing the chapters in a file looks like this:
2011-05-11 19:41:07 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- chapters new\- chapters\& .xml
2011-05-11 19:41:07 +00:00
.fi
.if n \{ \
.RE
. \}
.PP
2014-05-24 18:49:37 +00:00
Removing all chapters requires leaving out the file name:
2011-05-11 19:41:07 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- chapters \* (Aq\* (Aq
2010-02-09 08:13:22 +00:00
.fi
.if n \{ \
.RE
. \}
2012-09-02 10:56:54 +00:00
.PP
2014-05-24 18:49:37 +00:00
Adding a font file (Arial\& .ttf) as an attachment:
2012-09-02 10:56:54 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- add\- attachment Arial\& .ttf
2012-09-02 10:56:54 +00:00
.fi
.if n \{ \
.RE
. \}
.PP
2014-05-24 18:49:37 +00:00
Adding a font file (89719823\& .ttf) as an attachment and providing some information as it really is just Arial:
2012-09-02 10:56:54 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- attachment\- name Arial\& .ttf \- \- attachment\- description \* (AqThe Arial font as a TrueType font\* (Aq \- \- attachment\- mime\- type application/x\- truetype\- font \- \- add\- attachment 89719823\& .ttf
2012-09-02 10:56:54 +00:00
.fi
.if n \{ \
.RE
. \}
.PP
2014-05-24 18:49:37 +00:00
Replacing one attached font (Comit\& .ttf) file with another one (Arial\& .ttf):
2012-09-02 10:56:54 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- attachment\- name Arial\& .ttf \- \- attachment\- description \* (AqThe Arial font as a TrueType font\* (Aq \- \- replace\- attachment name:Comic\& .ttf:Arial\& .ttf
2012-09-02 10:56:54 +00:00
.fi
.if n \{ \
.RE
. \}
.PP
2014-05-24 18:49:37 +00:00
Deleting the second attached file, whatever it may be:
2012-09-02 10:56:54 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- delete\- attachment 2
2012-09-02 10:56:54 +00:00
.fi
.if n \{ \
.RE
. \}
.PP
2014-05-24 18:49:37 +00:00
Deleting all attached fonts by MIME type:
2012-09-02 10:56:54 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
2014-05-24 18:49:37 +00:00
$ mkvpropedit movie\& .mkv \- \- delete\- attachment mime\- type:application/x\- truetype\- font
2012-09-02 10:56:54 +00:00
.fi
.if n \{ \
.RE
. \}
2014-05-24 18:49:37 +00:00
.SH "EXIT CODES"
2010-02-09 08:13:22 +00:00
.PP
\fB mkvpropedit\fR (1)
2014-05-24 18:49:37 +00:00
exits with one of three exit codes:
2010-02-09 08:13:22 +00:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\fB 0\fR
2014-05-24 18:49:37 +00:00
\- \- This exit codes means that the modification has completed successfully\& .
2010-02-09 08:13:22 +00:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\fB 1\fR
2014-05-24 18:49:37 +00:00
\- \- In this case
2010-02-09 08:13:22 +00:00
\fB mkvpropedit\fR (1)
2014-05-24 18:49:37 +00:00
has output at least one warning, but the modification did continue\& . A warning is prefixed with the text \* (AqWarning:\* (Aq\& . Depending on the issues involved the resulting files might be ok or not\& . The user is urged to check both the warning and the resulting files\& .
2010-02-09 08:13:22 +00:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\fB 2\fR
2014-05-24 18:49:37 +00:00
\- \- This exit code is used after an error occurred\& .
2010-02-09 08:13:22 +00:00
\fB mkvpropedit\fR (1)
2014-05-24 18:49:37 +00:00
aborts right after outputting the error message\& . Error messages range from wrong command line arguments over read/write errors to broken files\& .
2010-02-09 08:13:22 +00:00
.RE
2014-05-24 18:49:37 +00:00
.SH "TEXT FILES AND CHARACTER SET CONVERSIONS"
2014-01-21 20:34:18 +00:00
.PP
For an in\- depth discussion about how all tools in the MKVToolNix suite handle character set conversions, input/output encoding, command line encoding and console encoding please see the identically\- named section in the
\fB mkvmerge\fR (1)
man page\& .
2014-05-24 18:49:37 +00:00
.SH "ESCAPING SPECIAL CHARS IN TEXT"
2010-12-20 19:12:59 +00:00
.PP
2014-05-24 18:49:37 +00:00
There are a few places in which special characters in text must or should be escaped\& . The rules for escaping are simple: each character that needs escaping is replaced with a backslash followed by another character\& .
2010-12-20 19:12:59 +00:00
.PP
2014-05-24 18:49:37 +00:00
The rules are: \* (Aq \* (Aq (a space) becomes \* (Aq\e s\* (Aq, \* (Aq"\* (Aq (double quotes) becomes \* (Aq\e 2\* (Aq, \* (Aq:\* (Aq becomes \* (Aq\e c\* (Aq, \* (Aq#\* (Aq becomes \* (Aq\e h\* (Aq and \* (Aq\e \* (Aq (a single backslash) itself becomes \* (Aq\e \e \* (Aq\& .
.SH "ENVIRONMENT VARIABLES"
2012-02-25 11:44:18 +00:00
.PP
\fB mkvpropedit\fR (1)
2014-05-24 18:49:37 +00:00
uses the default variables that determine the system\* (Aqs locale (e\& .g\& .
2012-02-25 11:44:18 +00:00
\fI LANG\fR
2014-05-24 18:49:37 +00:00
and the
2012-02-25 11:44:18 +00:00
\fI LC_*\fR
2014-05-24 18:49:37 +00:00
family)\& . Additional variables:
2012-02-25 11:44:18 +00:00
.PP
2014-05-24 18:49:37 +00:00
\fI MKVTOOLNIX_DEBUG\fR and its short form \fI MTX_DEBUG\fR
2012-02-25 11:44:18 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
The content is treated as if it had been passed via the
2012-02-25 11:44:18 +00:00
\fB \- \- debug\fR
2014-05-24 18:49:37 +00:00
option\& .
2012-02-25 11:44:18 +00:00
.RE
.PP
2014-05-24 18:49:37 +00:00
\fI MKVTOOLNIX_ENGAGE\fR and its short form \fI MTX_ENGAGE\fR
2012-02-25 11:44:18 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
The content is treated as if it had been passed via the
2012-02-25 11:44:18 +00:00
\fB \- \- engage\fR
2014-05-24 18:49:37 +00:00
option\& .
2012-02-25 11:44:18 +00:00
.RE
2012-02-25 14:09:02 +00:00
.PP
2014-05-24 18:49:37 +00:00
\fI MKVTOOLNIX_OPTIONS\fR and its short form \fI MTX_OPTIONS\fR
2012-02-25 14:09:02 +00:00
.RS 4
2014-05-24 18:49:37 +00:00
The content is split on white space\& . The resulting partial strings are treated as if it had been passed as command line options\& . If you need to pass special characters (e\& .g\& . spaces) then you have to escape them (see
the section about escaping special characters in text)\& .
2012-02-25 14:09:02 +00:00
.RE
2014-05-24 18:49:37 +00:00
.SH "SEE ALSO"
2010-02-09 08:13:22 +00:00
.PP
\fB mkvmerge\fR (1),
\fB mkvinfo\fR (1),
\fB mkvextract\fR (1),
\fB mmg\fR (1)
2014-05-24 18:49:37 +00:00
.SH "WWW"
2010-02-09 08:13:22 +00:00
.PP
2014-05-24 18:49:37 +00:00
The latest version can always be found at
\m[blue]\fBthe MKVToolNix homepage\fR\m[]\&\s-2\u[1] \d \s +2\& .
.SH "AUTHOR"
2010-02-09 08:13:22 +00:00
.PP
\fB Moritz Bunkus\fR <\& moritz@bunkus\& .org\& >
.RS 4
2014-05-24 18:49:37 +00:00
Developer
2010-02-09 08:13:22 +00:00
.RE
2014-05-24 18:49:37 +00:00
.SH "NOTES"
2010-02-09 08:13:22 +00:00
.IP " 1." 4
2014-05-24 18:49:37 +00:00
the MKVToolNix homepage
2010-02-09 08:13:22 +00:00
.RS 4
\% http://www.bunkus.org/videotools/mkvtoolnix/
.RE