NAME¶
mkvextract - Matroska 파일에서
다른 파일로 트랙
추출
mkvextract {모드}
{소스-파일명} [옵션]
[추출-스펙]
이 프로그램은 Matroska
파일에서 다른 유용한
형식으로 특정 부분을
추출합니다. 첫번째
인수인 mode 는 mkvextract(1)
에게 추출할 것을 알려
줍니다. 현재 tracks, tags, attachments,
chapters, CUE sheets, timecodes and cues의 추출을
지원합니다. 두 번째
인수는 소스 파일의
이름인데 반드시 Matroska
파일이어야 합니다.
다음의 모든 인수들은
옵션과 추출
사양입니다; 두 가지
모두 선택한 모드에
따라 다릅니다.
공통 옵션¶
다음 옵션은 모든
모드에서 사용
가능하고 이 부분에서
단 한번만
설명합니다.
-f, --parse-fully
분석 모드를
'전부'로 설정합니다.
기본 모드는 전체
파일을 분석하지
않지만 소스 파일의
필요한 요소를 찾기
위해 메타 탐색 요소를
사용합니다. 이것은 99%
가량의 모든 경우에
충분합니다. 그러나
메타 탐색 요소를
포함하지 않거나
손상된 파일에서
사용자는 이 모드를
사용해야 할 지
모릅니다. 빠른 스캔은
몇 초밖에 안 걸리지만,
파일 전체 스캔은 이
삼분 걸릴 수
있습니다.
--command-line-charset 문자셋
명령행에 주어진
문자열을 변환할
문자셋을 정합니다.
기본값은 현재 시스템
로케일에 따른
문자셋입니다.
--output-charset 문자셋
출력할 문자열을
변환할 문자셋을
정합니다. 기본값은
현재 시스템 로케일에
따른 문자셋입니다.
-r, --redirect-output
파일명
모든 메시지를
콘솔 화면 대신
파일명 파일에
기록합니다. 이것은
출력 방향 전환으로
쉽게 할 수 있지만 이
옵션이 필요한 경우가
있습니다: 터미널이
파일에 출력하기 전에
출력을 재해석할 때.
문자셋 설정은 --output-charset
을 준수합니다.
--ui-language 코드
언어 코드의
번역을 강제로
사용합니다 (예: 강제
사용할 독일어 번역
코드는 'de_DE'). 'list'를
코드로 입력하면
mkvextract(1) 에서 이용
가능한 번역 목록을
출력할 것입니다.
--debug 토픽
특정 기능에
대해 디버깅을 켭니다.
이 기능은
개발자에게만
유용합니다.
--engage 기능
실험적인 기능을
켭니다. 이용 가능한
기능 목록은 mkvextract --engage
list로 요청할 수
있습니다. 이 기능들은
보통 상황에서는
사용하면 안 됩니다.
--gui-mode
GUI 모드를 켭니다.
이 모드에서는 GUI 동작시
무슨 일이 일어나는지
알려줄 수 있는
특별하게 형식화된
줄을 출력할 것입니다.
이 메시지들은 '#GUI#message'
형식을 따릅니다. 이
메시지 뒤에
'#GUI#message#key1=value1#key2=value2...' 형태의
키/값 쌍이 붙을 수
있습니다. 메시지나
키값들은 결코
번역되지 않고 항상
영어로 출력됩니다.
-v, --verbose
읽어들인 모든
중요한 Matroska 요소를
자세하게 보여
줍니다.
-h, --help
사용법에 관한
정보를 표시하고
종료합니다.
-V, --version
버전 정보를
표시하고
종료합니다.
--check-for-updates
http://mkvtoolnix-releases.bunkus.org/latest-release.xml
URL을 다운로드하여
새로운 버전이
나왔는지 온라인에서
확인합니다. key=value
스타일의 네 줄이
출력될 것입니다:
정보를 검색하는 주소
(key version_check_url), 현재 실행 중인
버전 (key running_version), 가장
최근에 나온 버전 (key
available_version), 다운로드 URL (key download_url).
이후에 프로그램은
이용 가능한 새 버전이
없으면 0, 새 버전이
있으면 1, 오류
발생시(업데이트
정보를 가져올 수 없는
경우)는 2의 종료
코드를 가지고
있습니다.
이 옵션은 libcurl을
지원하도록
프로그램을 만든
경우에만 이용
가능합니다.
@옵션 파일.json
Reads additional command line arguments from the file
options-file. For a full explanation on the supported formats for such
files see the section called "Option files" in the
mkvmerge(1) man page.
트랙 추출 모드¶
구문: mkvextract tracks
소스파일명
[옵션]
TID1:대상파일명1
[TID2:대상파일명2 ...]
다음 명령행 옵션은
'트랙' 추출 모드에서
각 트랙에 대해 사용할
수 있습니다. 이
옵션들은 적용이 되야
하는 트랙 사양(아래
참고) 의 앞쪽에
나타나야 합니다.
-c 문자셋
다음 자막
트랙을 변환할
문자셋을 설정합니다.
다음 트랙 ID가 텍스트
자막 트랙을 대상으로
하는 경우에만
유효합니다. 기본값은
UTF-8.
--blockadd 수준
이 수준까지만
BlockAddition을 유지합니다.
기본값은 모든 수준을
유지하는 것입니다. 이
옵션은 WAVPACK4같은 특정한
코덱에만 효과가
있습니다.
--cuesheet
mkvextract(1)로
큐시트를 챕터
정보에서 추출하고
다음 트랙의 데이터를
파일명이 트랙의 출력
이름이고 확장자가 '.cue'
인 파일에 태그로
기록합니다.
--raw
컨테이너에서
원시 데이터를 파일로
추출합니다. --fullraw
플래그와 다르게 이
플래그는 CodecPrivate 요소의
내용이 그 파일에
기록되지 않습니다. 이
모드는 모든 CodecIDs와
동작합니다. 그 외에
mkvextract(1)가 지원하지 않는
CodecIDs에서도 동작이
됩니다. 다만 그 결과로
나오는 파일은 아마도
사용하지 못할
것입니다.
--fullraw
원시 데이터를
컨테이너에 넣지 않고
단순한 파일로
추출합니다. CodecPrivate
요소의 내용은 만약
트랙이 그런 헤더
요소를 포함하고
있으면 파일에 먼저
기록될 것입니다. 이
모드는 모든 CodecIDs과
mkvextract(1) 가 지원하지
않는 CodecIDs에서도
동작하지만 그 결과로
나오는 파일은 아마도
사용하지 못할
것입니다.
TID:출력이름
소스 파일에
TID
ID의 트랙이 있으면
출력이름 파일로
추출합니다. 이 옵션은
여러 번 사용할 수
있습니다. 트랙 ID는
mkvmerge(1)'s
--identify 옵션으로
나오는 것과 같습니다.
각 출력 이름은 한
번만 사용해야 합니다.
RealAudio와 RealVideo 트랙은
예외적입니다. 다른
트랙들에 같은 이름을
사용하면 해당
트랙들은 같은 파일에
저장이 될 것입니다.
예:
$ mkvextract tracks input.mkv 1:output-two-tracks.rm 2:output-two-tracks.rm
태그 추출 모드¶
Syntax: mkvextract tags
소스파일명
[옵션]
추출한 태그는 그
출력의 방향을 바꾸지
않는 한 콘솔에
기록됩니다 (세부
사항은출력 방향
전환에 관한 부분을
보세요).
첨부 파일 추출 모드¶
Syntax: mkvextract attachments
소스파일명
[옵션]
AID1:출력이름1
[AID2:출력이름2 ...]
AID:출력이름
소스 파일에 ID
AID의 첨부 파일이
있으면 출력이름
파일로 추출합니다.
출력이름이 없으면
소스 Matroska 파일 안의 첨부
파일명을 대신
사용합니다. 이 옵션은
여러 번 사용할 수
있습니다. 첨부 파일 ID는
mkvmerge(1)'s --identify 옵션으로
나오는 출력과
같습니다.
챕터 추출 모드¶
Syntax: mkvextract chapters
소스파일명
[옵션]
-s, --simple
챕터 정보를 OGM
도구에서 사용되는
단순 형식(CHAPTER01=...
CHAPTER01NAME=...)으로 내보냅니다.
이 모드에서 몇몇
정보는 폐기되어야만
합니다. 기본값은
챕터를 XML 형식으로
출력하는 것입니다.
--simple-language 언어
If the simple format is enabled then
mkvextract(1)
will only output a single entry for each chapter atom encountered even if a
chapter atom contains more than one chapter name. By default
mkvextract(1) will use the first chapter name found for each atom
regardless of its 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 extracted chapters are written to the console unless the
output is redirected (see the section about output redirection for
details).
큐시트 추출 모드¶
Syntax: mkvextract cuesheet
source-filename [options]
The extracted cue sheet is written to the console unless the
output is redirected (see the section about output redirection for
details).
타임코드 추출 모드¶
Syntax: mkvextract timecodes_v2
source-filename [options]
TID1:dest-filename1
[TID2:dest-filename2 ...]
The extracted timecodes are written to the console unless the
output is redirected (see the section about output redirection for
details).
TID:출력이름
Causes extraction of the timecodes for the track with the
ID
TID into the file
outname if such a track exists in the
source file. This option can be given multiple times. The track IDs are the
same as the ones output by
mkvmerge(1)'s
--identify option.
예:
$ mkvextract timecodes_v2 input.mkv 1:tc-track1.txt 2:tc-track2.txt
큐 추출 모드¶
Syntax: mkvextract cues
source-filename [options]
TID1:dest-filename1
[TID2:dest-filename2 ...]
TID:대상 파일명
Causes extraction of the cues for the track with the ID
TID into the file outname if such a track exists in the source
file. This option can be given multiple times. The track IDs are the same as
the ones output by mkvmerge(1)'s --identify option and not the
numbers contained in the CueTrack element.
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.
예:
timecode=00:00:13.305000000 duration=- cluster_position=757741 relative_position=11
가능한 키:
타임코드
The cue point's timecode with nanosecond precision. The
format is HH:MM:SS.nnnnnnnnn. This element is always set.
지속 시간
The cue point's duration with nanosecond precision. The
format is HH:MM:SS.nnnnnnnnn.
클러스터_위치
The absolute position in bytes inside the Matroska file
where the cluster containing the referenced element starts.
Note
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.
상대적인_위치
The relative position in bytes inside the cluster where
the BlockGroup or SimpleBlock element the cue point refers to starts.
Note
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 cues input.mkv 1:cues-track1.txt 2:cues-track2.txt
출력 방향 변경¶
Several extraction modes cause mkvextract(1) to write the
extracted data to the console. There are generally two ways of writing this
data into a file: one provided by the shell and one provided by
mkvextract(1) itself.
The shell's builtin redirection mechanism is used by appending
'> output-filename.ext' to the command line. Example:
$ mkvextract tags source.mkv > tags.xml
mkvextract(1)'s own redirection is invoked with the
--redirect-output option. Example:
$ mkvextract tags source.mkv --redirect-output tags.xml
Note
On Windows you should probably use the --redirect-output
option because cmd.exe sometimes interpretes special characters
before they're written into the output file resulting in broken output.
텍스트 파일과 문자셋 변환¶
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.
출력 파일 형식¶
The decision about the output format is based on the track type,
not on the extension used for the output file name. The following track
types are supported at the moment:
V_MPEG4/ISO/AVC
H.264 / AVC video tracks are written to H.264 elementary
streams which can be processed further with e.g. MP4Box from the GPAC
package.
V_MS/VFW/FOURCC
Fixed FPS video tracks with this CodecID are written to
AVI files.
V_REAL/*
RealVideo tracks are written to RealMedia files.
V_THEORA
Theora streams will be written within an Ogg
container
V_VP8, V_VP9
VP8 / VP9 tracks are written to IVF files.
A_MPEG/L2
MPEG-1 Audio Layer II streams will be extracted to raw
MP2 files.
A_MPEG/L3, A_AC3
These will be extracted to raw MP3 and AC-3 files.
A_PCM/INT/LIT
Raw PCM data will be written to a WAV file.
A_AAC/MPEG2/*, A_AAC/MPEG4/*, A_AAC
All AAC files will be written into an AAC file with ADTS
headers before each packet. The ADTS headers will not contain the deprecated
emphasis field.
A_VORBIS
Vorbis 오디오는 OggVorbis
파일로 기록될
것입니다.
A_REAL/*
RealAudio tracks are written to RealMedia files.
A_TTA1
TrueAudio tracks are written to TTA files. Please note
that due to Matroska's limited timecode precision the extracted file's header
will be different regarding two fields: data_length (the total number
of samples in the file) and the CRC.
A_ALAC
ALAC tracks are written to CAF files.
A_FLAC
FLAC tracks are written to raw FLAC files.
A_WAVPACK4
WavPack tracks are written to WV files.
A_OPUS
Opus tracks are written to OggOpus files.
S_TEXT/UTF8
Simple text subtitles will be written as SRT files.
S_TEXT/SSA, S_TEXT/ASS
SSA and ASS text subtitles will be written as SSA/ASS
files respectively.
S_KATE
Kate streams will be written within an Ogg
container.
S_VOBSUB
VobSub subtitles will be written as SUB files along with
the respective index files, as IDX files.
S_TEXT/USF
USF text subtitles will be written as USF files.
S_HDMV/PGS
PGS subtitles will be written as SUP files.
태그
Tags are converted to a XML format. This format is the
same that mkvmerge(1) supports for reading tags.
첨부 파일
Attachments are written to they output file as they are.
No conversion whatsoever is done.
챕터
Chapters are converted to a XML format. This format is
the same that mkvmerge(1) supports for reading chapters. Alternatively
a stripped-down version can be output in the simple OGM style format.
타임코드
Timecodes are first sorted and then output as a timecode
v2 format compliant file ready to be fed to mkvmerge(1). The extraction
to other formats (v1, v3 and v4) is not supported.
종료 코드¶
mkvextract(1) exits with one of three exit codes:
•0 -- This exit codes means that extraction
has completed successfully.
•1 -- In this case mkvextract(1) has
output at least one warning, but extraction did continue. A warning is
prefixed with the text 'Warning:'. 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.
•2 -- This exit code is used after an error
occurred. mkvextract(1) aborts right after outputting the error
message. Error messages range from wrong command line arguments over
read/write errors to broken files.
ESCAPING SPECIAL CHARS IN TEXT¶
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.
The rules are: ' ' (a space) becomes '\s', '"' (double
quotes) becomes '\2', ':' becomes '\c', '#' becomes '\h' and '\' (a single
backslash) itself becomes '\\'.
ENVIRONMENT VARIABLES¶
mkvextract(1) uses the default variables that determine the
system's locale (e.g. LANG and the LC_* family). Additional
variables:
MKVEXTRACT_DEBUG, MKVTOOLNIX_DEBUG and its short
form MTX_DEBUG
The content is treated as if it had been passed via the
--debug option.
MKVEXTRACT_ENGAGE, MKVTOOLNIX_ENGAGE and its short
form MTX_ENGAGE
The content is treated as if it had been passed via the
--engage option.
MKVEXTRACT_OPTIONS, MKVTOOLNIX_OPTIONS and its short
form MTX_OPTIONS
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).
더 보기¶
mkvmerge(1), mkvinfo(1), mkvpropedit(1),
mkvtoolnix-gui(1)
WWW¶
The latest version can always be found at the MKVToolNix
homepage[1].
AUTHOR¶
Moritz Bunkus <moritz@bunkus.org>
개발자
NOTES¶
- 1.
- the MKVToolNix homepage