MKVMERGE(1) MKVMERGE(1) NAME mkvmerge - Matroska(TM) mkvmerge [ ] {-o out} [1] {1} [[2] {2}] [@-.json] ( ) Matroska(TM) file; . Matroska(TM) [1] . Important . " " . -v, --verbose . -q, --quiet . -o, --output . . --split . -w, --webm WebM . "webm" . . VP8, VP9 Opus, Vorbis . DocType "webm" . . mkvmerge(1) . --title . : --default-language - --language . ' ' 'und'. ( ) --segmentinfo filename.xml XML . UID, UID, UID . DTD MKVToolNix . segment info XML files . --segment-uid SID1,SID2,... UID . 128 UID , "0x" , 16, 32. SID = , UID Matroska . UID . UID UID . UID UID . ( ) --chapter-language language-code ISO 639-2 . 'eng'. chapters . (: MP4 OGM ) . --generate-chapters . --chapter-charset character-set UTF-8 . mkvmerge(1) text files and character sets . Ogg/OGM MP4 . . --chapter-sync d[,o[/p]] dms . ID -2 --sync ( ID ). o / p: o / p . p 1 . o p . : (d = 0 o / p = 1.0 ) ID . --generate-chapters mode mkvmerge(1) . . o 'when-appending' - 1 . 'parts:' 'parts-frames:' . ( '+' ) 1 . Note mkvmerge(1) . . . o 'interval:time-spec' - time-spec . HH:MM:SS.nnnnnnnnn 's', 'ms' 'us' . : --generate-chapters interval:45s --generate-chapters-name-template . --generate-chapters --chapter-language . --generate-chapters-name-template template --generate-chapters . 'Chapter ' . . '' . '' . The strings '' and '' are only filled when generating chapters for appended files. They will be replaced by the appended file's name without respectively with its extension. Note that only the file's base name and extension are inserted, not its directory or drive components. '' . : '' 0 . . '%H:%M:%S' . . o %h - o %H - zero-padded o %m - o %M - zero-padded o %s - o %S - zero-padded o %n - nanoseconds with nine places o %<1-9>n - nanoseconds with up to nine places (e.g. three places with %3n) --cue-chapter-name-format format mkvmerge(1) CUE . CUE PERFORMER TITLE . mkvmerge(1) . . mkvmerge(1) '%p - %t'(performer, , , ) . . o %p PERFORMER . o %t TITLE . o %n . o %N <10 leading 0 . --chapters file-name file-name . chapters . --global-tags file-name file-name . tags . ( ) --track-order FID1:TID1,FID2:TID2,... . ID . ID(FID1) , 0 . ID(TID1). ID . If this option isn't given, tracks will be sorted by their type first & the order of their source file second. Video tracks come first followed by audio & subtitle tracks. Other rarely used track types come last. --cluster-length spec . spec n ms d . mkvmerge(1) n . 65535. d 'ms' mkvmerge(1) d . d 100ms, 32000ms. mkvmerge(1) 65535 5000ms . . . --clusters-in-meta-seek mkvmerge(1) . Matroska(TM) file layout . --timestamp-scale factor factor . 1000..10000000 -1. mkvmerge(1) 1000000 . , 1ms . mkvmerge(1) . . -1 mkvmerge(1) . --enable-durations . . --no-cues mkvmerge(1) AVI . Matroska(TM) . . --cues . --no-date mkvmerge(1) "" & . . --disable-lacing . . . --disable-track-statistics-tags mkvmerge(1) . . BPS, DURATION, NUMBER_OF_BYTES NUMBER_OF_FRAMES . mkvmerge(1) . --disable-language-ietf mkvmerge(1) , IETF BCP 47 . . --normalize-language-ietf mode IETF BCP 47 'canonical' , 'extlang' 'off' . . . 'zh-yue-jyutping' 'yue-jyutping' 'fr-FX' 'fr-FR' . . . 'yue-jyutping' 'zh-yue-jyutping' 'fr' 'fr-FR' . --stop-after-video-ends Stops processing after the primary video track ends, discarding any remaining packets of other tracks. , , ( ) --split specification . . . mkvmerge(1) . 1. . : --split [size:]d[k|m|g] : --split size:700m or --split 150000000 d KB, MB GB 'k', 'm' 'g' . . . 'size:' . 2. . : --split [duration:]HH:MM:SS.nnnnnnnnn|ds : --split duration:00:60:00.000 or --split 3600s HH:MM:SS.nnnnnnnn () 's' d . HH , MM , SS , nnnnnnnn . . 9 . . 'duration:' . 3. . : --split timestamps:A[,B[,C...]] : --split timestamps:00:45:00.000,01:20:00.250,6300s A, B, C ( ). . . . 'timestamps:' . 4. . : --split parts:start1-end1[,[+]start2-end2[,[+]start3-end3...]] : 1. --split parts:00:01:20-00:02:45,00:05:50-00:10:30 2. --split parts:00:01:20-00:02:45,+00:05:50-00:10:30 3. --split parts:-00:02:45,00:05:50- parts mkvmerge(1) . parts: . --split (: 00:01:20 80s ). . ( 3 ). mkvmerge(1) ( 3 ). . . + . mkvmerge(1) . . 1 mkvmerge(1) . 00:01:20 00:02:45 . 00:05:50 00:10:30 . 2 mkvmerge(1) . 00:01:20 00:02:45 00:05:50 00:10:30 . 3 mkvmerge(1) . 00:02:45 . 00:05:50 . Note mkvmerge(1) . . . 5. / . : --split parts-frames:start1-end1[,[+]start2-end2[,[+]start3-end3...]] : 1. --split parts-frames:137-258,548-1211 2. --split parts-frames:733-912,+1592-2730 3. --split parts-frames:-430,2512- parts-frames mkvmerge(1) / . parts-frames: . / . 1 . . ( 3 ). mkvmerge(1) ( 3 ). . . + . mkvmerge(1) . . Note mkvmerge(1) . . / . 1 mkvmerge(1) . 137 258 . 548 1211 . 2 mkvmerge(1) . 733 912 1592 2730 . 3 mkvmerge(1) . 430 . 2512 . . . Note Matroska(TM) . Matroska(TM) ( ) ( ) . mkvmerge . : 25 50( ) . 6. / . : --split frames:A[,B[,C...]] : --split frames:120,237,891 A, B, C . 1. / . / . . 'frames:' . . . Note Matroska(TM) . Matroska(TM) ( ) ( ) . mkvmerge . : 25 50( ) . 7. . : --split chapters:all or --split chapters:A[,B[,C...]] : --split chapters:5,8 A, B, C . 1. . . 0s . all . 'chapters:' . Note Matroska(TM) 'edition entries' 'chapter atoms' . . . (: '%02d') '%d' printf . . '-%03d' : '-o output.mkv' 'output-001.mkv' . '-%03d' . '%c', . '%c' '-%03d' . --link . file linking . --link-to-previous segment-UID segment-UID UID . file linking . SID = , UID Matroska . --link-to-next segment-UID segment-UID UID . file linking . SID = , UID Matroska . --append-mode mode . mode 'file' 'track' . mkvmerge ('file2' ) ('track2_1' ) ('file1' ) ('track1_1' ) , 'track2_1' . 'file' 'track1_1' 'file1' . 'track1_1' . mkvmerge . file . 'file' AVI MP4 . 'track' (: VOB EVO ) . 'track' 'file' . --append-to SFID1:STID1:DFID1:DTID1[,...] . ID, ID, ID, ID ID . " ID" " ID" . " ID" " ID" . . ID . ID mkvmerge -o output.mkv part1.mkv +part2.mkv . + '+' . '+' . . $ mkvmerge -o full.mkv file1.mkv + file2.mkv $ mkvmerge -o full.mkv file1.mkv +file2.mkv [ file1 file2 ] . '+' . . $ mkvmerge -o full.mkv file1.mkv + file2.mkv $ mkvmerge -o full.mkv '[' file1.mkv file2.mkv ']' = (MPEG = VOBs) (: 'VTS_01_1)' .VOB', 'VTS_01_2.VOB', 'VTS_01_3.VOB' ) . '=' mkvmerge . '=' . . $ mkvmerge -o full.mkv = file1.vob $ mkvmerge -o full.mkv =file1.vob ( file1 file2 ) . DVD MPEG VOB . AVI MP4 . mkvmerge(1) option = . . $ mkvmerge -o out.mkv = file.mkv $ mkvmerge -o out.mkv '(' file.mkv ')' : 1. . 2. . . 3. . escape . ( ) --attachment-description . --attach-file --attach-file-once . --attachment-mime-type MIME type MIME . --attach-file --attach-file-once . MIME the IANA hompage[2] . MIME . MIME . --attachment-name name . --attach-file --attach-file-once . --attach-file file-name, --attach-file-once file-name Matroska(TM) . MIME . --attach-file --attach-file-once . . mkvextract(1) Matroska(TM) . --enable-legacy-font-mime-types MIME . TrueType 'fonts/ttf' 'application/x-truetype-font' . MIME MIME . MIME 'application/x-truetype-fonts' 'font/sfnt' 'font/ttf', 'font/collection' 'application/vnd.ms-opentype' 'font/otf' . -a, --audio-tracks [!]n,m,... n, m . --identify ID. ( track IDs ). : . ID ISO 639-2 . . : . ID ! : ! . -d, --video-tracks [!]n,m,... n, m . --identify ID. ( track IDs ). : . ID ISO 639-2 . . ID ! : ! . -s, --subtitle-tracks [!]n,m,... n, m . --identify ID. ( track IDs ). : . ID ISO 639-2 . . ID ! : ! . -b, --button-tracks [!]n,m,... n, m . --identify ID. ( track IDs ). : . ID ISO 639-2 . . ID ! : ! . --track-tags [!]n,m,... n, m . --identify ID( track IDs ). . : . ID ! . ! ID . -m, --attachments [!]n[:all|first],m[:all|first],... ID n, m . ID ':all'( ) ':first' . ID ':all' . . . ID ! . ! ID . -A, --no-audio . -D, --no-video . -S, --no-subtitles . -B, --no-buttons . -T, --no-track-tags . --no-chapters . -M, --no-attachments . --no-global-tags . -y, --sync TID:d[,o[/p]] ID TID dms . ID --identify ID ( track IDs ). o / p: o / p . p 1 . o p . : (d = 0 o / p = 1.0 ) ID . --cues TID:none|iframes|all () ( track IDs ). 'none' . 'iframes' ( = I ) . 'all' . 'iframes' 'none'. --cues --no-cues . ID . --default-track-flag TID[:bool] bool 1 " track" ( track IDs ). . " , . ID . --track-enabled-flag TID[:bool] ( track IDs ) "track enabled" bool(0 1; 1) . . "track enabled" . ID . --forced-display-flag TID[:bool] bool 1 ( track IDs ) "forced display" . . ID . --hearing-impaired-flag TID[:bool] bool 1 ( track IDs ) " " . . ID . --visual-impaired-flag TID[:bool] bool 1 ( track IDs ) " " . . ID . --text-descriptions-flag TID[:bool] bool 1 ( track IDs ) " " . . ID . --original-flag TID[:bool] bool 1 ( track IDs ) "original language" . ( ) . ID . --commentary-flag TID[:bool] bool 1 ( track IDs ) "commonmentary" . . ID . --track-name TID:name name ( track IDs ). --language TID:language ( track IDs ). ISO 639-2 ISO 639-1 . . ISO 639-2 --list-languages . ID . -t, --tags TID:file-name file-name TID . tags . --aac-is-sbr TID[:0|1] mkvmerge(1) ID TID SBR AAC(HE-AAC AAC+ ) . a) AAC (Matroska(TM) not) b) AAC SBR AAC . AAC AAC SBR AAC . AAC mkvmerge(1) . SBR AAC . . Matroska(TM) CodecID SBR AAC . , CodecID . mkvmerge AAC SBR ID ':0' . --audio-emphasis TID:n|symbolic-name Sets the emphasis for the audio track with the track ID TID. The mode can either be a number n (certain values between 0 and 16) or a symbolic name. All valid numbers & symbolic names can be listed with the --list-audio-emphasis option. --reduce-to-core TID . mkvmerge(1) . mkvmerge(1) . DTS . AC-3 TrueHD . DTS True HD TrueHD . --remove-dialog-normalization-gain TID ( ) . mkvmerge(1) . AC-3' DTS TrueHD . --timestamps TID:file-name file-name ID . mkvmerge(1) . external timestamp files . --default-duration TID:x . . x 's', 'ms', 'us', 'ns', 'fps', 'p' 'i' , , , , 'frames per second', 'progress frames per second', 'interlaced frames per second' . x . mkvmerge / (: AVC/H.264 MPEG-2) . FPS . --fix-bitstream-timing-information TID[:0|1] mkvmerge(1) (/ ) . . ( --default-duration ), . Note AVC/H.264 . --compression TID:n . . 'none', 'zlib' 'mpeg4_p2'/'mpeg4p2'. 'mpeg4_p2'/'mpeg4p2' MPEG4 2 'header removal' . 'zlib' . . 'none' . -f, --fourcc TID:FourCC FourCC . 'MS ' . --display-dimensions TID:widthxheight Matroska(TM) ( ) . '1:640x480' . --aspect-ratio --aspect-ratio-factor ( ). . --aspect-ratio TID:ratio|width/height Matroska(TM) ( ) . mkvmerge(1) . ratio 'width/height' (: '16/9'). --aspect-ratio-factor --display-dimensions ( ). . --aspect-ratio-factor TID:factor|n/d factor . factor . --aspect-ratio --display-dimensions ( ). . --cropping TID:left,top,right,bottom . --color-matrix-coefficients TID:n , . n 0 10 . : 0: GBR, 1: BT709, 2: unspecified, 3: reserved, 4: FCC, 5: BT470BG, 6: SMPTE 170M, 7: SMPTE 240M, 8: YCOCG, 9: BT2020 non-constant luminance, 10: BT2020 constant luminance --color-bits-per-channel TID:n . 0 . --chroma-subsample TID:hori,vert / Cr Cb . : 4:2:0 TID:1,1 . --cb-subsample TID:hori,vert / Cb . --chroma-subsample . : 4:2:1 --chroma-subsample TID:1,0 Cb-subsample TID:1,0 . --chroma-siting TID:hori,vert / (0: , 1: , 2: ). --color-range TID:n (0: , 1: , 2: ( ), 3: MatrixCoefficients/TransferCharacteristics ). --color-transfer-characteristics TID:n . : 0: reserved, 1: ITU-R BT.709, 2: unspecified, 3: reserved, 4: gamma 2.2 curve, 5: gamma 2.8 curve, 6: SMPTE 170M, 7: SMPTE 240M, 8: linear, 9: log, 10: log sqrt, 11: IEC 61966-2-4, 12: ITU-R BT.1361 extended color gamut, 13: IEC 61966-2-1, 14: ITU-R BT.2020 10 bit, 15: ITU-R BT.2020 12 bit, 16: SMPTE ST 2084, 17: SMPTE ST 428-1; 18: ARIB STD-B67 (HLG) --color-primaries TID:n . : 0: reserved, 1: ITU-R BT.709, 2: unspecified, 3: reserved, 4: ITU-R BT.470M, 5: ITU-R BT.470BG, 6: SMPTE 170M, 7: SMPTE 240M, 8: FILM, 9: ITU-R BT.2020, 10: SMPTE ST 428-1, 22: JEDEC P22 phosphors --max-content-light TID:n (Maximum Content Light Level) (cd/m^2) . n . --max-frame-light TID:n (Maximum Frame-Average Light Level) (cd/m^2) . n . --chromaticity-coordinates TID:red-x,red-y,green-x,green-y,blue-x,blue-y R/G/B CIE 1931 . --white-color-coordinates TID:x,y CIE 1931 . --max-luminance TID:float (cd/m^2) . 9999.99 . --min-luminance TID:float (cd/m^2) . 999.9999 . --projection-type TID:method . 0( ), 1( ), 2( ) 3( ). --projection-private TID:data . "0x" 16 . --projection-pose-yaw TID:float (yaw) . --projection-pose-pitch TID:float (pitch) . --projection-pose-roll TID:float (roll) . --field-order TID:n ID TID . . 0: , 1: , 2: , 6: , 9: , 14: --stereo-mode TID:n|symbolic-name 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 a symbolic name. All valid numbers & names can be listed with the --list-stereo-modes option. --sub-charset TID:character-set ID UTF-8 UTF-8 . . UTF-8 Matroska(TM) Kate . mkvmerge(1) text files and character sets . ID . -i, --identify file-name mkvmerge(1) , ID . . --identification-format . -J file-name "--identification-format json --identify file-name" . -F, --identification-format format --identify option . text( ) json . 1. text . (, , ). . mkvmerge(1)uses (: --ui-language). 2. json JSON . JSON . mkvmerge-identification-output-schema-v18.json[3] JSON . --probe-range-percentage percentage MPEG (.vob, .m2ts) . 0.3% 10MB . probe . 10MB . --list-audio-emphasis Lists all valid numbers & their corresponding symbolic names for the --audio-emphasis option. --list-languages --language ISO 639-2 . --list-stereo-modes Lists all valid numbers & their corresponding symbolic names for the --stereo-mode option. -l, --list-types . --priority priority mkvmerge(1) . 'lowest', 'lower', 'normal', 'higher' 'highest'. 'normal' . mkvmerge(1) nice(2) . 'higher' 'highest' . Windows . 'lowest' mkvmerge(1) I/O . --command-line-charset . . --title, --track-name --attachment-description . --output-charset . . -r, --redirect-output file-name . . --output-charset . --flush-on-close . . mkvmerge . MKVToolNix #2469 #2480 . --ui-language (: 'de_DE'). 'list' mkvextract(1) . --abort-on-warnings . 1. --deterministic seed mkvmerge(1) , . "" . . . 1. libEBML libMatroska mkvmerge(1) . 2. . 3. (--output ... ). mkvmerge(1) . --debug . . --engage . mkvmerge --engague list . . --gui-mode GUI . GUI . '#GUI#message' . '#GUI#message#key1=value1#key2=value2...' / . . @ .json options-file . option files . --capabilities . . . . o 'FLAC' - FLAC (: Ogg(TM) Matroska(TM)) FLAC . -h, --help . -V, --version . mkvmerge(1) . -o . ( ) -l . Important . " " . . . 1. . --command-line-charset, --output --title . . 2. . . ( ) . --no-chapterset --chapter-charset . --default-duration --language . . . " . ". $ mkvmerge -o output.mkv --title 'This and that' input.avi --title 'Something else' --language . ID . $ mkvmerge -o output.mkv --language 0:fre francais.ogg --language 0:deu deutsch.ogg MyMovie MyMovie.wav' . OggVorbis(TM) . $ oggenc -q4 -oMyMovie.ogg MyMovie.wav . $ mkvmerge -o MyMovie-with-sound.mkv MyMovie.avi MyMovie.ogg AVI (mkvmerge(1) ). . $ mkvmerge -o MyMovie-with-sound.mkv -A MyMovie.avi MyMovie.ogg (: ) 'MyMovie-add-audio.wav' . . $ oggenc -q4 -oMyMovie-add-audio.ogg MyMovie-add-audio.wav $ mkvmerge -o MM-complete.mkv MyMovie-with-sound.mkv MyMovie-add-audio.ogg . $ mkvmerge -o MM-complete.mkv -A MyMovie.avi MyMovie.ogg MyMovie-add-audio.ogg mplayer(TM) . ( ) '-vid' '-aid' mplayer(TM) . 0 . . Vorbis ID . $ mkvmerge --identify outofsync.ogg ID . $ mkvmerge -o goodsync.mkv -A source.avi -y 12345:200 outofsync.ogg 'outofsync.ogg' ID 12345 200ms . . . . . , 77340 0.2 . 29.97fps 0.2 6 . $ mkvmerge -o goodsync.mkv -y 23456:0,77346/77340 outofsync.mkv . . Windows (SubRipper(TM) ) 'contrib/subrip' transcode(1) subrip(TM) . . 1. : $ tccat -i /path/to/copied/dvd/ -T 1 -L | tcextract -x ps1 -t vob -a 0x20 | subtitle2pgm -o mymovie 2. PGM gocr . $ pgm2txt mymovie 3. . $ ispell -d american *txt 4. SRT . $ srttool -s -w -i mymovie.srtx -o mymovie.srt mkvmerge(1) . $ mkvmerge -o mymovie.mkv mymovie.avi mymovie.srt . ISO 639-2 . mkvmerge(1) . $ mkvmerge --list-languages . Matroska(TM) ID 2 3 . . $ mkvmerge -o with-lang-codes.mkv --language 2:ger --language 3:dut without-lang-codes.mkv --language . . . . $ mkvmerge -o with-lang-codes.mkv --language 2:ger --language 3:dut --default-track-flag 3 without-lang-codes.mkv --language 0:eng english.srt --default-track-flag 0 --language 0:fre french.srt mkvinfo(1) default values . . $ mkvmerge -o no-compression.mkv --compression -1:none MyMovie.avi --compression -1:none mymovie.srt ID ID mkvmerge(1) ID . ID mkvmerge(1) --identify . . $ mkvmerge -i v.mkv File 'v.mkv': container: Matroska(TM) Track ID 0: video (V_MS/VFW/FOURCC, DIV3) Track ID 1: audio (A_MPEG/L3) MKV ID ID . ID . ID . 'mkvmerge --identify' 'file1.ext' ID 'file1.ext' . ID . o AVI : ID 0. 1 ID . o AAC, AC-3, MP3, SRT WAV : '' ID 0 . o : ID 0 . ID 'TID' . --audio tracks, --video-tracks, --subtitle-tracks, --button-tracks --track-tags . ID ID . ID '-1' . ID '-2' . --sync ID . --sync-2:... --chapter-sync... . LANGUAGE HANDLING Matroska(TM) has support for two different types of language elements: the old, deprecated "Language" element containing ISO 639-2 alpha 3 codes and the new "LanguageIETF" tags containing IETF BCP 47 language tags. All of mkvmerge(1)'s options that accept a language accept a BCP 47 language tag. mkvmerge(1) will derive the value for the deprecated "Language" element from the BCP 47 language tags wherever possible. When identifying a file in JSON mode, existing "LanguageIETF" track header elements will be output as the language_ietf track property. When writing a file mkvmerge(1) will always write the "LanguageIETF", "ChapLanguageIETF" and "TagLanguageIETF" elements (the latter two only if chapters or tags are written respectively). In addition to those elements the corresponding old elements will be written; they'll be set to the ISO 639-2 code portion of the BCP 47 language tag. For example, when the track language is set to sr-Cyrl-RS "LanguageIETF" will be set to sr-Cyrl-RS and the old "Language" element will be set to srp. When reading existing files (Matroska files, XML chapter or tag files etc.) that already contain "...LanguageIETF" elements the existing elements will be kept. Otherwise "...LanguageIETF" elements will be added based on command-line options and other existing deprecated "...Language" elements. The creation of the new elements can be disabled completely with the command-line option --disable-language-ietf which operates on all three new elements. You can chose the normalization method applied to extended language sub-tags with the parameter --normalize-language-ietf. Note mkvmerge(1) MKVToolNix . Matroska(TM) UTF-8 . mkvmerge(1) UTF-8 . mkvmerge(1) UTF-8 . , --ui-language Matroska(TM) . mkvmerge(1) ( : BOM) . mkvmerge(1) . (BOM) BOM UTF-8, UTF-16 little, big endian, UTF-32 little, big endian . BOM UTF-8 . (: --sub-charset) . MacOS Linux Unix mkvmerge(1) LANG, LC_ALL, LC_CYPE setlocale(3) . UTF-8 ISO-8859-* . Windows GetACP() . GetCommandLineW() . --command-line-charset Windows . : 1. --redirect-output UTF-8. --output-charset . 2. cmd.exe (: mkvinfo file.mkv > info.txt) UTF-8 . 3. ( ) Windows WriteConsoleW() --output-charset . (: Windows ). : o --sub-charset (: Ogg ) o --chapter-charset (: , Ogg , MP4 ), o --command-line-charset o --output-charset --redirect-output . Windows . Windows --redirect-output cmd.exe (: mkvinfo file.mkv > info.txt) UTF-8 . mkvmerge(1) . . JSON . JSON JSON . UTF-8 . BOM . JSON JSON RFC 7159[4] . '@' . 'mkvmerge -o "myfile.mkv" -A "movie.avi" sound.ogg' 'options.json' JSON . [ "-o", "c:\\Matroska\\my file.mkv", "--title", "#65", "-A", "a movie.avi", "sound.ogg" ] 'mkvmerge @options.json' . Matroska(TM) . , Matroska(TM) . Matroska(TM) , ' ' ' ' . 128 UID . UID mkvmerge(1) . / UID( : SID) . mkvinfo(1) SIDs . 0 . (: ) . 0 . mkvmerge(1) . --link . . mkvmerge(1) SIDs . --link-to-previous --link-to-next . mkvinfo(1) SID . '0x410xda 0x730x660xd90xcf 0xb20 0x1e 0x780xebb4 0x5 0xca0x93' 0x00 0xff '0x' 16. '0x' 0x00 0xff 16 16 (: '41da7366d9cfb21e78eb45ecab393' --link-to-previous SID --link-to-next SID . SIDs . Matroska(TM) . . mkvinfo(1) language default track flag . language ('eng') default track flag true. --language 0:eng mkvinfo(1) . Matroska(TM) SSA TrueType(TM) . Matroska(TM) . . ('' ) ('TrueType(TM) ' ) . TrueType(TM) . $ mkvmerge -o output.mkv -A video.avi sound.ogg \ --attachment-description "Me and the band behind the stage in a small get-together" \ --attachment-mime-type image/jpeg \ --attach-file me_and_the_band.jpg \ --attachment-description "The real rare and unbelievably good looking font" \ --attachment-mime-type application/octet-stream \ --attach-file really_cool_font.ttf Matroska(TM) mkvmerge(1) . --attachments --no-attachments . Matroska(TM) OGM . the Matroska(TM) website[1] . mkvmerge(1) . ' ' OGM . Matroska(TM) XML . mkvmerge(1) (: MP4, Ogg, Blu-ray DVD) . 'CHAPterxx=' 'CHAPterxxNAME=' . . . CHAPTER01=00:00:00.000 CHAPTER01NAME=Intro CHAPTER02=00:02:30.000 CHAPTER02NAME=Baby prepares to rock CHAPTER03=00:02:42.300 CHAPTER03NAME=Baby rocks the house mkvmerge(1) will transform every pair or lines into one Matroska(TM) ChapterAtom. It does not set any ChapterTrackNumber which means that all chapters apply to all tracks in the file. . mkvmerge(1) text files and character sets . XML XML . 00:00:30.000 00:01:20.000 A short chapter eng 00:00:46.000 00:01:10.000 A part of that short chapter eng . 1. . 2. . 3. . mkvtoolix doc . XML , ( ) . Chapters (master) EditionEntry (master) EditionUID (unsigned integer, valid range: 1 <= value) EditionFlagHidden (unsigned integer, valid range: 0 <= value <= 1) EditionFlagDefault (unsigned integer, valid range: 0 <= value <= 1) EditionFlagOrdered (unsigned integer, valid range: 0 <= value <= 1) ChapterAtom (master) ChapterAtom (master) ChapterUID (unsigned integer, valid range: 1 <= value) ChapterTimeStart (unsigned integer) ChapterTimeEnd (unsigned integer) ChapterFlagHidden (unsigned integer, valid range: 0 <= value <= 1) ChapterFlagEnabled (unsigned integer, valid range: 0 <= value <= 1) ChapterSegmentUID (binary, valid range: 1 <= length in bytes) ChapterSegmentEditionUID (unsigned integer, valid range: 1 <= value) ChapterPhysicalEquiv (unsigned integer) ChapterTrack (master) ChapterTrackNumber (unsigned integer, valid range: 1 <= value) ChapterDisplay (master) ChapterString (UTF-8 string) ChapterLanguage (UTF-8 string) ChapterCountry (UTF-8 string) ChapterProcess (master) ChapterProcessCodecID (unsigned integer) ChapterProcessPrivate (binary) ChapterProcessCommand (master) ChapterProcessTime (unsigned integer) ChapterProcessData (binary) Blu-ray mkvmerge(1) Blu-ray . --chapters MPLS . : --chapters /srv/blurays/BigBuckBunny/BDMV/PLAYLIST/00001.mpls DVD MKVToolNix libdvdvdread(TM) mkvmerge(1) DVD . --chapters DVD . DVD . 1 . : --chapters /srv/dvds/BigBuckBunny/VIDEO_TS:2 mkvmerge(1) . , , . --no-filename Matroska(TM) . (Matroska(TM) , Ogg , MP4 , ) ChapterEdition . UID Matroska(TM) XML ChapterEdition . , mkvextract(1) . XML . Matroska(TM) KEY=VALUE . Matroska(TM) KEY VALUE . example-tags-2.xml . Matroska(TM) . , , , . Matroska(TM) [5] . Targets Matroska(TM) , UID IDnotmkvmerge(1) . mkvmerge(1) ( Matroska(TM) ) Matroska(TM) UID. mkvmerge(1) UID . Matroska(TM) : --global-tags --tags . --global-tags Targets . --tags --tags TID mkvmerge(1) UID . AVI . mkvmerge --identify file.avi ID( ID UID !) 0 . Targets mkvmerge(1) . $ mkvmerge -o file.mkv --tags 0:tags.xml file.avi &vmerge; XML . Matroska(TM) specification[5] . MKVToolNix example-tags-2.xml , . : o . o XML tags . o . Matroska(TM) UTF-8 . , . XML mkvmerge(1) . XML '@' . Matroska(TM) . Base64 . ASCII , . mkvextract(1) Base64 . . mkvmerge(1) , . XML XML , ( ) . Tags (master) Tag (master) Targets (master) TargetTypeValue (unsigned integer) TargetType (UTF-8 string) TrackUID (unsigned integer) EditionUID (unsigned integer) ChapterUID (unsigned integer) AttachmentUID (unsigned integer) Simple (master) Simple (master) Name (UTF-8 string) TagLanguage (UTF-8 string) DefaultLanguage (unsigned integer) String (UTF-8 string) Binary (binary) XML Matroska(TM) " " . . " " XML . --title --timestamp-scale . XML . DateUTC( "muxing date" ), MuxingApp, WritingApp Duration . mkvmerge(1) . XML , ( ) . Info (master) SegmentUID (binary, valid range: length in bytes == 16) SegmentFilename (UTF-8 string) PreviousSegmentUID (binary, valid range: length in bytes == 16) PreviousSegmentFilename (UTF-8 string) NextSegmentUID (binary, valid range: length in bytes == 16) NextSegmentFilename (UTF-8 string) SegmentFamily (binary, valid range: length in bytes == 16) ChapterTranslate (master) ChapterTranslateEditionUID (unsigned integer) ChapterTranslateCodec (unsigned integer) ChapterTranslateID (binary) MATROSKA(TM) Matroska(TM) . &vmerge; . : [EBML head] [segment {meta seek #1} [segment information] [track information] {attachments} {chapters} [cluster 1] {cluster 2} ... {cluster n} {cues} {meta seek #2} {tags}] . : o #1 1 , , , , , #2 . mkvmerge(1) . . . #2 #1 #2 . o , . Matroska(TM) . [EBML head] [segment [segment information] [track information] [cluster 1]] . . . mkvmerge(1) Matroska(TM) . . AC-3 1536 . . , v1.avi v2.avi . $ mkvmerge ... --timestamps 0:my_timestamps.txt v1.avi +v2.avi mkvmerge(1) . . , '#' . v1 . . . (0 ), . FPS '.' . FPS . : # timestamp format v1 assume 27.930 800,1000,25 1500,1700,30 v2 . . . . . 25fps : # timestamp format v2 0 40 80 v3 () . . . . 0.0 . 'gap' . : # timestamp format v3 assume 0.0 25.325 7.530,38.236 gap, 10.050 2.000,38.236 v4 v2 . . . &vmerge; : o 0 - muxing . o 1 -- mkvmerge(1) , muxing . 'Warning:' . . . o 2 - . . / . mkvmerge(1) (: LANG LC_* ) . : MKVMERGE_DEBUG, MKVTOOLNIX_DEBUG and its short form MTX_DEBUG --debug . MKVMERGE_ENGAGE, MKVTOOLNIX_ENGAGE MTX_ENGAGE --engage . mkvinfo(1), mkvextract(1), mkvpropedit(1), mkvtoolnix-gui(1) WWW MKVToolNix [6] . AUTHOR Moritz Bunkus NOTES 1. Matroska(TM) https://www.matroska.org/ 2. the IANA hompage https://www.iana.org/assignments/media-types/ 3. mkvmerge-identification-output-schema-v18.json https://mkvtoolnix.download/doc/mkvmerge-identification-output- schema-v18.json 4. RFC 7159 https://tools.ietf.org/html/rfc7159 5. Matroska(TM) https://www.matroska.org/technical/specs/index.html 6. MKVToolNix https://mkvtoolnix.download/ MKVToolNix 83.0 2024-03-10 MKVMERGE(1)