MKVEXTRACT(1) | MKVEXTRACT(1) |
名前¶
mkvextract - Matroska ファイルから、他の形式のファイルを抽出する書式¶
mkvextract {source-filename} {mode1} [options] [extraction-spec1] [mode2] [options] [extraction-spec2] [...]
説明¶
This program extracts specific parts from a Matroska file to other useful formats. The first argument is the name of the source file which must be a Matroska file.All other arguments either switch to a certain extraction mode, change options for the currently active mode or specify what to extract into which file. Multiple modes can be used in the same invocation of mkvextract allowing the extraction of multiple things in a single pass. Most options can only be used in certain modes with a few options applying to all modes.
Currently supported is the extraction of tracks, tags, attachments, chapters, CUE sheets, timestamps and cues.
共通オプション¶
以下のオプションは、全てのmodeで使用できるので、このセクションで一括して説明します。-f, --parse-fully
--command-line-charset character-set
--output-charset character-set
-r, --redirect-output file-name
--flush-on-close
--ui-language code
--abort-on-warnings
--debug topic
--engage feature
--gui-mode
-v, --verbose
-h, --help
-V, --version
@options-file.json
トラック抽出モード¶
Syntax: mkvextract source-filename tracks [options] TID1:dest-filename1 [TID2:dest-filename2 ...]以下のコマンドラインオプションは、トラック抽出モードでは各トラック毎に指定することができます。これらのオプションは、作用するトラック指定子(下記参照)の前に指定しなければなりません。
-c character-set
--blockadd level
--cuesheet
--raw
--fullraw
TID:outname
各出力ファイル名は一回しか使用されません。RealAudio及びRealVideoトラックは例外です。もし、異なるトラックに同じファイル名が指定された場合、それらは同一のファイルに保存されます。例:
$ mkvextract input.mkv tracks 0:video.h264 2:output-two-vobsub-tracks.idx 3:output-two-vobsub-tracks.idx
添付ファイル抽出モード¶
Syntax: mkvextract source-filename attachments [options] AID1:outname1 [AID2:outname2 ...]AID:outname
チャプタ抽出モード¶
Syntax: mkvextract source-filename chapters [options] output-filename.xml-s, --simple
--simple-language language
Using this option allows the user to determine which chapter names are output if atoms contain more than one chapter name. The language parameter must be an ISO 639-1 or ISO 639-2 code.
The chapters are written to specified output file. By default the XML format understood by mkvmerge(1) is used. If no chapters are found in the file, the output file is not created.
タグ抽出モード¶
Syntax: mkvextract source-filename tags [options] output-filename.xmlThe tags are written to specified output file in the XML format understood by mkvmerge(1). If no tags are found in the file, the output file is not created.
CUEシート抽出モード¶
Syntax: mkvextract source-filename cuesheet [options] output-filename.cueThe cue sheet is written to specified output file. If no chapters or tags are found in the file, the output file is not created.
タイムコード抽出モード¶
Syntax: mkvextract source-filename timestamps_v2 [options] TID1:dest-filename1 [TID2:dest-filename2 ...]TID:outname
例:
$ mkvextract input.mkv timestamps_v2 1:ts-track1.txt 2:ts-track2.txt
Cues extraction mode¶
Syntax: mkvextract source-filename cues [options] TID1:dest-filename1 [TID2:dest-filename2 ...]TID:dest-filename
The format output is a simple text format: one line per CuePoint element with key=value pairs. If an optional element is not present in a CuePoint (e.g. CueDuration) then a dash will be output as the value.
例:
timestamp=00:00:13.305000000 duration=- cluster_position=757741 relative_position=11
The possible keys are:
timestamp
duration
cluster_position
注記
Inside the Matroska file the CueClusterPosition is relative to the segment's data start offset. The value output by mkvextract(1)'s cue extraction mode, however, contains that offset already and is an absolute offset from the beginning of the file.
relative_position
注記
Inside the Matroska file the CueRelativePosition is relative to the cluster's data start offset. The value output by mkvextract(1)'s cue extraction mode, however, is relative to the cluster's ID. The absolute position inside the file can be calculated by adding cluster_position and relative_position.
例:
$ mkvextract input.mkv cues 1:cues-track1.txt 2:cues-track2.txt
例¶
Extracting both chapters and tags in their respective XML formats at the same time:$ mkvextract movie.mkv chapters movie-chapters.xml tags movie-tags.xml
Extracting a couple of tracks and their respective timestamps at the same time:
$ mkvextract "Another Movie.mkv" tracks 0:video.h265 "1:main audio.aac" "2:director's comments.aac" timestamps_v2 "0:timestamps video.txt" "1:timestamps main audio.txt" "2:timestamps director's comments.txt"
Extracting chapters in the Ogg/OGM format and re-encoding a text subtitle track to another character set:
$ mkvextract "My Movie.mkv" chapters --simple "My Chapters.txt" tracks -c MS-ANSI "2:My Subtitles.srt"
テキストファイルと文字コード変換¶
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 mkvmerge(1) man page.出力ファイルフォーマット¶
出力ファイルのフォーマットの決定は、トラックの種類によって決まり、出力ファイル名の拡張子は使用されません。現在、以下の種類のトラックがサポートされています。A_AAC/MPEG2/*, A_AAC/MPEG4/*, A_AAC
A_AC3, A_EAC3
A_ALAC
A_DTS
A_FLAC
A_MPEG/L2
A_MPEG/L3
A_OPUS
A_PCM/INT/LIT, A_PCM/INT/BIG
A_REAL/*
A_TRUEHD, A_MLP
A_TTA1
A_VORBIS
A_WAVPACK4
S_HDMV/PGS
S_HDMV/TEXTST
S_KATE
S_TEXT/SSA, S_TEXT/ASS, S_SSA, S_ASS
S_TEXT/UTF8, S_TEXT/ASCII
S_VOBSUB
S_TEXT/USF
S_TEXT/WEBVTT
V_MPEG1, V_MPEG2
V_MPEG4/ISO/AVC
V_MPEG4/ISO/HEVC
V_MS/VFW/FOURCC
V_REAL/*
V_THEORA
V_VP8, V_VP9
タグ
添付ファイル
チャプタ
タイムコード
返り値¶
mkvextract(1)は下の3つの返り値を返します。環境変数¶
mkvextract(1)はシステムのロケールを決めるデフォルトの変数(例:LANGやLC_*系)を使用します。追加の変数は以下の通りです:MKVEXTRACT_DEBUG, MKVTOOLNIX_DEBUG and its short form MTX_DEBUG
MKVEXTRACT_ENGAGE, MKVTOOLNIX_ENGAGE and its short form MTX_ENGAGE
関連項目¶
mkvmerge(1), mkvinfo(1), mkvpropedit(1), mkvtoolnix-gui(1)ウェブ¶
最新のバージョンは、常時MKVToolNixのホームページ[1]から取得できます。著者¶
Bunkus Moritz[FAMILY Given] <moritz@bunkus.org>注記¶
- 1.
- MKVToolNixのホームページ
2019-02-09 | MKVToolNix 31.0.0 |