There was a period in my life where I stumbled into teaching the fundamentals of HTML. At the time the web was a new adventure for me and an extension of my passion for filmmaking. Little did I realise all that work would become relevant when it came to understanding the significance behind the release of Final Cut Pro X 10.0.1 last week.
The ability to export and import XML (Extensible Markup Language) files is a key component of many existing workflows and something a lot of Final Cut Pro editors rely on today. In large part, the foundation of the Final Cut Studio ecosystem was built on the interchange of XML files between different applications. For those of us who were startled by the omission in June release of FCP X, the absence will perhaps become notable for how short-lived it was. It seems clear Apple would like us to view the 10.0.1 update to Final Cut Pro X as a signal of intent.
Before we consider the function(s) of XML in contemporary workflows, it may be useful to understand where the impetus to transfer projects originates and identify the issue XML attempts to address. As we all know, historically the film and television industries have relied on dedicated technologies for specific tasks. For years the fabled Edit Decision List (EDL) has been the tool used to recreate projects on different systems — to grade the picture or mix the sound, for example. The EDL has been around for a long time and is regarded by many as antiquated, but it’s survived and is featured in a whole host of current applications you’ll be aware of, including Resolve, Scratch and Smoke. By design an EDL is intended to reduce a project to its core components — reel and timecode data. It’s intentionally minimal, restricted to the essential information necessary to describe and recreate the edited timeline. It may seem blunt, but by and large it works. Its longevity is rooted in its simplicity.
XML on the other hand is far more sophisticated in what it is able to describe. As a result we can use it to transfer all sorts of data. Indeed anyone who has experienced the Final Cut Pro 7 to Color 1.5 round-trip workflow will have marvelled at the depth and complexity of information that flows between the two applications. Alongside the Final Cut Studio workflows, third-party developers like Automatic Duck, Digital Heaven and Intelligent Assistance have created numerous products to augment our toolset by utilising XML in clever and powerful ways. (To get a sense of what I mean you should take a look at Digital Heaven’s AutoMotion in action.)
Markup Instructions
To properly understand the nature of XML, it may be prudent to consider what we actually mean by markup language. As Philip Hodgetts notes in his 2007 article on XML and Final Cut Studio, markup predates the digital systems with which we’re familiar. Like Philip, we may commonly associate the practice with the layout of type for newspapers and magazines, but in fact, the act of “marking up” manuscripts dates back centuries.
Traditionally markup refers to the process of labelling or annotating text with instructions for the typesetter — which typeface to use, the style and size of the letters. Today we’re all used to the process of highlighting text in a word processor to change its appearance. We might italicise a sentence to add emphasis or if we’re feeling fancy, create a special look for headings so to distinguish them from the main body of a document (just as I have done in this article). We do this to give our documents a structure. Of course, most modern software is WYSIWYG and will create the necessary instructions behind the scenes to keep it from becoming a distraction. Because the application is doing all of the work we rarely have to trouble ourselves with the intricacies of the markup language that defines the structure and layout of our documents. Given that, we must cast a little wider to see where else we might encounter a markup language. This is where the years I spent teaching web development become useful! When I began creating content for the web, the first step was to learn to code HTML. Fortunately for me, the rules weren’t too difficult to grasp and the number of elements you needed to grapple with was finite.
Adding HTML Tags
The first thing you need to understand about HTML is that it uses tags, defined by angle brackets (< and >). These are used to isolate particular sections of a document. Each instruction looks like the sort of a label you’d attach to a suitcase. (You might need to squint a little.)
Tags operate as containers. They require both an opening and closing statement. Each tag features an element, which is the specific instruction and the closing tag includes a termination symbol (/). For example, if you wish to identify text as a paragraph, in HTML, you need to enclose words with the p tag element:
<p>This sentence has been tagged with HTML to define a paragraph.</p>
Notice that the tags open and close. Anything between the tags is labelled by the rule you’ve created.
Creating Structure
Now without wanting to attempt to teach HTML in a single post, let’s take a look at slightly more involved example involving HTML list tags:
<ol>
<li>Red</li>
<li>Green</li>
<li>Blue</li>
</ol>
<ol>
<li>720 x 576</li>
<li>1280 x 720</li>
<li>1920 x 1080</li>
</ol>
This code define two distinct ordered lists (ol). Each list contains three list items (li). Again notice how each tag opens and closes, as well has how the <li> tags are contained within the <ol> tags. When we render the HTML, it would look something like this:
- Red
- Green
- Blue
- 720 x 576
- 1280 x 720
- 1920 x 1080
You can see immediately how intelligent these lists are. The structure of the code means that each item is numbered in the appropriate order. If I were to insert more items the numbers would adjust accordingly.
It’s vital that the code I write is well-formed. This means I open and close each tag in order. If I accidentally create overlapping tags the results will be unpredictable and may force an error.
Whilst HTML is very good at structuring documents, the labels we use to define the lists don’t have any meaningful connection to the content. The code used in both instances is identical, yet in my example we recognise lists containing colours and frame sizes. There’s simply no way for me to specify the difference within the code. That finite collection of tags that made HTML so easy for me to learn can only take us so far. This is not so surprising if we understand that HTML was originally created to support the electronic transfer of technical documents. The need to create more meaningful, semantic data structures leads us to XML, a markup language in which you define the tags you use.
Meaningful Structure
If I had the power to define my own tags for the two lists, it would make sense to create elements that relate explicitly to the content:
<colourlist>
<colour>Red</colour>
<colour>Green</colour>
<colour>Blue</colour>
</colourlist>
<resolutionlist>
<resolution>720 x 576</resolution>
<resolution>1280 x 720</resolution>
<resolution>1920 x 1080</resolution>
</resolutionlist>
The above example the code is easy to read by humans and each tag relates meaningfully to the content. By harnessing the power of XML in this way I’m sure you can imagine how you can begin to describe all manner of objects. This is what’s happening in FCPXML.
Writing FCPXML
You can use any text editor to write XML, you just need to be able to save your document as a plain text file. TextEdit will do this, or if you prefer a dedicated application, there are a number of excellent tools available, including the free, TextWrangler.
In this exercise, derived from example code available in the Final Cut Pro X XML Format document, we’re going to create an FCPXML file that will import a video file, create an Event and Project and insert a portion of the clip into the timeline.
Download Project Files
- Create a new document in the text editor of your choice.
- Enter the first fcpxml tag elements.
<fcpxml>
</fcpxml>
You’ll find it easier to open and close the tags as you go — remember tags operate as containers.
- Add the version attribute to the fcpxml tag element.
<fcpxml version=”1.0″>
</fcpxml>
Though the rules of XML permit exceptions, attributes typically exist as name and value pairs. In this case, version is the attribute name and 1.0 is the value. Note the quotes around the value, this is required by the XML specification. We use this attribute to declare which version of FCPXML we’re using.
- Insert project tag elements between the fcpxml tags.
<fcpxml version=”1.0″>
<project>
</project>
</fcpxml>
Again note that the tags open and close and that the project tags are nested between the fcpxml tags. This code is well-formed.
- Add the name attribute to the project tag element.
<fcpxml version=”1.0″>
<project name=”London Eye Project”>
</project>
</fcpxml>
The value of the name attribute will become the name of our project in FCP X. Feel free to call it whatever you like as long as you keep the value within the quotes.
- Insert the open and close resources tag elements between the project tags.
<fcpxml version=”1.0″>
<project name=”London Eye Project”>
<resources>
</resources>
</project>
</fcpxml>
- Add the projectRef tag element between the project tags.
<fcpxml version=”1.0″>
<project name=”London Eye Project”>
<resources>
<projectRef/>
</resources>
</project>
</fcpxml>
The projectRef element is an example of an empty tag — one that does not have a separate close tag. Note the termination symbol is included within the tag.
- Insert id and name attributes to the projectRef tag.
<fcpxml version=”1.0″>
<project name=”London Eye Project”>
<resources>
<projectRef id=”myEvent” name=”London Sights Event”/>
</resources>
</project>
</fcpxml>
The projectRef tag element has two separate attribute pairs. The id attribute is used by Final Cut Pro whenever it needs to refer to, or identify the Event the project is associated with. The name is used to assign the name to the Event you’ll see within FCP X when the FCPXML file is imported.
- Insert an asset element after the projectRef tag.
<fcpxml version=”1.0″>
<project name=”London Eye Project”>
<resources>
<projectRef id=”myEvent” name=”London Sights Event”/>
<asset id=”myVideo” projectRef=”myEvent” src=”file:/Volumes/PostPostMedia/LondonEye.mov”/>
</resources>
</project>
</fcpxml>
The asset is another empty tag. It features an id attribute, which will be used to identify the video later, a projectRef attribute which we use to associate the video with our existing event (Note that the value is the same as our earlier event) and a src attribute which contains an absolute path, or URL to the video file you’d like to import.
It’s crucial that the path is correct and that it features no spaces. If there are spaces you need to replace them. For example:
file:/Volumes/PostPostMedia/London Eye.mov
should be written as:
file:/Volumes/PostPostMedia/London%20Eye.mov
- Add a format element after the asset tag.
<fcpxml version=”1.0″>
<project name=”London Eye Project”>
<resources>
<projectRef id=”myEvent” name=”London Sights Event”/>
<asset id=”myVideo” projectRef=”myEvent” src=”file:/Volumes/PostPostMedia/LondonEye.mov”/>
<format id=”myFormat” name=”FFVideoFormat720p25″/>
</resources>
</project>
</fcpxml>
As before, format is an empty tag. It also features an id attribute, which will be used to identify the video format again further down in the code. It also includes a name attribute. A list of format values can be found in the Final Cut Pro X XML Format document. Needless to say you should pick the format that’s appropriate to your video!
- Insert open and closing sequence tag elements after the close resources tag.
<fcpxml version=”1.0″>
<project name=”London Eye Project”>
<resources>
<projectRef id=”myEvent” name=”London Sights Event”/>
<asset id=”myVideo” projectRef=”myEvent” src=”file:/Volumes/PostPostMedia/LondonEye.mov”/>
<format id=”myFormat” name=”FFVideoFormat720p25″/>
</resources>
<sequence format=”myFormat” tcStart=”36000″>
</sequence>
</project>
</fcpxml>
The format attribute refers back to the setting we specified in the previous tag. The tcStart attribute specified the starting time of your timeline in seconds (36000 = 10 hours = 10:00:00:00. If you’d like your timecode to start at 01:00:00:00 use a value of 3600 seconds).
- Add open and closing spine elements between the sequence tags.
<fcpxml version=”1.0″>
<project name=”London Eye Project”>
<resources>
<projectRef id=”myEvent” name=”London Sights Event”/>
<asset id=”myVideo” projectRef=”myEvent” src=”file:/Volumes/PostPostMedia/LondonEye.mov”/>
<format id=”myFormat” name=”FFVideoFormat720p25″/>
</resources>
<sequence format=”myFormat” tcStart=”36000″>
<spine>
</spine>
</sequence>
</project>
</fcpxml>
The spine tag element defines the Primary Storyline in your FCP X timeline.
- Insert open and closing video elements between the spine tags.
<fcpxml version=”1.0″>
<project name=”London Eye Project”>
<resources>
<projectRef id=”myEvent” name=”London Sights Event”/>
<asset id=”myVideo” projectRef=”myEvent” src=”file:/Volumes/PostPostMedia/LondonEye.mov”/>
<format id=”myFormat” name=”FFVideoFormat720p25″/>
</resources>
<sequence format=”myFormat” tcStart=”36000″>
<spine>
<video ref=”myVideo” duration=”3s”></video>
</spine>
</sequence>
</project>
</fcpxml>
This places a specified video clip into the Primary Storyline. The ref attribute in the video tag is used to refer back to the video file we imported and the duration attribute trims the clip to a specified length (3s = 3 seconds).
- Save your document as PostPostImport.fcpxml. The filename is not important, but it’s a good habit to name files like this meaningfully. The .fcpxml extension is very important though. Without this Final Cut Pro X will not be able to import the file.
- Make sure your storage is connected (or open the sparse image file included with this tutorial).
- Launch FCP X and choose File > Import > XML.

- Select the PostPostImport.fcpxml file.
- Confirm that the correct Storage Location is selected and click the Import button.

Final Cut Pro should import the video file into a new event. It should also appear in the timeline of a new project, trimmed to the duration you specified in the code. The timeline should also begin at the timecode value you assigned in your code.

As you can see a few short lines of code can be immensely powerful. The next step is for developers to take these new tools and explore different ways the data can be manipulated. If you’ve made it this far I imagine that you’ve already read Philip Hodgett’s article, Why is it so hard to convert FCP 7 XML to FCP X XML?, which outlines some of the challenges faced by developers working on XML solutions for FCP X today.Smoke, Resolve and CatDV have already announced support for XML interchange with Final Cut Pro X. Curiously these are the very same applications I have busied myself learning these past few months. Now that XML support is there it seems FCP X has decided to become my companion on this journey into new worlds.
JET 2011.09.26 (Final Cut Pro)Tags: FCP X, XML
7 Comments