1MKVPROPEDIT(1) User Commands MKVPROPEDIT(1)
2
3
4
6 mkvpropedit - Modify properties of existing Matroska(TM) files without
7 a complete remux
8
10 mkvpropedit [options] {source-filename} {actions}
11
13 This program analyses an existing Matroska(TM) file and modifies some
14 of its properties. Then it writes those modifications to the existing
15 file. Among the properties that can be changed are the segment
16 information elements (e.g. the title) and the track headers (e.g. the
17 language code, 'default track' flag or the name).
18
19 Options:
20
21 -l, --list-property-names
22 Lists all known and editable property names, their type (string,
23 integer, boolean etc) and a short description. The program exits
24 afterwards. Therefore the source-filename parameter does not have
25 to be supplied.
26
27 -p, --parse-mode mode
28 Sets the parse mode. The parameter 'mode' can either be 'fast'
29 (which is also the default) or 'full'. The 'fast' mode does not
30 parse the whole file but uses the meta seek elements for locating
31 the required elements of a source file. In 99% of all cases this is
32 enough. But for files that do not contain meta seek elements or
33 which are damaged the user might have to set the 'full' parse mode.
34 A full scan of a file can take a couple of minutes while a fast
35 scan only takes seconds.
36
37 Actions:
38
39 -e, --edit selector
40 Sets the Matroska(TM) file section (segment information or a
41 certain track's headers) that all following add, set and delete
42 actions operate on. This option can be used multiple times in order
43 to make modifications to more than one element.
44
45 See the section about edit selectors for a full description of the
46 syntax.
47
48 -a, --add name=value
49 Adds a property name with the value value. The property will be
50 added even if such a property exists already. Note that most
51 properties are unique and cannot occur more than once.
52
53 -s, --set name=value
54 Sets all occurrences of the property name to the value value. If no
55 such property exists then it will be added.
56
57 -d, --delete name
58 Deletes all occurrences of the property name. Note that some
59 properties are required and cannot be deleted.
60
61 Other options:
62
63 --command-line-charset character-set
64 Sets the character set to convert strings given on the command line
65 from. It defaults to the character set given by system's current
66 locale.
67
68 --output-charset character-set
69 Sets the character set to which strings are converted that are to
70 be output. It defaults to the character set given by system's
71 current locale.
72
73 -r, --redirect-output file-name
74 Writes all messages to the file file-name instead of to the
75 console. While this can be done easily with output redirection
76 there are cases in which this option is needed: when the terminal
77 reinterprets the output before writing it to a file. The character
78 set set with --output-charset is honored.
79
80 --ui-language code
81 Forces the translations for the language code to be used (e.g.
82 'de_DE' for the German translations). It is preferable to use the
83 environment variables LANG, LC_MESSAGES and LC_ALL though. Entering
84 'list' as the code will cause mkvextract(1) to output a list of
85 available translations.
86
87 -v, --verbose
88 Be verbose and show all the important Matroska(TM) elements as
89 they're read.
90
91 -h, --help
92 Show usage information and exit.
93
94 -V, --version
95 Show version information and exit.
96
97 @options-file
98 Reads additional command line arguments from the file options-file.
99 Lines whose first non-whitespace character is a hash mark ('#') are
100 treated as comments and ignored. White spaces at the start and end
101 of a line will be stripped. Each line must contain exactly one
102 option. There is no meta character escaping.
103
104 The command line 'mkvpropedit source.mkv --edit track:a2 --set
105 name=Comments' could be converted into the following option file:
106
107 # Modify source.mkv
108 source.mkv
109 # Edit the second audio track
110 --edit
111 track:a2
112 # and set the title to 'Comments'
113 --set
114 title=Comments
115
116
118 The --edit option sets the Matroska(TM) file section (segment
119 information or a certain track's headers) that all following add, set
120 and delete actions operate on. This stays valid until the next --edit
121 option is found. The argument to this option is called the edit
122 selector.
123
124 Segment information
125 The segment information can be selected with one of these three words:
126 'info', 'segment_info' or 'segmentinfo'. It contains properties like
127 the segment title or the segment UID.
128
129 Track headers
130 Track headers can be selected with a slightly more complex selector.
131 All variations start with 'track:'. The track header properties include
132 elements like the language code, 'default track' flag or the track's
133 name.
134
135 track:n
136 If the parameter n is a number then the nth track will be selected.
137 The track order is the same that mkvmerge(1)'s --identify option
138 outputs.
139
140 track:tn
141 If the parameter starts with a single character t followed by a n
142 then the nth track of a specific track type will be selected. The
143 track type parameter t must be one of these four characters: 'a'
144 for an audio track, 'b' for a button track, 's' for a subtitle
145 track and 'v' for a video track. The track order is the same that
146 mkvmerge(1)'s --identify option outputs.
147
148 track:=uid
149 If the parameter starts with a '=' followed by a number uid then
150 the track whose track UID element equals this uid. Track UIDs can
151 be obtained with mkvinfo(1).
152
153 track:@number
154 If the parameter starts with a '@' followed by a number number then
155 the track whose track number element equals this number. Track
156 number can be obtained with mkvinfo(1).
157
158 Notes
159 Due to the nature of the track edit selectors it is possible that
160 several selectors actually match the same track headers. In such cases
161 all actions for those edit selectors will be combined and executed in
162 the order in which they're given on the command line.
163
165 The following example edits a file called 'movie.mkv'. It sets the
166 segment title and modifies the language code of an audio and a subtitle
167 track. Note that this example can be shortened by leaving out the first
168 --edit option because editing the segment information element is the
169 default for all options found before the first --edit option anyway.
170
171 $ mkvpropedit movie.mkv --edit info --set "title=The movie" --edit track:a1 --set language=fre --edit track:a2 --set language=ita
172
173
174 The second example removes the 'default track flag' from the first
175 subtitle track and sets it for the second one. Note that
176 mkvpropedit(1), unlike mkvmerge(1), does not set the 'default track
177 flag' of other tracks to '0' if it is set to '1' for a different track
178 automatically.
179
180 $ mkvpropedit movie.mkv --edit track:s1 --set flag-default=0 --edit track:s2 --set flag-default=1
181
182
184 mkvpropedit(1) exits with one of three exit codes:
185
186 · 0 -- This exit codes means that the modification has completed
187 successfully.
188
189 · 1 -- In this case mkvpropedit(1) has output at least one warning,
190 but the modification did continue. A warning is prefixed with the
191 text 'Warning:'. Depending on the issues involved the resulting
192 files might be ok or not. The user is urged to check both the
193 warning and the resulting files.
194
195 · 2 -- This exit code is used after an error occurred.
196 mkvpropedit(1) aborts right after outputting the error message.
197 Error messages range from wrong command line arguments over
198 read/write errors to broken files.
199
201 mkvmerge(1), mkvinfo(1), mkvextract(1), mmg(1)
202
204 The latest version can always be found at the MKVToolNix homepage[1].
205
207 Moritz Bunkus <moritz@bunkus.org>
208 Developer
209
211 1. the MKVToolNix homepage
212 http://www.bunkus.org/videotools/mkvtoolnix/
213
214
215
216MkvToolNix 4.4.0 2010-10-31 MKVPROPEDIT(1)