Provided by: mkvtoolnix_8.8.0-1_amd64 bug

名前

       mkvpropedit - 再MUXすることなく、既存のMatroska(TM)ファイルのプロパティを修正する

書式

       mkvpropedit [options] {source-filename} {actions}

説明

       このプログラムは、既存のMatroska(TM)ファイルを解析し、そのプロパティのいくつかを修正しま
       す。そして、それらの修正を既存のファイルに書き込みます。プロパティの中で変更可能なのは、セ
       グメント情報エレメント(例えばタイトル)と、トラックヘッダ(例えば言語コードや'デフォルトト
       ラック'フラグ、トラック名)です。

       オプション:

       -l, --list-property-names
           既知の編集可能なプロパティの名前、型(文字列、整数、真偽値等)、短い説明を一覧表示しま
           す。その後、プログラムは終了します。よって、source-filenameパラメータを指定する必要は
           ありません。

       -p, --parse-mode mode
           解析モードを設定します。'mode'パラメータは'fast'(デフォルト)と'full'のどちらかを指定で
           きます。'fast'モードはファイル全体を解析するのではなく、メタシークエレメントを使って
           ソースファイル内の必要なエレメントを探します。99%の場合これで十分です。しかし、メタ
           シークエレメントを含まないファイルや破損したファイルに対しては'full'解析モードを指定す
           る必要があるかもしれません。'full'スキャンには数分かかることがありますが、'fast'スキャ
           ンには数秒しかかかりません。

       Actions that deal with track and segment info properties:

       -e, --edit selector
           このオプション以降のadd、set、deleteアクションが適用されるMatroska(TM)ファイルセクショ
           ン(セグメント情報または特定のトラックのヘッダ)を指定します。このオプションは、複数のエ
           レメントを修正するために、複数回指定することができます。

           デフォルトでは、mkvpropedit(1)はセグメント情報のセクションを編集します。

           文法の完全な説明は、エディットセレクタのセクションを参照してください。

       -a, --add name=value
           nameで指定された名前のプロパティをvalueで指定した値で追加します。プロパティは、既にそ
           の名前のプロパティが存在する場合も追加されます。ほとんどのプロパティは一意的で、複数回
           追加できないことに注意してください。

       -s, --set name=value
           見付けた全ての、プロパティ名がnameであるプロパティの値を、valueに設定します。そのよう
           なプロパティが存在しないときは、プロパティは追加されます。

       -d, --delete name
           見付けた全ての、プロパティ名がnameであるプロパティを削除します。いくつかのプロパティは
           必須で、削除できないことに注意してください。

       Actions that deal with tags and chapters:

       -t, --tags selector:filename
           ファイル名からのタグを、このファイル中のタグに追加、あるいは置換します。もしファイル名
           が空白なら、タグを削除します。mkvpropedit(1)は、mkvmerge(1)が読み込むのと同じXMLタグ
           フォーマットを読み込みます。

           セレクタは、allglobal、またはtrackのうちどれか一つを指定してください。allを指定する
           と、mkvpropedit(1)はファイル中の全てのタグを置換あるいは削除します。globalを指定する
           と、グローバルタグだけが置換あるいは削除されます。

           trackを指定すると、mkvpropedit(1)は特定のトラックのタグを置換します。また、filenameか
           ら読み込まれたタグは、同じトラックに割り当てられます。edit selectorsが指定されるのと同
           じ様に(下を参照してください)、トラックは指定されます。(see below), e.g.  --tags
           track:a1:new-audio-tags.xml.

       --add-track-statistics-tags
           Calculates statistics for all tracks in a file and adds new statistics tags for them.
           If the file already contains such tags then they'll be updated.

       --delete-track-statistics-tags
           Deletes all existing track statistics tags from a file. If the file doesn't contain
           track statistics tags then it won't be modified.

       -c, --chapters filename
           ファイル名からのチャプタを、このファイル中のタグに追加、あるいは置換します。もしファイ
           ル名が空白なら、チャプタを削除します。mkvpropedit(1)は、mkvmerge(1)が読み込むのと同
           じXMLまたはシンプルチャプタフォーマットを読み込みます。

       Actions for handling attachments:

       --add-attachment filename
           Adds a new attachment from filename.

           If the option --attachment-name has been used prior to this option then its value is
           used as the new attachment's name. Otherwise it is derived from filename.

           If the option --attachment-mime-type has been used prior to this option then its value
           is used as the new attachment's MIME type. Otherwise it is auto-detected from the
           content of filename.

           If the option --attachment-description has been used prior to this option then its
           value is used as the new attachment's description. Otherwise no description will be
           set.

           If the option --attachment-uid has been used prior to this option then its value is
           used as the new attachment's UID. Otherwise a random UID will be generated
           automatically.

       --replace-attachment selector:filename
           Replaces one or more attachments that match selector with the file filename. If more
           than one existing attachment matches selector then all of their contents will be
           replaced by the content of filename.

           The selector can have one of four forms. They're exlained below in the section
           attachment selectors.

           If the option --attachment-name has been used prior to this option then its value is
           set as the new name for each modified attachment. Otherwise the names aren't changed.

           If the option --attachment-mime-type has been used prior to this option then its value
           is set as the new MIME type for each modified attachment. Otherwise the MIME types
           aren't changed.

           If the option --attachment-description has been used prior to this option then its
           value is set as the new description for each modified attachment. Otherwise the
           descriptions aren't changed.

           If the option --attachment-uid has been used prior to this option then its value is
           set as the new UID for each modified attachment. Otherwise the UIDs aren't changed.

       --update-attachment selector
           Sets the properties of one or more attachments that match selector. If more than one
           existing attachment matches selector then all of their properties will be updated.

           The selector can have one of four forms. They're exlained below in the section
           attachment selectors.

           If the option --attachment-name has been used prior to this option then its value is
           set as the new name for each modified attachment. Otherwise the names aren't changed.

           If the option --attachment-mime-type has been used prior to this option then its value
           is set as the new MIME type for each modified attachment. Otherwise the MIME types
           aren't changed.

           If the option --attachment-description has been used prior to this option then its
           value is set as the new description for each modified attachment. Otherwise the
           descriptions aren't changed.

           If the option --attachment-uid has been used prior to this option then its value is
           set as the new UID for each modified attachment. Otherwise the UIDs aren't changed.

       --delete-attachment selector
           Deletes one or more attachments that match selector.

           The selector can have one of four forms. They're exlained below in the section
           attachment selectors.

       Options for attachment actions:

       --attachment-name name
           Sets the name to use for the following --add-attachment or --replace-attachment
           operation.

       --attachment-mime-type mime-type
           Sets the MIME type to use for the following --add-attachment or --replace-attachment
           operation.

       --attachment-description description
           Sets the description to use for the following --add-attachment or --replace-attachment
           operation.

       その他のオプション:

       --command-line-charset character-set
           コマンドライン文字列の文字コードを指定します。デフォルトは、システムの現在のロケールの
           文字コードになります。

       --output-charset character-set
           出力する文字コードを指定します。デフォルトは、システムの現在のロケールの文字コードにな
           ります。

       -r, --redirect-output file-name
           全てのメッセージをコンソールではなくfile-nameで指定したファイルに書き出します。出力リ
           ダイレクトによっても同じことが簡単にできますが、このオプションが必要な場合もありま
           す。ターミナルがファイルに書き込む前に出力を処理してしまう場合などで
           す。--output-charsetによって指定された文字コードは尊重されます。

       --ui-language code
           指定したcodeを強制的に言語コード(例: 日本語ならば'ja_JP')として使用します。しかし、環
           境変数LANGLC_MESSAGESLC_ALLを使用したほうが好ましいでしょう。codeにlistと指定する
           と、指定できる言語コードの一覧を出力します。

       --debug topic
           特定の機能のデバッグをオンにします。このオプションは開発者にのみ有用です。

       --engage feature
           実験的機能をオンにします。利用可能な機能のリストはmkvpropedit --engage listで得られま
           す。これらの機能は通常の状況で利用されることは意図されていません。

       --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
           出力が冗長になり、Matroska(TM)のエレメントにとって重要なこと全てを、読み込まれるつどに
           表示していきます。

       -h, --help
           コマンド書式情報を出力して終了します。

       -V, --version
           バージョン情報を出力して終了します。

       --check-for-updates
           Checks online for new releases by downloading the URL
           http://mkvtoolnix-releases.bunkus.org/latest-release.xml. 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).

           その後プログラムは、新しいリリースが入手可能ではなかった場合は終了コード0で、新しいリ
           リースが入手可能であった場合は終了コード1で、エラーが発生した場合(例:アップデート情
           報を取得できなかった場合)は終了コード2で、それぞれ終了します。

           このオプションは、プログラムがlibcurlのサポートつきでビルドされた場合のみ使用できま
           す。

       @options-file
           options-fileで指定されたファイルから追加のコマンドラインオプションを読み込みます。行で
           最初の空白文字でない文字がハッシュマーク('#')である行はコメントとして扱われ、無視され
           ます。行頭、及び行末の空白文字は取り除かれます。各行には一つずつしかオプションを指定で
           きません。

           エスケープすることのできる文字もあります。例えば、コメントではない行を'#'で始める必要
           のある場合です。そのルールは、エスケープ文字についてのセクションで説明されています。

           'mkvpropedit source.mkv --edit track:a2 --set name=Comments'というコマンドラインと同じ
           ことは、次のようなオプションファイルによって指定できます。

               # Modify source.mkv
               source.mkv
               # Edit the second audio track
               --edit
               track:a2
               # and set the title to 'Comments'
               --set
               name=Comments

エディットセレクタ

       --editオプションは、以降のadd、set及びdeleteアクションが適用されるMatroska(TM)ファイルセク
       ション(セグメント情報または特定のトラックヘッダ)を設定します。これは次の--editオプションが
       見付かるまでずっと有効です。このオプションへの引数はエディットセレクタと呼ばれます。

       デフォルトでは、mkvpropedit(1)はセグメント情報のセクションを編集します。

   セグメント情報
       セグメント情報は次の3つの単語によって選択されます。'info'、'segment_info'また
       は'segmentinfo'です。これはセグメントタイトルやセグメントUIDなどのプロパティを格納していま
       す。

   トラックヘッダ
       トラックヘッダはもうちょっとだけ複雑なセレクタで選択されます。全ての場合でセレクタ
       は'track:'で始まります。トラックヘッダプロパティには、言語コード、'デフォルトトラック'フラ
       グやトラック名のようなエレメントがあります。

       track:n
           パラメータnが数字であれば、n番目のトラックが選択されます。トラックの順番
           は、mkvmerge(1)に--identifyオプションを指定すると出力されるものと同じです。

           Numbering starts at 1.

       track:tn
           パラメータが一文字の英字tで始まり、次にnが続く場合、あるトラックタイプでn番目のトラッ
           クが選択されます。トラックタイプパラメータtは、オーディオトラックを示す'a'、ボタント
           ラックを示す'b'、字幕トラックを示す's'、ビデオトラックを示す'v'の四つのうちの一つでな
           ければなりません。トラックの順番はmkvmerge(1)の--identifyオプションで出力される順番と
           同じです。

           Numbering starts at 1.

       track:=uid
           パラメータが'='で始まり、次にuidが続く場合は、トラックUIDエレメントがuidのトラックが選
           択されます。トラックUIDはmkvinfo(1)で取得できます。

       track:@number
           パラメータが'@'で始まり、次にnumberが続く場合は、トラックナンバーエレメントがnumberと
           等しいトラックが選択されます。トラックナンバーはmkvinfo(1)で取得できます。

   注意
       トラックエディットセレクタの性質から、いくつかのセレクタが同じトラックヘッダにマッチするこ
       とがあります。このような場合、それらのエディットセレクタへの全てのアクションは一つにまとめ
       られ、コマンドラインに指定された順番に実行されます。

ATTACHMENT SELECTORS

       An attachment selector is used with the two actions --replace-attachment and
       --delete-attachment. It can have one of the following four forms:

        1. Selection by attachment ID. In this form the selector is simply a number, the
           attachment's ID as output by mkvmerge(1)'s identification command.

        2. Selection by attachment UID (unique ID). In this form the selector is the equal sign =
           followed by a number, the attachment's unique ID as output by mkvmerge(1)'s verbose
           identification command.

        3. Selection by attachment name. In this form the selector is the literal word name:
           followed by the existing attachment's name. If this selector is used with
           --replace-attachment then colons within the name to match must be escaped as \c.

        4. Selection by MIME type. In this form the selector is the literal word mime-type:
           followed by the existing attachment's MIME type. If this selector is used with
           --replace-attachment then colons within the MIME type to match must be escaped as \c.

       下に'movie.mkv'というファイルを編集する例を示します。この例では、セグメントタイトルを設定
       し、オーディオトラックと字幕トラックの言語コードを修正します。この例は、最初の--editオプ
       ションが見付かる前の全てのオプションはデフォルトで結局セグメント情報エレメントを編集するの
       で、最初の--editオプションを省略して短縮できることに注意してください。

           $ mkvpropedit movie.mkv --edit info --set "title=The movie" --edit track:a1 --set language=fre --edit track:a2 --set language=ita

       二番目の例は、最初の字幕トラックから'デフォルトトラックフラグ'を削除し二番目の字幕トラック
       に設定します。mkvpropedit(1)はmkvmerge(1)とは違い、'デフォルトトラックフラグ'が違うトラッ
       クで'1'に設定されているからといって自動的に他のトラックの'デフォルトトラックフラグ'を'0'に
       設定はしない、という点に注意してください。

           $ mkvpropedit movie.mkv --edit track:s1 --set flag-default=0 --edit track:s2 --set flag-default=1

       ファイル中で2番目の字幕トラックのタグを置換するには、以下のようにします:

           $ mkvpropedit movie.mkv --tags track:s2:new-subtitle-tags.xml

       タグを削除するには、ファイル名を空白にします

           $ mkvpropedit movie.mkv --tags all:

       ファイル中のチャプタを置換するには、以下のようにします:

           $ mkvpropedit movie.mkv --chapters new-chapters.xml

       全てのチャプタを削除するには、ファイル名を空白にします

           $ mkvpropedit movie.mkv --chapters ''

       Adding a font file (Arial.ttf) as an attachment:

           $ mkvpropedit movie.mkv --add-attachment Arial.ttf

       Adding a font file (89719823.ttf) as an attachment and providing some information as it
       really is just Arial:

           $ mkvpropedit movie.mkv --attachment-name Arial.ttf --attachment-description 'The Arial font as a TrueType font' --attachment-mime-type application/x-truetype-font --add-attachment 89719823.ttf

       Replacing one attached font (Comic.ttf) file with another one (Arial.ttf):

           $ mkvpropedit movie.mkv --attachment-name Arial.ttf --attachment-description 'The Arial font as a TrueType font' --replace-attachment name:Comic.ttf:Arial.ttf

       Deleting the second attached file, whatever it may be:

           $ mkvpropedit movie.mkv --delete-attachment 2

       Deleting all attached fonts by MIME type:

           $ mkvpropedit movie.mkv --delete-attachment mime-type:application/x-truetype-font

返り値

       mkvpropedit(1)は下の3つの返り値を返します。

       •   0 -- この返り値は変更が成功したことを示します。

       •   1 -- この返り値は、一つ以上の警告が出力されましたが、抽出が続行されたことを意味しま
           す。警告は '警告:' という文字列を先頭につけて出力されます。出力ファイルが無事であるか
           どうかは、場合によります。出力ファイルを確認することを強く推奨します。

       •   2 -- この返り値は、エラーが発生し、エラーメッセージを表示した直後にmkvpropedit(1)が終
           了したことを示します。エラーメッセージは不正なコマンドラインやファイルI/Oエラー、壊れ
           たファイルなど様々です。

テキストファイルと文字コード変換

       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.

テキスト中の特殊文字をエスケープする

       特殊文字をエスケープしなければならない、あるいはすべき場所が少しだけあります。エスケープの
       ルールは単純です:エスケープする必要のある各文字を、バックスラッシュ(Windows上の日本語
       フォントでは\記号)の後ろに違う文字が1つついたものと入れ替えます。

       ルール:' '(半角スペース)は'\s'に、'"'(ダブルクォーテーショ
       ン)は'\2'に、':'は'\c'に、'#'は'\h'に、そして'\'それ自体は'\\'になります。

環境変数

       mkvpropedit(1)はシステムのロケールを決めるデフォルトの変数(例:LANGLC_*系)を使用しま
       す。追加の変数は以下の通りです:

       MKVPROPEDIT_DEBUG, MKVTOOLNIX_DEBUG and its short form MTX_DEBUG
           その内容は、あたかも--debugオプション経由で渡されたかのように扱われます。

       MKVPROPEDIT_ENGAGE, MKVTOOLNIX_ENGAGE and its short form MTX_ENGAGE
           その内容は、あたかも--engageオプション経由で渡されたかのように扱われます。

       MKVPROPEDIT_OPTIONS, MKVTOOLNIX_OPTIONS and its short form MTX_OPTIONS
           その内容は空白で分割されます。得られた一部の文字列は、あたかもそれがコマンドラインオプ
           ションとして渡されたかのように扱われます。もし特殊な文字(例:空白)を渡す必要があるな
           ら、それらをエスケープする必要があります(テキスト中の特殊文字のエスケープについてのセ
           クションをご覧ください)。

関連項目

       mkvmerge(1), mkvinfo(1), mkvextract(1), mkvtoolnix-gui(1)

ウェブ

       最新のバージョンは、常時MKVToolNixのホームページ[1]から取得できます。

著者

       Bunkus Moritz[FAMILY Given] <moritz@bunkus.org>
           開発者

注記

        1. MKVToolNixのホームページ
           https://mkvtoolnix.download/