Provided by: mkvtoolnix_70.0.0-1build1_amd64 bug

名前

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

書式

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

説明

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

       オプション:

       -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ファイルセクショ
           ン(セグメント情報または特定のトラックの頭部)を指定します。このオプションは、複数の要素
           を修正するために、複数回指定することができます。

           既定では、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 explained 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 explained 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 explained 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.

       --enable-legacy-font-mime-types
           Enables the use of legacy MIME types for certain types of font attachments. For
           example, 'application/x-truetype-font' will be used for TrueType fonts instead of
           'fonts/ttf'.

           This affects both adding new attachments and replacing existing attachments, but only
           if the new MIME type isn't specified. Other existing attachments aren't changed.

           The affected MIME types are 'font/sfnt', 'font/ttf' and 'font/collection' which are
           all mapped to 'application/x-truetype-fonts' and 'font/otf' which is mapped to
           'application/vnd.ms-opentype'.

       その他のオプション:

       --disable-language-ietf
           Normally when the user requests changes to the 'language' track header property,
           mkvpropedit(1) will apply the same change to the new LanguageIETF track header element
           in addition to the legacy Language element. If this option is used, the change is only
           applied to the legacy Language element.

           This option does not affect changes requested via the 'language-ietf' track header
           property.

       --normalize-language-ietf mode
           Enables normalizing all IETF BCP 47 language tags to either their canonical form with
           mode 'canonical', to their extended language subtags form with mode 'extlang' or turns
           it off with mode 'off'. By default normalization to the canonical form is applied.

           In the canonical form all subtags for which preferred values exist are replaced by
           those preferred values. This converts e.g. 'zh-yue-jyutping' to 'yue-jyutping' or
           'fr-FX' to 'fr-FR'.

           For the extended language subtags form the canonical form is built first. Afterwards
           all primary languages for which an extended language subtag exists are replaced by
           that extended language subtag and its prefix. This converts e.g. 'yue-jyutping' back
           to 'zh-yue-jyutping' but has no effect on 'fr-FR' as 'fr' is not an extended language
           subtag.

           This normalization is only applied to elements that are actually changed:

           •   When editing track headers only those track language elements that are set via
               edit specifications are affected. Languages of tracks that aren't edited aren't
               changed. Editing a track but setting only properties other than the language won't
               affect the language either.

           •   When editing chapters all language elements of all chapter elements are affected
               as existing chapters are always fully replaced.

           •   When editing tags only the language elements of the tags that are actually
               replaced are affected. For example, when you replace global tags then existing
               track tags aren't affected.

           The best way to normalize all existing language tags in a file is to remux it with
           mkvmerge(1) and set its '--normalize-language-ietf' option to the desired mode.

       --command-line-charset 文字集合
           命令行から与えた文字列を変換するのに用いる文字集合を設定します。既定では機構の現行地域
           特性で指定している文字集合になります。

       --output-charset 文字集合
           出力される文字列を変換するのに用いる文字集合を設定します。既定では機構の現行地域特性で
           指定している文字集合になります。

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

       --ui-language 符号
           用いる翻訳を指定した言語符号のものに強制します(例えば「de_DE」ならドイツ語翻訳で
           す)。符号に「list」を指定すると利用可能な翻訳の一覧を出力します。

       --abort-on-warnings
           警告が発された後、プログラムが停止するようにします。プログラムの終了番号は1になりま
           す。

       --debug 機能
           指定した機能の診断出力を有効にします。このオプションは開発者にとってのみ有用です。

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

       --gui-mode
           GUIモードに切り替えます。このモードではGUI操作の状況を伝える特殊な形式の行が出力されま
           す。これらの通報は '#GUI#通報内容' という形式の後に続きます。'#GUI#通報内容#予約
           語1=値1#予約語2=値2...' というように予約語・値の組が通報内容に続くことがあります。通知
           内容や予約語は翻訳されることなく常に英語で出力されます。

       -v, --verbose
           出力が冗長になり、Matroskaの重要要素全てを、読み込まれるつど表示します。

       -h, --help
           使用法情報を出力して終了します。

       -V, --version
           版次情報を出力して終了します。

       @オプションファイル.json
           オプションファイルから追加の命令行引数を読み込みます。こうしたファイルの対応形式につい
           ての詳細は、mkvmerge(1)便覧中の「オプションファイル」という節をご覧ください。

編集選択子

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

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

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

   トラック頭部
       トラック頭部はもうちょっとだけ複雑な選択子で選択されます。全ての場合で選択子は'track:'で始
       まります。トラック頭部プロパティには、言語コード、'既定トラック'フラグやトラック名のような
       要素があります。

       track:n
           引数nが数字の場合は,n番目のトラックを選択します。トラックの順序はmkvmerge(1)で
           の--identifyオプションの出力と同じです。

           付番は1から始まります。

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

           付番は1から始まります。

       track:=uid
           引数が '=' に続く数字uidであれば,指定されたuidと等しいトラックUID要素を持つトラックを
           選択します。トラックUIDはmkvinfo(1)で確認できます。

       track:@number
           引数が '@' に続く数字numberであれば,このnumberに等しいトラック番号要素を持つトラック
           を選択します。トラック番号はmkvinfo(1)で確認できます。

   注意
       トラック編集選択子の性質から、複数の選択子が同じトラック頭部に合致し得ます。こうした場
       合、それらの編集選択子への全作用を一つにまとめ、命令行で与えた順に実行します。

添付ファイル選択子

       添付ファイル選択子は--replace-attachmentおよび--delete-attachmentの二作用と共に使います。

        1. 添付ファイル識別子での選択。この形式では、選択子は単に数字であり、mkvmerge(1)の識別命
           令が出力する添付ファイル識別子と同じものです。

        2. 添付ファイル固有識別子での選択。この形式では、選択子は等号=に続く数字であ
           り、mkvmerge(1)の識別命令が出力する添付ファイル固有識別子と同じものです。

        3. 添付ファイル名による選択。この形式では、選択子は即値語name:に続く存在する添付ファイル
           の名前です。この選択子を--replace-attachmentと共に用いる場合は、合致する名前中のコロン
           は\cと退避させなくてはなりません。

        4. MIME種別による選択。この形式では、選択子は即値語mime-type:に続く存在する添付ファイル
           のMIME種別です。この選択子を--replace-attachmentと共に用いる場合は、合致するMIME種別中
           のコロンは\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 ''

       フォントファイル(Arial.ttf)を添付ファイルとして追加する。

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

       フォントファイル(89719823.ttf)を添付ファイルとして追加し、それがまさに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

       附属のフォントファイル(Comic.ttf)を別のもの (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

       2番目の添付ファイルを、それが何であれ削除する。

           $ mkvpropedit movie.mkv --delete-attachment 2

       MIME種別を指定することで全ての附属フォントを削除する:

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

終了番号

       mkvpropedit(1)は下の3つの終了番号を返します。

       •   0 -- この終了番号は変更が成功したことを示します。

       •   1 -- この終了番号は、一つ以上の警告が出力されたが抽出が続行されたことを意味します。警
           告は 'Warning:' という文字列を先頭にして出力されます。結果ファイルが無事かどうかは状況
           によります。出力ファイルを確認することを強く推奨します。

       •   2 -- この終了番号は、誤りが発生し、誤り通報を出力した直後にmkvpropedit(1)が終了したこ
           とを示します。誤り通報の原因は命令行の間違いやファイル読み/書き誤り、壊れたファイルな
           ど多岐に渡ります。

文章ファイルと文字集合変換

       MKVToolNix一式の全ての操作機が文字集合変換、入出力、命令行、操作卓上の文字集合をどのように
       処理するかについての詳細な議論については、mkvmerge(1)の便覧にある同名の節をご覧ください。

環境変数

       mkvpropedit(1)は機構の地域特性を決める既定変数(例:LANGLC_*系列)を使用します。追加の変
       数:

       MKVPROPEDIT_DEBUG, MKVTOOLNIX_DEBUGとその短縮形MTX_DEBUG
           その内容を、あたかも--debugオプション経由で渡されたかのように扱います。

       MKVPROPEDIT_ENGAGE, MKVTOOLNIX_ENGAGEとその短縮形MTX_ENGAGE
           その内容を、あたかも--engageオプション経由で渡されたかのように扱います。

関連項目

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

ウェブ

       最新版は常にMKVToolNixの拠点[1]で入手できます。

著者

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

注記

        1. MKVToolNixの拠点
           https://mkvtoolnix.download/