Final Cut Pro 5.1.2 supports metadata in QuickTime files. When Final Cut Pro opens or re-reads a QuickTime file with metadata, it caches a copy of the metadata in the project. (The file is the authoritative source of the metadata; if the file changes, the cached copy changes.)
To manage QuickTime metadata, version 3 of the Final Cut Pro XML Interchange Format provides the element metadata and its subelements. (See “QuickTime Metadata.”) With these new elements, you can display the metadata in a project by exporting an interchange format document. In additionl, you can actually modify the metadata in a QuickTime file by importing an interchange format document with appropriately specified elements.
In Final Cut Pro, QuickTime metadata appears at the movie or track levels; that is, the parents of metadata can be file, video, or audio. Here is an XML fragment that displays some metadata at the movie level.
Listing 3-23 Sample Metadata
<file id="clouds"> |
<name>clouds</name> |
<pathurl>file://localhost/Users/. . .</pathurl> |
<rate> |
<timebase>8</timebase> |
</rate> |
<duration>91</duration> |
<metadata> |
<storage>QuickTime</storage> |
<key>com.mycompany.myapp.myid.mymd</key> |
<size>11</size> |
<type>UTF8</type> |
<value>My metadata</value> |
</metadata> |
<media> |
. . . |
When you import interchange format documents with metadata information, Final Cut Pro caches the imported metadata. However, when Final Cut Pro reconnects referenced QuickTime files to the project, the metadata in these files replaces the metadata you imported.
You can permanently alter the metadata in a QuickTime file by using the element updatebehavior as a subelement of metadata. In this context, updatebehavior has two valid entries: add or remove. Here is an XML fragment using add.
Listing 3-24 Adding Metadata
<metadata> |
<updatebehavior>add</updatebehavior> |
<storage>QuickTime</storage> |
<key>com.mycompany.myapp.myid.mymd</key> |
<size>22</size> |
<type>UTF8</type> |
<value>My additional metadata</value> |
</metadata> |
Metadata in QuickTime files is stored as a key-value pair. In Listing 3-24 the value and the key are added to the metadata in the file. If the file already has an identical key, the imported value does not replace any existing values. Instead, the new value is stored alongside the existing values for that key. Note that a key is specified with a reverse-dns string to help ensure uniqueness.
Using remove, on the other hand, does affect existing metadata in a file. Here is an example:
Listing 3-25 Removing Metadata
<metadata> |
<updatebehavior>remove</updatebehavior> |
<storage>QuickTime</storage> |
<key>com.mycompany.myapp.myid.mymd</key> |
</metadata> |
This removes the specified key and all its associated values from the file. (Note that it is not necessary to specify the subelements type, size, or value.)
When you import an interchange format document with metadata specifications, Final Cut Pro first processes the specifications with remove, and then those with add. (This allows you to easily replace values for a particular key from a single import document.)
Last updated: 2007-11-14