📘

Premiere Pro XML

に公開

Premiere Pro用のXMLの調べたメモ

基本はfcp7 xmlの仕様に従うはず
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

feature

Premiere proのbinの形でimportできる。
video clip, audio clip, sequenceの読み込みができる


https://kb.pomfort.com/silverstack/importandexport/transferring-clips-metadata-adobe-premiere-pro/

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xmeml><xmeml version="4">
    <bin>
        <name>test001</name>
        <bin>
    		<name>Video Clips</name>
            <children>

            </children>

        </bin>
    </bin>
</xmeml>

この場合、

<bin>

<bin>``</bin>で囲むとbinとして読み込まれる

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xmeml><xmeml version="4">
    <bin>
    <name>test001</name>
        <bin>
        	<name>Video Clips</name>
            <children>

            </children>

        </bin>
    </bin>
</xmeml>


この場合test001というbinの中にVideo Clipsというbinが生成される

<name>

<name>``</name>

binの名前をつける

<bin>
    <name>A003</name>
</bin>

<children>

binの下でmovie, audioなどの素材を置きたいときにchidrenで囲む
<children>``</children>

そのため、基本<bin></bin>の中には
<name></name>, <bin></bin>, <children>しかない

<clip>

children直下に存在する
映像or音を配置するためのもの

<children>
    <clip id="A042C001_250831HK">
        <uuid>9F2CD737-9AF8-414F-8658-4CDD47D1D4A6</uuid>
        <masterclipid>MASTER_A042C001_250831HK</masterclipid>
        <ismasterclip>TRUE</ismasterclip>
        <duration>164</duration>
        <rate>
            ...
        </rate>
        <name>A042C001_250831HK</name>
        <media>
            ...
        </media>
        <logginginfo>
            ...
        </logginginfo>
        <filmdata>
            ...
        </filmdata>
        <labels>
            ...
        </labels>
        <in>-1</in>
        <out>-1</out>
        <comments>
            ...
        </comments>
        <defaultangle/>
    </clip>

    <clip id="A003_A001_0115O3">
        ...
    </clip>
    <clip id="A003_A002_0115H6">
        ...
    </clip>
    <clip id="audio_clip_4EC7B5E6-0FA8-4304-A221-60BFB7436161">
        <duration>2208</duration>
        <rate>
            ...
        </rate>
        <name>065_06_001</name>
        <media>
            ...
        </media>
        <in>-1</in>
        <out>-1</out>
    </clip>
    <clip id="audio_clip_27D3CBD8-3CE9-4453-98A3-58D8E81BA91E">
        ...
    </clip>
    <clip id="audio_clip_0AFC01AA-14C6-4D55-B2E5-04CF649E185A">
        ...
    </clip>
</children>

clip id attribute

premiere側で判定するためのclip id?
clip idが被っているクリップがあると、どちらかが正しく反映されない。
内部的に上書きされてしまうのかも

メディアのrelink時にclip idというものは存在する

<uuid>

何かに使われているuuid

The uuid element uniquely and persistently identifies individual components (clips, bins, and sequences) in a project. Since it is saved with the project file, you can use it to track detailed changes during your workflow.
uuid要素は、プロジェクト内の個々のコンポーネント(クリップ、ビン、シーケンス)を一意かつ永続的に識別します。プロジェクトファイルと共に保存されるため、ワークフロー中の詳細な変更を追跡するために使用できます。
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Topics/Topics.html#//apple_ref/doc/uid/TP30001149-CH294-SW2

clip, sequence, binにuuidを設定することができるらしい。

Valid entries are in the standard UUID format. For the hex characters A through F, case is ignored. Note that UUID’s for clips, sequences, and bins are guaranteed to be unique only within a single project. If you copy or import a clip from one project to another, the uuid entry remains the same. Note also that the UUID element, which is a subelement of data, is distinct from uuid.

有効なエントリは標準のUUID形式です。16進文字AからFについては、大文字小文字は区別されません。クリップ、シーケンス、ビンのUUIDは、単一プロジェクト内でのみ一意性が保証されることに注意してください。あるプロジェクトから別のプロジェクトへクリップをコピーまたはインポートしても、uuidエントリは変わりません。また、dataのサブ要素であるUUID要素は、uuidとは別物である点にも注意してください。
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

<masterclipid>

何かに使われているid

You do not have to encode a masterclipid element before you encode any affiliate clips. (In a sequence, all clips are affiliate or independent clips. Independent clips have no masterclipid element.)
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

At line numbered 1, the masterclipid element provides a reference to the master clip’s clip id attribute. (As in this example, a master clip lists its own clip id attribute.)

At line numbered 2, the ismasterclip element indicates whether or not a clip is a master clip. (In this case, it is.)

About master clips: For information about master clips, see the chapter “Working with Master and Affiliate Clips” in Volume 4 of the Final Cut Pro User Manual.

For details about the other elements in this listing, see the reference information in Elements Catalog. Check the index to locate a particular element.
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Basics/Basics.html#//apple_ref/doc/uid/TP30001154-TPXREF101

Working with Master and Affilate Clipsについて
https://prohelp.apple.com/finalcutpro_help-r01/English/en/finalcutpro/usermanual/index.html#chapter=90%26section=0

As you edit, you may generate many copies of the same clip. For example, you may use different segments of the same clip multiple times in one sequence. Or, if you make multiple versions of a sequence, each sequence may contain a copy of the same clip, but the duration of each clip may be different.
編集作業中、同じクリップの複数のコピーが生成される場合があります。例えば、1つのシーケンス内で同じクリップの異なる部分を複数回使用することがあります。あるいは、シーケンスの複数バージョンを作成する場合、各シーケンスには同じクリップのコピーが含まれるものの、各クリップの長さが異なる場合があります。
All of these clip copies refer to the same media file on disk. When it’s time to recapture, consolidate your media, or move your footage to another system, reducing the number of clips you need to manage can save a lot of time and disk space.
これらのクリップコピーはすべて、ディスク上の同一メディアファイルを参照しています。再キャプチャやメディアの統合、あるいは映像素材を別のシステムに移動する際には、管理が必要なクリップ数を減らすことで、大幅な時間とディスク容量の節約が可能です。
For example: You have finished editing your project and now you want to recapture the media files for your sequence clips at high resolution. If you used the same clip many times in your sequence, it would be a waste of time and disk space to capture the same media file over and over for each clip copy.
例えば:プロジェクトの編集を終え、シーケンスクリップ用のメディアファイルを高解像度で再キャプチャしたいとします。シーケンス内で同じクリップを何度も使用した場合、クリップのコピーごとに同じメディアファイルを繰り返しキャプチャするのは時間とディスク容量の無駄になります。
To simplify media management, Final Cut Pro uses a single master clip to control multiple copies of a clip. The primary purpose of a master clip is to manage the relationship between multiple copies of a clip and a single media file. The first time you import or capture a media file, a master clip is created. Subsequently, each copy of the master clip that you create is called an affiliate clip.
メディア管理を簡素化するため、Final Cut Proでは単一のマスタークリップを使用して複数のクリップコピーを制御します。マスタークリップの主な目的は、複数のクリップコピーと単一のメディアファイルとの関係を管理することです。メディアファイルを初めてインポートまたはキャプチャすると、マスタークリップが作成されます。その後、作成するマスタークリップの各コピーは関連クリップと呼ばれます。
Master-affiliate clip relationships help you to:

  • Keep track of which clips in your project use the same media
    プロジェクト内のどのクリップが同じメディアを使用しているかを追跡する
  • Perform media management operations on one, some, or all affiliated clips
    1つ、複数、またはすべての関連クリップに対してメディア管理操作を実行する
  • Trace your steps from an affiliate clip in a sequence back to the unmodified master clip
    シーケンス内のアフィリエイトクリップから、変更されていないマスタークリップまで遡って追跡する

Note: If you need to, you can break the relationship between affiliate clips and master clips, turning the affiliate clips into independent clips. You generally don’t want to do this because then you lose the benefit of a single master clip controlling all the others. There are a few cases where independent clips can be useful, but it’s best to avoid them unless you have a special reason.
注:必要に応じて、関連クリップとマスタークリップの関係を解除し、関連クリップを独立したクリップに変換できます。通常はこれを行わない方が良いでしょう。なぜなら、1つのマスタークリップで他の全てを制御できる利点が失われるためです。独立したクリップが有用なケースもいくつかありますが、特別な理由がない限りは避けるのが最善です。
https://prohelp.apple.com/finalcutpro_help-r01/English/en/finalcutpro/usermanual/index.html#chapter=90%26section=1%26hash=apple_ref:doc:uid:TempBookID-ReplacedWhenAssociatingWithMessierRevision-44035MST-1009925

<ismasterclip>

TRUE or FALSE
master clipとは?

<duration>

この素材自体のduration
メディアデュレーションに反映される
clip自体のin/outとかとは関係ない

単位をframeで指定する
ex: `<duration>164</duration>

<rate>

fpsとntscの設定

<rate>
    <ntsc>FALSE</ntsc>
    <timebase>243</timebase>
</rate>

<ntsc>

TRUE or FALSEで指定
TRUEにすると<timebase>24</timebase>にしていた場合23.976fpsになる

正確なフレームレートとして扱われる

At line numbered 5, the rate element defines the frame rate for the clip—in this case, an NTSC clip with a frame rate of 29.97 fps. Note that this frame rate is specified using the ntsc subelement, which takes a Boolean value, and the timebase subelement, which takes an integer value (30). The NTSC frame rate variant is defined as a 0.01 percent reduction in frame rate. The actual mathematical value of this variant is 29.970029970029... (repeating). The decimal 29.97 is not an accurate representation of this number. Using an interger and an NTSC indicator flag allows any application to process the rate information in its own manner. See Table B-1 for a complete listing of the possible settings for timebase and ntsc.

5行目のrate要素はクリップのフレームレートを定義します。この場合、フレームレート29.97fpsのNTSCクリップです。このフレームレートは、ブール値を取るntscサブ要素と、整数値(30)を取るtimebaseサブ要素を用いて指定されていることに注意してください。NTSCフレームレートバリアントは、フレームレートを0.01%減少させるものとして定義されています。このバリアントの実際の数学的値は29.970029970029...(循環小数)です。小数29.97はこの数値を正確に表していません。整数とNTSCインジケータフラグを使用することで、あらゆるアプリケーションが独自の方法でレート情報を処理できるようになります。タイムベースとNTSCの設定可能な値の完全な一覧については、表B-1を参照してください。
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Basics/Basics.html#//apple_ref/doc/uid/TP30001154-TPXREF101

<timebase>

このメディアのfpsの指定
フレームレートが変わる

<name>

<clip>の中の<name>
projectパネルの中のメディアの名前が変更される

<media>

メディアの詳細を示す部分

video and audio clip

 <media>
                        <video>
                            <track>
                                <clipitem id="A042C001_250831HK_ci">
                                    <masterclipid>MASTER_A042C001_250831HK</masterclipid>
                                    <name>A042C001_250831HK</name>
                                    <file id="video_file_A042C001_250831HK_60508D7E-303E-481C-BE59-8F1BFC2C608F">
                                        <name>A042C001_250831HK.mxf</name>
                                        <pathurl>file:///Volumes/A042C001_250831HK.mxf</pathurl>
                                        <duration>164</duration>
                                        <timecode>
                                            <frame>746433</frame>
                                            <displayformat>NDF</displayformat>
                                            <source>source</source>
                                            <reel><name>A042C001_250831HK</name></reel>
                                        </timecode>
                                        <media>
                                            <video>
                                                <samplecharacteristics>
                                                    <width>4096</width>
                                                    <height>3432</height>
                                                    <pixelaspectratio>Square</pixelaspectratio>
                                                </samplecharacteristics>
                                            </video>
                                            <audio>
                                                <samplecharacteristics>
                                                    <samplerate>48000</samplerate>
                                                    <depth>24</depth>
                                                </samplecharacteristics>
                                                <channelcount>1</channelcount>
                                                <layout>mono</layout>
                                                <audiochannel>
                                                    <sourcechannel>1</sourcechannel>
                                                    <channellabel>discrete</channellabel>
                                                </audiochannel>
                                            </audio>
                                            <audio>
                                                <samplecharacteristics>
                                                    <samplerate>48000</samplerate>
                                                    <depth>24</depth>
                                                </samplecharacteristics>
                                                <channelcount>1</channelcount>
                                                <layout>mono</layout>
                                                <audiochannel>
                                                    <sourcechannel>2</sourcechannel>
                                                    <channellabel>discrete</channellabel>
                                                </audiochannel>
                                            </audio>
                                            <audio>
                                                <samplecharacteristics>
                                                    <samplerate>48000</samplerate>
                                                    <depth>24</depth>               ]
                                                </samplecharacteristics>
                                                <channelcount>1</channelcount>
                                                <layout>mono</layout>
                                                <audiochannel>
                                                    <sourcechannel>3</sourcechannel>
                                                    <channellabel>discrete</channellabel>
                                                </audiochannel>
                                            </audio>
                                            <audio>
                                                <samplecharacteristics>
                                                    <samplerate>48000</samplerate>
                                                    <depth>24</depth>
                                                </samplecharacteristics>
                                                <channelcount>1</channelcount>
                                                <layout>mono</layout>
                                                <audiochannel>
                                                    <sourcechannel>4</sourcechannel>
                                                    <channellabel>discrete</channellabel>
                                                </audiochannel>
                                            </audio>
                                        </media>
                                    </file>
                                </clipitem>
                                <enabled>TRUE</enabled>
                                <locked>FALSE</locked>
                            </track>
                        </video>
                    </media>

audio media

<media>
<audio>
<track>
<clipitem id="audio_clip_4EC7B5E6-0FA8-4304-A221-60BFB7436161_G_1_1">
<masterclipid>audio_clip_4EC7B5E6-0FA8-4304-A221-60BFB7436161</masterclipid>
<name>065_06_001 - G_1</name>
<duration>2208</duration>
<sourcetrack>
<mediatype>audio</mediatype>
<trackindex>1</trackindex>
</sourcetrack>
<file id="audio_file_id_93250C4EF3744689033750E66C8F464E_065_06_001_Tr1.WAV">
<pathurl>file:///Volumes/065_06_001_Tr1.WAV</pathurl>
<duration>2208</duration>
<rate>
<ntsc>FALSE</ntsc>
<timebase>24</timebase>
</rate>
<timecode>
<rate>
<ntsc>FALSE</ntsc>
<timebase>24</timebase>
</rate>
<frame>1294320</frame>
<displayformat>NDF</displayformat>
<source>source</source>
<reel>
<name>0831</name>
</reel>
</timecode>
<media>
<audio>
<samplecharacteristics>
<samplerate>48000</samplerate>
<depth>32</depth>
</samplecharacteristics>
<channelcount>1</channelcount>
<layout>mono</layout>
<audiochannel>
<sourcechannel>1</sourcechannel>
<channellabel>discrete</channellabel>
</audiochannel>
</audio>
</media>
</file>
</clipitem>
</track>
<track>
...
</track>
<track>
...
</track>
<track>
...
</track>
<track>
...
</track>
<track>
...
</track>
<track>
...
</track>
<track>
...
</track>
</audio>
</media>

<video><track> / <audio><track>

videoかaudioを

<clipitem>

id attribute
これも何かを識別するためのidをつけとかないといけないっぽい
_ciとかが無難?

<media>
    <video>
        <track>
            <clipitem id="A042C001_250831HK_ci">
                <masterclipid>MASTER_A042C001_250831HK</masterclipid>
                <name>A042C001_250831HK</name>

At line numbered 5, the clipitem element encodes information that is specific to the associated media. See Media in a Sequence.
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Basics/Basics.html#//apple_ref/doc/uid/TP30001154-TPXREF101

<name>

clipitem直下のname
このclip nameとは別でmediaにつけている名前

<sourcetrack>
<sourcetrack>
    <mediatype>audio</mediatype>
    <trackindex>1</trackindex>
</sourcetrack>

<mediatype>

Valid strings are video or audio.

audio or video

<trackindex>

An integer specifying the track index in a link element or in a media source.
If the media has a single video track and no audio tracks, specifying trackindex may cause an error.
リンク要素またはメディアソース内のトラックインデックスを指定する整数。
メディアが単一のビデオトラックのみを持ち、オーディオトラックを持たない場合、trackindexを指定するとエラーが発生する可能性があります。
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

<file>

ファイルを識別するためにidを指定しなくてはならないっぽい。

<file id="video_file_A042C001_250831HK_60508D7E-303E-481C-BE59-8F1BFC2C608F">

####### <name>
file直下のname

<file id="video_file_A042C001_250831HK_60508D7E-303E-481C-BE59-8F1BFC2C608F">
    <name>A042C001_250831HK_file_name.mxf</name>

リンク時のclip nameがここに当たった

ここの名前は別

####### <pathurl>
このファイルのpath

<file id="video_file_A042C001_250831HK_60508D7E-303E-481C-BE59-8F1BFC2C608F">
    <name>A042C001_250831HK_file_name.mxf</name>
    <pathurl>file:///Volumes/SSD_01/A042C001_250831HK.mxf</pathurl>
    <duration>164</duration>

<file id="Jeremy Solo1">
    <name>Jeremy Solo1</name>
    <pathurl>file://localhost/Jeremy%20Solo</pathurl>// 1
    <rate>// 2
        <timebase>30</timebase>
        <ntsc>TRUE</ntsc>
    </rate>
    <duration>188</duration>// 3
</file>

A UTF-8 string specifying a pathname for a file.
A file referenced by pathurl must be on a local volume. The URL must start with file://localhost or file:///.A character that is not a legal URL character according to the RFC 2396 standard needs to be escaped by writing it in hexadecimal notation preceded by the % character. (To process URL strings programmatically, you can use functions such as CFURLCreateStringByAddingPercentEscapes in the Carbon library.)
RFC 2396規格で規定されたURLの有効な文字でない文字は、%文字を先頭に付けて16進表記で記述することでエスケープする必要があります。(URL文字列をプログラムで処理するには、CarbonライブラリのCFURLCreateStringByAddingPercentEscapesなどの関数を使用できます。)
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html#//apple_ref/doc/uid/TP30001156-SW11

####### <duration>
このファイル自体のduration
おそらくrelinkなどの引っ掛ける際に使用される
frame単位

<name>A042C001_250831HK_file_name.mxf</name>
    <pathurl>file:///Volumes/SSD01/A042C001_250831HK.mxf</pathurl>
    <duration>20</duration>
    <timecode>
        <frame>1</frame>
        <displayformat>NDF</displayformat>
        <source>source</source>
        <reel><name>A042C001_250831HK___reel_name</name></reel>
    </timecode>

videoの場合は
ビデオデュレーションが変更された
メディアデュレーションは逆にここでは影響しない

At lines numbered 2 and 3, the rate and duration subelements are required for the file element. However, because they are specified earlier in the document by the parent element, the file element can inherit this information . Listing 3-4 shows how this works.

2行目と3行目では、file要素に対してrateサブ要素とdurationサブ要素が必須です。ただし、これらは親要素によって文書内で先に指定されているため、file要素はこの情報を継承できます。リスト3-4はこの仕組みを示しています。

Listing 3-4 A clip using inheritance
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xmeml>
<xmeml version="5">
    <clip id ="Jeremy Solo">
        <name>Jeremy Solo</name>
        <duration>188</duration>
        <rate>
            <ntsc>TRUE</ntsc>
            <timebase>30</timebase>
        </rate>
        <file id="Jeremy Solo1">
            <name>Jeremy Solo1</name>
            <pathurl>file://localhost/Jeremy%20Solo</pathurl>
        </file>
    </clip>
</xmeml>

Note: Some subelements may be inherited, others may not. Elements Catalog indicates if a subelement can be inheritied or not.

https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Basics/Basics.html#//apple_ref/doc/uid/TP30001154-TPXREF101

####### <timecode>
このファイルのtimecodeを指定する
なぜか reelnameもここに指定

<timecode>
    <frame>746433</frame>
    <displayformat>NDF</displayformat>
    <source>source</source>
    <reel><name>A042C001_250831HK</name></reel>
</timecode>

######## <string>

<file id="Jeremy Solo1">
    <name>Jeremy Solo1</name>
    <pathurl>file://localhost/Jeremy%20Solo</pathurl>
    <timecode>// 1
        <string>02:42:35;14</string>
        <frame>292372</frame>
        <displayformat>DF</displayformat>
        <source>source</source>
        <reel>
            <name>002</name>
        </reel>
    </timecode>

######## <frame>
source start tcをframeで指定

<timecode>
    <frame>1</frame>
    <displayformat>NDF</displayformat>
    <source>source</source>
    <reel><name>A042C001_250831HK___reel_name</name></reel>
                                        </timecode>

メディア開始が変わる

######## <displayformat>
このtimecodeが
NDF, DFを指定

######## <source>
timecodeの種類の指定
sourceだとファイルのsource TC扱い
soundだとサウンドのタイムコード扱い
補助タイムコード(auxually TC)はaux1, aux2でも反応なし


A string specifying either the timecode source or the track identifier.
Valid entries are source, aux1, aux2, or sound. If not specified, source is assumed.
タイムコードソースまたはトラック識別子を指定する文字列。
有効な入力は source、aux1、aux2、または sound です。指定しない場合、source が想定されます。
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

######## <reel><name>
reelnameが変わる
premirere proではテープ名

####### <media><video><samplecharacteristics>

<timecode>
    <frame>1</frame>
    <displayformat>NDF</displayformat>
    <source>source</source>
    <reel><name>A042C001_250831HK___reel_name</name></reel>
</timecode>
<media>
    <video>
        <samplecharacteristics>
            <width>4096</width>
            <height>3432</height>
            <pixelaspectratio>Square</pixelaspectratio>
        </samplecharacteristics>
    </video>
    <audio>
        <samplecharacteristics>
            <samplerate>48000</samplerate>
            <depth>24</depth>
        </samplecharacteristics>
        <channelcount>1</channelcount>
        <layout>mono</layout>
        <audiochannel>
            <sourcechannel>1</sourcechannel>
            <channellabel>discrete</channellabel>
        </audiochannel>
    </audio>
    <audio>
        <samplecharacteristics>
            <samplerate>48000</samplerate>
            <depth>24</depth>
        </samplecharacteristics>
        <channelcount>1</channelcount>
        <layout>mono</layout>
        <audiochannel>
            <sourcechannel>2</sourcechannel>
            <channellabel>discrete</channellabel>
        </audiochannel>
    </audio>
    <audio>
        <samplecharacteristics>
            <samplerate>48000</samplerate>
            <depth>24</depth>               ]
        </samplecharacteristics>
        <channelcount>1</channelcount>
        <layout>mono</layout>
        <audiochannel>
            <sourcechannel>3</sourcechannel>
            <channellabel>discrete</channellabel>
        </audiochannel>
    </audio>
    <audio>
        <samplecharacteristics>
            <samplerate>48000</samplerate>
            <depth>24</depth>
        </samplecharacteristics>
        <channelcount>1</channelcount>
        <layout>mono</layout>
        <audiochannel>
            <sourcechannel>4</sourcechannel>
            <channellabel>discrete</channellabel>
        </audiochannel>
    </audio>
</media>

<width>は解像度widthに反映
<height>は解像度heightに反映
<pixelaspectratio>はpixel aspect ratioに反映

Valid entries are NTSC-601, PAL-601, square, DVCPROHD-720P or HD-(960x720), DVCPROHD-1080i60 or HD-(1280x1080), DVCPROHD-1080i50 or HD-(1440x1080).
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

<fielddominance>
何も指定しなければ progressive

Valid entries are none, lower, upper, odd, or even.

upperで奇数フィールド

####### <media><audio><samplecharacteristics>
<samplerate>はサンプリング周波数
<depth>はbit depth

####### <media><audio><channelcount>
このチャンネルが保有するchannel数
mono channelなら1
stereo channelなら2

An integer specifying the number of audio channels.
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

####### <media><audio><layout>

<layout>mono</layout>
mono and stereo
defaultはstereo

A string specifying the layout of an the audio channels.
Valid entries are mono, and stereo. Default is stereo.

monoの場合

<file>
    <name>myFile.mov</name>
    <pathurl> file://localhost/myFile.mov</pathurl>
        <rate>
            <timebase>24</timebase>
            <ntsc>TRUE</ntsc>
        </rate>
        <duration>3671</duration>
        <media>
            <video>...</video>
            <audio>// 1
                <samplecharacteristics>
                    <samplerate>48000</samplerate>
                    <depth>16</depth>
                </samplecharacteristics>
                <layout>stereo</layout>
                <channelcount>2</channelcount>
                <audiochannel>
                    <channellabel>right</channellabel>
                </audiochannel>
                <audiochannel>
                    <channellabel>left</channellabel>
                </audiochannel>
            </audio>
            <audio>// 2
                <samplecharacteristics>
                    <samplerate>48000</samplerate>
                    <depth>16</depth>
                </samplecharacteristics>
                <channelcount>2</channelcount>
            </audio>
        </media>
 </file>

At line numbered 1, the first stereo audio track is encoded. It has two channels. The first channel is specified as the right channel, the second as the left channel. (This is the reverse of the default settings.)
1行目で、最初のステレオ音声トラックがエンコードされます。このトラックには2つのチャンネルがあります。最初のチャンネルは右チャンネルとして指定され、2番目のチャンネルは左チャンネルとして指定されます。(これはデフォルト設定とは逆です。)
At line numbered 2, the second audio track in the media is encoded. When layout is not specified, stereo is assumed
行番号2では、メディア内の2番目のオーディオトラックがエンコードされます。レイアウトが指定されていない場合、ステレオが想定されます。

https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Basics/Basics.html#//apple_ref/doc/uid/TP30001154-TPXREF101

####### <media><audio><audiochannel>
元ファイルのどこのチャンネルの音を使用するか
<sourcechannel>1</sourcechannel>

An integer specifying the source channel.
Valid entries are 1 or greater.

stereoならleft, rightなど割り振れる <channellabel>discrete</channellabel>

Valid entries are left, right, and discrete.
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

<logginginfo>

<logginginfo>
    <description></description>
    <scene>Reel-No</scene>
    <shottake> - A042</shottake>
    <lognote>DIT: (null)</lognote>
    <good>FALSE</good>
</logginginfo>

<description>

説明に反映される

<scene>

premiereのsceneに反映される

<shottake>

premriereのshotに反映される

<lognote>

logの注釈に反映される

<good>

TRUE or FALSE
良好に反映される(チェックボックス)

<filmdata>

<filmdata>
    <cameraroll>A042C001_250831HK</cameraroll>
    <filmslate>
        <take>02-03</take>
        <scene>01</scene>
    </filmslate>
</filmdata>

<cameraroll>

camera rollメタに入れる

<labroll>

lab rollをメタに入れれる

<dailyroll>

daily rollをメタに入れれる

<filmslate>

scene shot takeを入れる場所

The Cinema Tools database has separate text field for Scene and Take, which appear concantenated as Slate in the application.
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

shotのメタは存在しないためscene or takeに混ぜるしかない

<take>

filmslateのtakeはpremiereには反映されない
<logginginfo>の方が反映される

<scene>

filmslateのsceneはpremiereには反映されない
<logginginfo>の方が反映される

<slate>

A string specifying the Cinema Tools Slate information
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

<labels>

<label>はどこが変更されているかわからず
<label2>にlabel colorを指定

<labels>
    <label>NG</label>
    <label2>Caribbean</label2>
</labels>

環境設定でlabel名が英語なら
label2をその名前にすれば反映されているっぽかった
label名が日本語のときはいずれにしても反映されない

<in>, <out>

メディアのin, outの指定
ビデオインポイント, ビデオアウトポイントで指定できる。
-1を指定しているとメディアのin, outに従う、限界値にしてくれる

単位がframeで

 <in>-1</in>
<out>-1</out>

in0のときとin-1の時は一緒っぽい

 <in>0</in>
<out>-1</out>

inのみ1にした場合
inのみ1fr進んだ

 <in>1</in>
<out>-1</out>

outのみ1にした場合
inとoutが一緒になった

 <in>-1</in>
<out>1</out>

outのみ2にした場合
inからoutが1fr進んだ

 <in>-1</in>
<out>1</out>

<comments>

ここで定義したものがメタデータに新規で登録できる
と思ったが
mastercomment 1,2,3,4と
clipcommentA,Bしか反映されなかった。

Four masterComment subelements, and two unique comment subelements are available.
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html

どうやらfinalcut 7 xmlの仕様からこの仕様のよう
そのため、master comment 1,2,3,4とclip commentA,Bしか反映できないっぽい。

<comments>
    <mastercomment1>SensorFps:24.000,ShutterAngle:172.5,WhiteBalance:5500,CcShift:,ExposureIndexAsa:1000,ColorGammaSxS:S-Gamut3.Cine/S-Log3,Rating:Rating 0 of 5,Label:No Label</mastercomment1>
    <mastercomment2>here is mastercomment2</mastercomment2>
    <mastercomment3>Slate</mastercomment3>
    <mastercomment4>here is mastercomment4</mastercomment4>
    <clipcommenta>Source Audio Clip(s): (null)</clipcommenta>
    <clipcommentb># of Source Audio Tracks: 4</clipcommentb>
    <clipcommentc>clip comment c</clipcommentc>>
    <newcomment1>dfafa</newcomment1>
</comments>

<comments>
    <mastercomment1>MC1</mastercomment1>
    <mastercomment2>MC2</mastercomment2>
    <mastercomment3>MC3</mastercomment3>
    <mastercomment4>MC4</mastercomment4>
    <clipcommenta>CommentA</clipcommenta>
    <clipcommentb>CommentB</clipcommentb>
</comments>

https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Basics/Basics.html#//apple_ref/doc/uid/TP30001154-TPXREF101

<defaultangle/>

閉じタグのみ?よくわからず

sequence

シーケンスを作成するための定義
id attribute
sequenceを識別するためのidをつけれる

<sequence id="sequence_id_A027C030_2508209R">
    <updatebehaviour>add</updatebehaviour>
    <name>A027C030_2508209R</name>
    <duration>1416</duration>
    <rate>
        <ntsc>FALSE</ntsc>
        <timebase>24</timebase>
    </rate>
    <timecode>
        <rate>
            <ntsc>FALSE</ntsc>
            <timebase>24</timebase>
        </rate>
        <frame>731547</frame>
        <source>source</source>
    </timecode>
    <in>-1</in>
    <out>-1</out>
    <media>
        <video>
            <format>
                <samplecharacteristics>
                    <width>4096</width>
                    <height>3432</height>
                    <pixelaspectratio>Square</pixelaspectratio>
                    <codec>
                        <name>Sony RAW, CV, SQ, X-OCN</name>
                        <appspecificdata>
                            <appname>Final Cut Pro</appname>
                            <appmanufacturer>Apple Inc.</appmanufacturer>
                            <appversion>7.0</appversion>
                            <data>
                                <qtcodec>
                                    <codecname>Sony RAW, CV, SQ, X-OCN</codecname>
                                    <codectypename>Sony RAW, CV, SQ, X-OCN</codectypename>
                                    <codectypecode>apcn</codectypecode>
                                    <codecvendorcode>appl</codecvendorcode>
                                </qtcodec>
                            </data>
                        </appspecificdata>
                    </codec>
                </samplecharacteristics>
            </format>
            <track>
                <clipitem id="sequence_A027C030_2508209R_ci">
                    <name>A027C030_2508209R</name>
                    <duration>1416</duration>
                    <in>0</in>
                    <out>1416</out>
                    <start>0</start>
                    <end>1416</end>
                    <pixelaspectratio>Square</pixelaspectratio>
                    <file id="video_file_A027C030_2508209R_B24921A9-5E1A-42A6-BBC7-ABD2DBAFBD5C"/>
                    <sourcetrack>
                        <mediatype>video</mediatype>
                    </sourcetrack>
                </clipitem>
            </track>
        </video>
        <audio>
            <outputs>
                <group>
                    <index>1</index>
                    <numchannels>1</numchannels>
                    <downmix>0</downmix>
                    <channel>
                        <index>1</index>
                    </channel>
                </group>
                <group>
                    <index>2</index>
                    <numchannels>1</numchannels>
                    <downmix>0</downmix>
                    <channel>
                        <index>2</index>
                    </channel>
                </group>
            </outputs>
            <in>-1</in>
            <out>-1</out>
            <track>
                <clipitem id="sequence_internal_audio_track-EBEA16A5-893F-4602-84F3-1115D6D1182F-1_ci">
                    <name>Intern 1</name>
                    <duration>1416</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>0</in>
                    <out>1416</out>
                    <start>0</start>
                    <end>1416</end>
                    <file id="video_file_A027C030_2508209R_B24921A9-5E1A-42A6-BBC7-ABD2DBAFBD5C"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>1</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_internal_audio_track-EBEA16A5-893F-4602-84F3-1115D6D1182F-2_ci">
                    <name>Intern 2</name>
                    <duration>1416</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>0</in>
                    <out>1416</out>
                    <start>0</start>
                    <end>1416</end>
                    <file id="video_file_A027C030_2508209R_B24921A9-5E1A-42A6-BBC7-ABD2DBAFBD5C"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>2</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_internal_audio_track-EBEA16A5-893F-4602-84F3-1115D6D1182F-3_ci">
                    <name>Intern 3</name>
                    <duration>1416</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>0</in>
                    <out>1416</out>
                    <start>0</start>
                    <end>1416</end>
                    <file id="video_file_A027C030_2508209R_B24921A9-5E1A-42A6-BBC7-ABD2DBAFBD5C"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>3</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_internal_audio_track-EBEA16A5-893F-4602-84F3-1115D6D1182F-4_ci">
                    <name>Intern 4</name>
                    <duration>1416</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>0</in>
                    <out>1416</out>
                    <start>0</start>
                    <end>1416</end>
                    <file id="video_file_A027C030_2508209R_B24921A9-5E1A-42A6-BBC7-ABD2DBAFBD5C"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>4</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-G_1_ci">
                    <name>013_01_001 G_1</name>
                    <duration>1389</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>483</in>
                    <out>1872</out>
                    <start>0</start>
                    <end>1389</end>
                    <file id="audio_file_id_EAC10983298F36A5C1DE8F1ED1656AD0_013_01_001_Tr1.WAV"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>1</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-G_2_ci">
                    <name>013_01_001 G_2</name>
                    <duration>1389</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>483</in>
                    <out>1872</out>
                    <start>0</start>
                    <end>1389</end>
                    <file id="audio_file_id_E89A923ABAD7C8EBBD33EA89053A0B61_013_01_001_Tr2.WAV"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>2</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-G_3_ci">
                    <name>013_01_001 G_3</name>
                    <duration>1389</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>483</in>
                    <out>1872</out>
                    <start>0</start>
                    <end>1389</end>
                    <file id="audio_file_id_CDA0E966BEEF76F8B99B912756756739_013_01_001_Tr3.WAV"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>3</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-W_NODOKA_ci">
                    <name>013_01_001 W_NODOKA</name>
                    <duration>1389</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>483</in>
                    <out>1872</out>
                    <start>0</start>
                    <end>1389</end>
                    <file id="audio_file_id_78261524304C15442AFA84209C3F7EC6_013_01_001_Tr4.WAV"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>4</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-W_SHOUICHI_ci">
                    <name>013_01_001 W_SHOUICHI</name>
                    <duration>1389</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>483</in>
                    <out>1872</out>
                    <start>0</start>
                    <end>1389</end>
                    <file id="audio_file_id_B80E2172D88413A555CA32AAE5C9CB8D_013_01_001_Tr5.WAV"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>5</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-W_3_ci">
                    <name>013_01_001 W_3</name>
                    <duration>1389</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>483</in>
                    <out>1872</out>
                    <start>0</start>
                    <end>1389</end>
                    <file id="audio_file_id_4C7825A8F4C60B98D46119CCFF0CB13A_013_01_001_Tr6.WAV"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>6</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-W_4_ci">
                    <name>013_01_001 W_4</name>
                    <duration>1389</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>483</in>
                    <out>1872</out>
                    <start>0</start>
                    <end>1389</end>
                    <file id="audio_file_id_9839D13885D7B5AD8D8DA9EBBB717ED2_013_01_001_Tr7.WAV"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>7</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-W_5_ci">
                    <name>013_01_001 W_5</name>
                    <duration>1389</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>483</in>
                    <out>1872</out>
                    <start>0</start>
                    <end>1389</end>
                    <file id="audio_file_id_1630B7BAE4FDD2220BD5792BF43864AD_013_01_001_Tr8.WAV"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>8</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-F9290E0D-D181-4C56-848A-E15948774615-013_01_001_TrL_R-TrL_ci">
                    <name>013_01_001_TrL_R TrL</name>
                    <duration>1389</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>483</in>
                    <out>1872</out>
                    <start>0</start>
                    <end>1389</end>
                    <file id="audio_file_id_3358DD47A4728E4C9A56ECF4AB956025_013_01_001_TrL_R.WAV"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>1</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
            <track>
                <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-F9290E0D-D181-4C56-848A-E15948774615-013_01_001_TrL_R-TrR_ci">
                    <name>013_01_001_TrL_R TrR</name>
                    <duration>1389</duration>
                    <rate>
                        <ntsc>FALSE</ntsc>
                        <timebase>24</timebase>
                    </rate>
                    <in>483</in>
                    <out>1872</out>
                    <start>0</start>
                    <end>1389</end>
                    <file id="audio_file_id_3358DD47A4728E4C9A56ECF4AB956025_013_01_001_TrL_R.WAV"/>
                    <sourcetrack>
                        <mediatype>audio</mediatype>
                        <trackindex>2</trackindex>
                    </sourcetrack>
                </clipitem>
            </track>
        </audio>
    </media>
</sequence>

<updatebehaviour>

clip, sequence, binで使用できる。

Allows an imported interchange format document to modify an open project or metadata in a QuickTIme file.
インポートされたインターチェンジ形式のドキュメントが、開いているプロジェクトまたはQuickTimeファイル内のメタデータを変更できるようにします。

Valid entries are replaceiffound, replaceoradd, addifnotfound, add, remove. (Only add is a valid entry for PSD files and multiclips.) See Managing Project Components The default entry is add. If you use updatebehavior and add with a clip, and if there is clip with the same UUID already in the project, then Final Cut assigns a new UUID to the clip you’re importing.
有効なエントリは replaceiffound、replaceoradd、addifnotfound、add、remove です。(PSDファイルおよびマルチクリップでは add のみ有効です。)プロジェクトコンポーネントの管理を参照してください。デフォルトのエントリは add です。クリップに対して updatebehavior と add を使用し、プロジェクト内に同一の UUID を持つクリップが既に存在する場合、Final Cut はインポートするクリップに新しい UUID を割り当てます。
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html#//apple_ref/doc/uid/TP30001156-SW11

The uuid element uniquely and persistently identifies individual components (clips, bins, and sequences) in a project. Since it is saved with the project file, you can use it to track detailed changes during your workflow.
uuid要素は、プロジェクト内の個々のコンポーネント(クリップ、ビン、シーケンス)を一意かつ永続的に識別します。プロジェクトファイルと共に保存されるため、ワークフロー中の詳細な変更を追跡するために使用できます。
The updatebehavior element allows you to modify UUID-identified components in an open project. The target component in a project can be a clip, bin, or sequence. As well, you can use updatebehavior to modify metadata in a QuickTime file. (See About master clips)
updatebehavior要素を使用すると、開いているプロジェクト内のUUIDで識別されるコンポーネントを変更できます。プロジェクト内の対象コンポーネントは、クリップ、ビン、またはシーケンスです。また、updatebehaviorを使用してQuickTimeファイルのメタデータを変更することもできます。(マスタークリップについてを参照)
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Topics/Topics.html#//apple_ref/doc/uid/TP30001149-CH294-SW2

Replacing a Clip in the Browser
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xmeml>
<xmeml version="5">
    <clip id="clip2 ">
        <uuid>7ACBD5FC-C166-40F9-AE36-55B39476D8E6</uuid>
        <updatebehavior>replaceiffound</updatebehavior>
        <!--Information about the replacement clip -->
    </clip>

When this snippet is imported, Final Cut Pro looks for a component in the project with a matching UUID. If it finds one, it replaces the component with the clip specified in the interchange format document. (In this case, the replacement clip appears at the topmost level of the Browser.) If it doesn’t find the target clip, nothing happens.
このスニペットがインポートされると、Final Cut Pro はプロジェクト内で一致する UUID を持つコンポーネントを検索します。一致するコンポーネントが見つかった場合、そのコンポーネントをインターチェンジフォーマット文書で指定されたクリップで置き換えます(この場合、置換クリップはブラウザの最上位レベルに表示されます)。対象のクリップが見つからない場合、何も起こりません。
To replace a clip in a bin, you have to specify the bin and all its contents. For example, Listing 4-2 replaces a clip in Bin 1.
ビン内のクリップを置換するには、そのビンとその内容物すべてを指定する必要があります。たとえば、リスト4-2はビン1内のクリップを置換します。
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Topics/Topics.html#//apple_ref/doc/uid/TP30001149-CH294-SW2

Replacing a Clip in a Bin
<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE xmeml>
 <xmeml version="5">
    <bin>
        <uuid>4FDDECFA-D312-4272-8DE8-BE98E4BA5F92</uuid>
        <updatebehavior>replaceiffound</updatebehavior>
        <name>Bin 1</name>
        <children>
            <clip id="clip2 ">
                <uuid>7ACBD5FC-C166-40F9-AE36-55B39476D8E6</uuid>
                <updatebehavior>add</updatebehavior>
                <!-- Information about the replacement clip -->
             </clip>
    </bin>

Similarly, to replace a particular clipitem in a sequence, you must replace the entire sequence.
同様に、シーケンス内の特定のクリップアイテムを置換するには、シーケンス全体を置換する必要があります。
The way you specify the location of the replacement component in the import document has precedence. For example, if the target clip is in Bin 1 and if you import a snippet such as Listing 4-1 Final Cut Pro removes the clip from Bin 1 and puts the replacement clip at the top level of the Browser.
インポート文書で置換コンポーネントの場所を指定する方法が優先されます。例えば、ターゲットクリップがビン1にある場合、リスト4-1のようなスニペットをインポートすると、Final Cut Proはビン1からクリップを削除し、置換クリップをブラウザの最上位に配置します。

The desired behavior at the time of import is specified by the entry for updatebehavior. The valid entries are:
インポート時の望ましい動作は、updatebehavior のエントリで指定されます。有効なエントリは以下の通りです:

replaceiffound

Replaces the target component if found. If not found, does nothing.
対象コンポーネントが見つかった場合、それを置換します。見つからない場合は何も実行しません。

おそらく、
projectにXMLをimportした時にuuidを検索して同じuuidがすでにプロジェクトにあるなら
みつかったuuidのものをこっちにreplaceするっぽい。
browserの最上位に配置される

replaceoradd

Replaces the target component if found. If not found, adds the imported component to the project.
対象コンポーネントが見つかった場合、それを置き換えます。見つからない場合、インポートされたコンポーネントをプロジェクトに追加します。

同様に置き換わるが、project内にそもそも存在sに遭い場合はそのまま追加

addifnotfound

Adds the imported component to the project if the target component is not found. If the target component is found and if the target component is a bin, the attributes of the bin are ignored and the children of the bin are processed according to their updatebehavior settings.
ターゲットコンポーネントが見つからない場合、インポートされたコンポーネントをプロジェクトに追加します。ターゲットコンポーネントが見つかり、かつそれがbinコンポーネントである場合、binの属性は無視され、binの子要素はそれぞれのupdatebehavior設定に従って処理されます。

uuidが同じものがみつかった場合、なにもせず
新規だった場合、追加しない?

add

Adds the imported component to the project. If a component with the same uuid entry is present, changes the uuid entry of the imported object.
インポートされたコンポーネントをプロジェクトに追加します。同じuuidエントリを持つコンポーネントが存在する場合は、インポートされたオブジェクトのuuidエントリを変更します。

デフォルトではこれになる。
単に追加して、uuidがかぶっていた場合は、uuidをシステム側で変更されて追加される。

remove

Removes the target object if found. If not found, does nothing.
対象オブジェクトが見つかった場合、それを削除します。見つからない場合は何もしません。

uuidが被っているものを見つけたらそれを削除する

Note: Only add is supported for PSD files or multiclips.
注:PSDファイルまたはマルチクリップでは、追加のみがサポートされています。

<name>

シーケンスの名前に適用される

<duration>

シーケンスのデュレーションに適用される
frame単位

<rate>

シーケンスの<ntsc>, <timebase>を指定する

<timecoe>

sequenceの開始タイムコードを指定する

<timecode>
    <rate>
        <ntsc>FALSE</ntsc>
        <timebase>24</timebase>
    </rate>
    <frame>746767</frame>
    <source>source</source>
</timecode>

<in>, <out>

sequenceのin, outの設定
-1のときはなりで合わせる

<media><video>

<format>

videoのフォーマットを設定

Encodes format information for video or audio media in a track.

<format>
    <samplecharacteristics>
        <width>4096</width>
        <height>3432</height>
        <pixelaspectratio>Square</pixelaspectratio>
        <codec>
            <name>Sony RAW, CV, SQ, X-OCN</name>
            <appspecificdata>
                <appname>Final Cut Pro</appname>
                <appmanufacturer>Apple Inc.</appmanufacturer>
                <appversion>7.0</appversion>
                <data>
                    <qtcodec>
                        <codecname>Sony RAW, CV, SQ, X-OCN</codecname>
                        <codectypename>Sony RAW, CV, SQ, X-OCN</codectypename>
                        <codectypecode>apcn</codectypecode>
                        <codecvendorcode>appl</codecvendorcode>
                    </qtcodec>
                </data>
            </appspecificdata>
        </codec>
    </samplecharacteristics>
</format>

<track>

video trackに配置するvideoを指定する場所

<track>
    <clipitem id="sequence_A027C031_250820OX_ci">
        <name>A027C031_250820OX</name>
        <duration>1628</duration>
        <in>0</in>
        <out>1628</out>
        <start>0</start>
        <end>1628</end>
        <pixelaspectratio>Square</pixelaspectratio>
        <file id="video_file_A027C031_250820OX_D035965E-C22B-4271-978E-A2D5135743D0"/>
        <sourcetrack>
            <mediatype>video</mediatype>
        </sourcetrack>
    </clipitem>
</track>

<clipitem id="">でsequence上でのclip idとなる。これが一致していた場合、他のシーケンスでも連携されるのか?

<duration>はsequence上の長さ
,<in>,<out>はsequence上のin, out点、配置場所
<start>,<end>は素材のどの時間軸からinに設置するかという部分endも同じ考え
<pixelaspectratio>
<file id="">で実際のbinの中で指定したfileと一致させる

<sourcetrack><mediatype>

<media><audio>

audio trackの定義

<audio>
    <outputs>
        <group>
            <index>1</index>
            <numchannels>1</numchannels>
            <downmix>0</downmix>
            <channel>
                <index>1</index>
            </channel>
        </group>
        <group>
            <index>2</index>
            <numchannels>1</numchannels>
            <downmix>0</downmix>
            <channel>
                <index>2</index>
            </channel>
        </group>
    </outputs>
    <in>-1</in>
    <out>-1</out>
    <track>
        <clipitem id="sequence_internal_audio_track-EBEA16A5-893F-4602-84F3-1115D6D1182F-1_ci">
            <name>Intern 1</name>
            <duration>1416</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>0</in>
            <out>1416</out>
            <start>0</start>
            <end>1416</end>
            <file id="video_file_A027C030_2508209R_B24921A9-5E1A-42A6-BBC7-ABD2DBAFBD5C"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>1</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_internal_audio_track-EBEA16A5-893F-4602-84F3-1115D6D1182F-2_ci">
            <name>Intern 2</name>
            <duration>1416</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>0</in>
            <out>1416</out>
            <start>0</start>
            <end>1416</end>
            <file id="video_file_A027C030_2508209R_B24921A9-5E1A-42A6-BBC7-ABD2DBAFBD5C"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>2</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_internal_audio_track-EBEA16A5-893F-4602-84F3-1115D6D1182F-3_ci">
            <name>Intern 3</name>
            <duration>1416</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>0</in>
            <out>1416</out>
            <start>0</start>
            <end>1416</end>
            <file id="video_file_A027C030_2508209R_B24921A9-5E1A-42A6-BBC7-ABD2DBAFBD5C"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>3</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_internal_audio_track-EBEA16A5-893F-4602-84F3-1115D6D1182F-4_ci">
            <name>Intern 4</name>
            <duration>1416</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>0</in>
            <out>1416</out>
            <start>0</start>
            <end>1416</end>
            <file id="video_file_A027C030_2508209R_B24921A9-5E1A-42A6-BBC7-ABD2DBAFBD5C"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>4</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-G_1_ci">
            <name>013_01_001 G_1</name>
            <duration>1389</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>483</in>
            <out>1872</out>
            <start>0</start>
            <end>1389</end>
            <file id="audio_file_id_EAC10983298F36A5C1DE8F1ED1656AD0_013_01_001_Tr1.WAV"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>1</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-G_2_ci">
            <name>013_01_001 G_2</name>
            <duration>1389</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>483</in>
            <out>1872</out>
            <start>0</start>
            <end>1389</end>
            <file id="audio_file_id_E89A923ABAD7C8EBBD33EA89053A0B61_013_01_001_Tr2.WAV"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>2</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-G_3_ci">
            <name>013_01_001 G_3</name>
            <duration>1389</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>483</in>
            <out>1872</out>
            <start>0</start>
            <end>1389</end>
            <file id="audio_file_id_CDA0E966BEEF76F8B99B912756756739_013_01_001_Tr3.WAV"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>3</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-W_NODOKA_ci">
            <name>013_01_001 W_NODOKA</name>
            <duration>1389</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>483</in>
            <out>1872</out>
            <start>0</start>
            <end>1389</end>
            <file id="audio_file_id_78261524304C15442AFA84209C3F7EC6_013_01_001_Tr4.WAV"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>4</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-W_SHOUICHI_ci">
            <name>013_01_001 W_SHOUICHI</name>
            <duration>1389</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>483</in>
            <out>1872</out>
            <start>0</start>
            <end>1389</end>
            <file id="audio_file_id_B80E2172D88413A555CA32AAE5C9CB8D_013_01_001_Tr5.WAV"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>5</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-W_3_ci">
            <name>013_01_001 W_3</name>
            <duration>1389</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>483</in>
            <out>1872</out>
            <start>0</start>
            <end>1389</end>
            <file id="audio_file_id_4C7825A8F4C60B98D46119CCFF0CB13A_013_01_001_Tr6.WAV"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>6</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-W_4_ci">
            <name>013_01_001 W_4</name>
            <duration>1389</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>483</in>
            <out>1872</out>
            <start>0</start>
            <end>1389</end>
            <file id="audio_file_id_9839D13885D7B5AD8D8DA9EBBB717ED2_013_01_001_Tr7.WAV"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>7</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-5E513780-8374-42A6-BBF6-8F1A39B36F97-013_01_001-W_5_ci">
            <name>013_01_001 W_5</name>
            <duration>1389</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>483</in>
            <out>1872</out>
            <start>0</start>
            <end>1389</end>
            <file id="audio_file_id_1630B7BAE4FDD2220BD5792BF43864AD_013_01_001_Tr8.WAV"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>8</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-F9290E0D-D181-4C56-848A-E15948774615-013_01_001_TrL_R-TrL_ci">
            <name>013_01_001_TrL_R TrL</name>
            <duration>1389</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>483</in>
            <out>1872</out>
            <start>0</start>
            <end>1389</end>
            <file id="audio_file_id_3358DD47A4728E4C9A56ECF4AB956025_013_01_001_TrL_R.WAV"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>1</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
    <track>
        <clipitem id="sequence_external_audio_track_id-EBEA16A5-893F-4602-84F3-1115D6D1182F-F9290E0D-D181-4C56-848A-E15948774615-013_01_001_TrL_R-TrR_ci">
            <name>013_01_001_TrL_R TrR</name>
            <duration>1389</duration>
            <rate>
                <ntsc>FALSE</ntsc>
                <timebase>24</timebase>
            </rate>
            <in>483</in>
            <out>1872</out>
            <start>0</start>
            <end>1389</end>
            <file id="audio_file_id_3358DD47A4728E4C9A56ECF4AB956025_013_01_001_TrL_R.WAV"/>
            <sourcetrack>
                <mediatype>audio</mediatype>
                <trackindex>2</trackindex>
            </sourcetrack>
        </clipitem>
    </track>
</audio>

<in>, <out>はaudio側のシーケンス側のin,out基本-1で良さそう

<outputs>

シーケンスのオーディオ設定

Encodes information about audio outputs.
オーディオ出力に関する情報を符号化します。
The information corresponds to the outputs tab of the sequence settings.
この情報は、シーケンス設定の出力タブに対応しています。
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html#//apple_ref/doc/uid/TP30001156-SW11

ステレオシーケンスの場合

<outputs>
    <group>
        <index>1</index>
        <numchannels>1</numchannels>
        <downmix>0</downmix>
        <channel>
            <index>1</index>
        </channel>
    </group>
    <group>
        <index>2</index>
        <numchannels>1</numchannels>
        <downmix>0</downmix>
        <channel>
            <index>2</index>
        </channel>
    </group>
</outputs>

<group>

Encodes information about a group of audio output channels.
オーディオ出力チャンネルのグループに関する情報を符号化します。

<numchannels

An integer specifying the number of channels in a group.
グループ内のチャネル数を指定する整数。

downmix

An integer specifying the amount of volume adjustment, in decibels, to apply to each channel when performing a downmix for the specified group.
指定されたグループに対してダウンミックスを行う際に、各チャンネルに適用する音量調整量をデシベル単位で指定する整数。

<channel>
Encodes the output device index of a channel in a group.
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html#//apple_ref/doc/uid/TP30001156-SW11

<track>

audio trackの定義

<track>
    <clipitem id="sequence_internal_audio_track-CA35EE88-C575-484E-AA42-3A606281B672-1_ci">
        <name>Intern 1</name>
        <duration>1628</duration>
        <rate>
            <ntsc>FALSE</ntsc>
            <timebase>24</timebase>
        </rate>
        <in>0</in>
        <out>1628</out>
        <start>0</start>
        <end>1628</end>
        <file id="video_file_A027C031_250820OX_D035965E-C22B-4271-978E-A2D5135743D0"/>
        <sourcetrack>
            <mediatype>audio</mediatype>
            <trackindex>1</trackindex>
        </sourcetrack>
    </clipitem>
</track>
<track>
    <clipitem id="sequence_internal_audio_track-CA35EE88-C575-484E-AA42-3A606281B672-2_ci">
        <name>Intern 2</name>
        <duration>1628</duration>
        <rate>
            <ntsc>FALSE</ntsc>
            <timebase>24</timebase>
        </rate>
        <in>0</in>
        <out>1628</out>
        <start>0</start>
        <end>1628</end>
        <file id="video_file_A027C031_250820OX_D035965E-C22B-4271-978E-A2D5135743D0"/>
        <sourcetrack>
            <mediatype>audio</mediatype>
            <trackindex>2</trackindex>
        </sourcetrack>
    </clipitem>
</track>

別で定義している
<clipitem id="">は sequence上に配置しているcilpのid
同じidが別シーケンスにもあれば連携して変更されるのか?

<clipitem><name>でclip名
<clipitem><duration>でシーケンスに配置する長さ
<clipitem><rate>fps周り
<clipitem><in>, <out>でシーケンス上のin, out
<clipitem><start>,<end>で素材のin,out
<clipitem><file id="">で実際のfileの指定
<clipitem><sourcetrack>でsourceのファイル上のtrackの指定

Discussion