mkvextract(1) wyodrębnia ścieżki z plików Matroska(TM) do innych plików

SZABLON LINII KOMEND

mkvextract {tryb} {źródłowa-nazwapliku} [opcje] [specyficzne-opcje-wyodrębniania]

OPIS

This program extracts specific parts from a Matroska(TM) file to other useful formats. The first argument, mode, tells mkvextract(1) what to extract. Currently supported is the extraction of tracks, tags, attachments, chapters, CUE sheets, timecodes and cues. The second argument is the name of the source file. It must be a Matroska(TM) file. All following arguments are options and extraction specifications; both of which depend on the selected mode.

Podstawowe opcje

The following options are available in all modes and only described once in this section.

-f, --parse-fully

Sets the parse mode to 'full'. The default 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 use this mode. A full scan of a file can take a couple of minutes while a fast scan only takes seconds.

--command-line-charset zestaw-znaków

Sets the character set to convert strings given on the command line from. It defaults to the character set given by system's current locale.

--output-charset zestaw-znaków

Sets the character set to which strings are converted that are to be output. It defaults to the character set given by system's current locale.

-r, --redirect-output nazwa-pliku

Zapisuje wszystkie powiadomienia do pliku nazwa-pliku zamiast do konsoli. Podczas kiedy może być to robione łatwo z przekierowaniem wyjścia, są przypadki kiedy ta opcja właśnie jest potrzebna: kiedy terminal ponownie interpretuje plik wyjściowy przed zapisaniem do pliku. Uznawany będzie zestaw znaków ustawiony z opcją --output-charset.

--ui-language kod

Forces the translations for the language code to be used (e.g. 'de_DE' for the German translations). Entering 'list' as the code will cause the program to output a list of available translations.

--debug temat

Włącza debugowanie dla konkretnej funkcji. Ta opcja jest użyteczna tylko dla deweloperów.

--engage funkcja

Włącza eksperymentalne funkcjonalności. Lista dostepnych funkcjonalności jest dostępna po uruchomieniu komendy mkvextract --engage list. Te funkcjonalności nie powinny być używane w normalnych sytuacjach.

--gui-mode

Turns on GUI mode. In this mode specially-formatted lines may be output that can tell a controlling GUI what's happening. These messages follow the format '#GUI#message'. The message may be followed by key/value pairs as in '#GUI#message#key1=value1#key2=value2...'. Neither the messages nor the keys are ever translated and always output in English.

-v, --verbose

Be verbose and show all the important Matroska(TM) elements as they're read.

-h, --help

Pokazuje informacje o sposobie użycia opcji i zamyka się.

-V, --version

Pokazuje informację o wersji i zamyka się.

--check-for-updates

Checks online for new releases by downloading the URL m[blue]http://mkvtoolnix-releases.bunkus.org/latest-release.xmlm[]. 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's version (key available_version) and the download URL (key download_url).

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).

This option is only available if the program was built with support for libcurl.

@plik-opcji

Reads additional command line arguments from the file options-file. Lines whose first non-whitespace character is a hash mark ('#') 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.

Several chars can be escaped, e.g. if you need to start a non-comment line with '#'. The rules are described in the section about escaping text.

The command line 'mkvextract tracks source.mkv --raw 1:destination.raw' could be converted into the following option file:

# Wyodrębnij ścieżkę z źródło.mkv
tracks
źródło.mkv
# Zapisz ścieżkę jako surowe dane.
--raw
1:docelowyplik.raw

Tryb wyodrębniania ścieżek

Syntax: mkvextract tracks source-filename [options] TID1:dest-filename1 [TID2:dest-filename2 ...]

The following command line options are available for each track in the 'tracks' extraction mode. They have to appear in front of the track specification (see below) they should be applied to.

-c zestaw-znaków

Sets the character set to convert the next text subtitle track to. Only valid if the next track ID targets a text subtitle track. It defaults to UTF-8.

--blockadd poziom

Keep only the BlockAdditions up to this level. The default is to keep all levels. This option only affects certain kinds of codecs like WAVPACK4.

--cuesheet

Causes mkvextract(1) to extract a CUE sheet from the chapter information and tag data for the following track into a file whose name is the track's output name with '.cue' appended to it.

--raw

Extracts the raw data into a file without any container data around it. Unlike the --fullraw flag this flag does not cause the contents of the CodecPrivate element to be written to the file. This mode works with all CodecIDs, even the ones that mkvextract(1) doesn't support otherwise, but the resulting files might not be usable.

--fullraw

Extracts the raw data into a file without any container data around it. The contents of the CodecPrivate element will be written to the file first if the track contains such a header element. This mode works with all CodecIDs, even the ones that mkvextract(1) doesn't support otherwise, but the resulting files might not be usable.

TID:nazwa

Causes extraction of 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.

Each output name should be used only once. The exception are RealAudio and RealVideo tracks. If you use the same name for different tracks then those tracks will be saved in the same file. Example:

$ mkvextract tracks wejściowy.mkv 1:wyjście-dwóch-ścieżek.rm 2:wyjście-dwóch-ścieżek.rm

Tags extraction mode

Syntax: mkvextract tags source-filename [options]

The extracted tags are written to the console unless the output is redirected (see the section about output redirection for details).

Tryb wyodrębniania załączników

Syntax: mkvextract attachments source-filename [options] AID1:outname1 [AID2:outname2 ...]

AID:nazwa

Causes extraction of the attachment with the ID AID into the file outname if such an attachment exists in the source file. If the outname is left empty then the name of the attachment inside the source Matroska(TM) file is used instead. This option can be given multiple times. The attachment IDs are the same as the ones output by mkvmerge(1)'s --identify option.

Tryb wyodrębniania rozdziałów

Syntax: mkvextract chapters source-filename [options]

-s, --simple

Exports the chapter information in the simple format used in the OGM tools (CHAPTER01=..., CHAPTER01NAME=...). In this mode some information has to be discarded. Default is to output the chapters in XML format.

--simple-language 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).

Tryb wyodrębniania arkuszy Cue

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).

Tryb wyodrębniania kodów czasowych

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:nazwa

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.

Przykład:

$ mkvextract timecodes_v2 wejściowy.mkv 1:kczas-ścieżki1.txt 2:kczas-ścieżki2.txt

Tryb wyodrębniania indeksu cue

Syntax: mkvextract cues source-filename [options] TID1:dest-filename1 [TID2:dest-filename2 ...]

TID:docelowa-nazwapliku

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.

Przykład:

timecode=00:00:13.305000000 duration=- cluster_position=757741 relative_position=11

The possible keys are:

timecode

The cue point's timecode with nanosecond precision. The format is HH:MM:SS.nnnnnnnnn. This element is always set.

duration

The cue point's duration with nanosecond precision. The format is HH:MM:SS.nnnnnnnnn.

cluster_position

The absolute position in bytes inside the Matroska(TM) file where the cluster containing the referenced element starts.


Uwaga
Inside the Matroska(TM) 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

The relative position in bytes inside the cluster where the BlockGroup or SimpleBlock element the cue point refers to starts.


Uwaga
Inside the Matroska(TM) 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.

Przykład:

$ mkvextract cues wejściowy.mkv 1:cues-track1.txt 2:cues-track2.txt

PRZEKIEROWANIE WYJŚCIA

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 źródło.mkv > tagi.xml

mkvextract(1)'s own redirection is invoked with the --redirect-output option. Example:

$ mkvextract tags źródło.mkv --redirect-output tagi.xml


Uwaga

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.

TEXT FILES AND CHARACTER SET CONVERSIONS

Dla głębszego zrozumienia jak wszystkie narzędzia w pakiecie MKVToolNix obsługują konwersję zestawu znaków, kodowanie wejściowe/wyjściowe, kodowanie linii komend i kodowanie konsoli, zobacz tak samo nazwane sekcje na stronie obsługi mkvmerge(1)

WYJŚCIOWE FORMATY PLIKÓW

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

Ścieżki obrazu H.264 / AVC będą zapisane jako ścieżki surowe (dane podstawowe) H.264, które mogą być później przetwarzane np. przez MP4Box(TM) z pakietu GPAC(TM).

V_MS/VFW/FOURCC

Ścieżki obrazu ze stałym FPS mające taki CodecID są zapisywane do plików AVI.

V_REAL/*

Ścieżki RealVideo(TM) będą zapisane jako pliki RealMedia(TM).

V_THEORA

Ścieżki Theora(TM) będą zapisane do kontenera Ogg(TM)

V_VP8, V_VP9

VP8 / VP9 ścieżki są zapisywane do plików IVF.

A_MPEG/L2

Ścieżki MPEG-1 Audio Layer II będą wyodrębnione do surowych plików MP2.

A_MPEG/L3, A_AC3

These will be extracted to raw MP3 and AC-3 files.

A_PCM/INT/LIT

Surowe dane PCM będą zapisane do pliku WAV.

A_AAC/MPEG2/*, A_AAC/MPEG4/*, A_AAC

Wszystkie pliki AAC będą zapisane do plików AAC z nagłówkami ADTS przed każdym pakietem. Nagłówki ADTS nie będą zawierać niewspieranego pola emfazy.

A_VORBIS

Dźwięk Vorbis będzie zapisany do pliku OggVorbis(TM).

A_REAL/*

Ścieżki RealAudio(TM) będą zapisane jako pliki RealMedia(TM).

A_TTA1

Ścieżki TrueAudio(TM)będą zapisane jako pliki TTA. Proszę zauważyć, że w wyniku ograniczonej precyzji formatu Matroska(TM), wyodrębnione nagłówki plików będą miały inne dwa pola: data_length (łączna liczba sampli w pliku) i CRC.

A_ALAC

Ścieżki ALAC będą zapisane jako pliki CAF.

A_FLAC

Ścieżki FLAC będą zapisane do surowych plików FLAC.

A_WAVPACK4

Ścieżki WavPack(TM) będą zapisane jako pliki WV.

A_OPUS

Ścieżki Opus(TM) będą zapisane jako pliki OggOpus(TM).

S_TEXT/UTF8

Proste napisy tekstowe będą zapisane jako pliki SRT.

S_TEXT/SSA, S_TEXT/ASS

Napisy tekstowe SSA i ASS będą zapisane jako pliki odpowiednio SSA/ASS.

S_KATE

Ścieżki Kate(TM) będą zapisane do kontenera Ogg(TM).

S_VOBSUB

Napisy VobSub(TM) będą zapisane jako pliki SUB razem z odpowiednimi plikami indeksu IDX.

S_TEXT/USF

Napisy tekstowe USF będą zapisane jako pliki USF.

S_HDMV/PGS

Napisy PGS będą zapisane jako pliki SUP.

Tagi

Tagi są konwertowane do formatu XML. Jest to taki sam format jaki mkvmerge(1) obsługuje w plikach wejściowych.

Załączniki

Załączniki są zapisywane do pliku wyjściowego takie jakie są. Żadna konwersja nie jest wykonywana.

Rozdziały

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.

Kody czasowe

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.

KODY ZAMKNIĘCIA

mkvextract(1) exits with one of three exit codes:

0 -- Ten kod zamknięcia oznacza, że wyodrębnianie zostało zakończone powodzeniem.

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 '\\'.

ZMIENNE ŚRODOWISKOWE

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 i jego skrócona forma MTX_DEBUG

The content is treated as if it had been passed via the --debug option.

MKVEXTRACT_ENGAGE, MKVTOOLNIX_ENGAGE i jego skrócona forma MTX_ENGAGE

The content is treated as if it had been passed via the --engage option.

MKVEXTRACT_OPTIONS, MKVTOOLNIX_OPTIONS i jego skrócona forma 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).

STRONA WWW

The latest version can always be found at m[blue]the MKVToolNix homepagem[][1].

AUTOR

Moritz Bunkus <[email protected]>

Autor

PRZYPISY

1.
the MKVToolNix homepage
https://mkvtoolnix.download/