How To Import Chapter Markers With A Video Into FCPX

Quicktime chapters are nothing new. But Apple has a poor record of making it easy for content authors to work with chapters - especially across Apple programs. Don't even get me started on DVD Studio Pro. FCPX, sadly, is no different. 

If you have a video clip that already contains a chapter track, you might expect FCPX to detect those chapters, and make them available to you upon import. Sounds logical, but ......wrong. 

Why is such an obvious feature not present in FCPX? Good luck answering that.  Fortunately, there is a workaround. 

What You'll Need

  1. Quicktime 7 Pro
  2. A good text editor (I recommend BBEdit)
  3. iWork Numbers

10,000 Foot View

At a high level, we'll be using Numbers to convert timecodes from a Quicktime chapter text file into a format that we can paste into an FCPX XML file. Then we'll import that file to get our chapters to show up in FCPX.

Let's get started. 

Step 1: Open Video In Quicktime 7 Pro

Open the file with chapters in QT 7 Pro. Yes, you need Pro, and yes, you can actually still buy a Pro registration if you don't own one already. 

Step 2: Export Text File

Chose File > Export > Text to Text. Click the Options button and set the time export to 1/1000.

Step 3: Import To FCPX

Import the video clip to an event in FCPX.

*Update 9/10* - The image below shows the "Open in Timeline" function being used. This is incorrect. If you do this, the markers will only be added to the video part of the clip, not the entire thing. See the next step for more details. 

Step 5: Add several temporary chapters to the clip

These markers are just to help us locate the correct section in the XML file we're going to export in the next step.

*Update 9/10/13* - These markers should be added right in the Event, not in the clip open in the timeline. If the markers are added to the clip as shown below, they are only associated with the video portion, not the clip as a self-contained object. 


Step 6: Export XML from FCPX

Select the clip in the event and choose File > Export XML.

Step 7: Open the XML and txt file in a text editor.

The files should look like the following pictures. Times will obviously be different for you, but formatting should be similar.

Step 8: Clean up the text file

Make your text file from Quicktime look like this. All that should be seen is timecodes (without brackets) before chapter titles.

Step 9: Select the timecodes and copy

Use the block select mode of your text editor to select only the part of the timecode that is actually used. In my example, the hours column is not used, so I leave that column out. 

Step 10: Format a column in Numbers as text

Create a new document and select a column. From the cell formatting dropdown select "Text". This will ensure that the timecodes will be pasted exactly as they appeared in the text file, without getting mangled by the automatic data formatting algorithms in Numbers.

Step 11: Paste In Time Codes

Step 12: Convert Timecodes To Seconds

Here's the tricky part. We're going to use the MID( ) function in Numbers to convert the timecodes into seconds. You'll need to read the documentation for that function if you've never used it before.

The MID function allows us to extract the individual numbers from the timecode and multiply them as necessary. Since my example uses only minutes and seconds, my formula multiplies the first number by 60 and simply adds the rest of the timecode to that number.

My formula: = ( MID(B2, 1, 2) * 60) + (MID(B2, 4, 6)) 

Enter your version of this formula at the top of the next column, then copy to the cells below it. The numbers that are generated are representations of the timecode in seconds, with decimal places.

Step 13: Convert seconds to integers

The markers in an FCP XML file are expressed as fractions, not as decimals. For some reason FCPX uses 2000 as the denominator, so that's what we'll multiply our seconds by. In the next column, multiply each of the numbers by 2000. 

Step 14: Copy multiplication formula to remaining rows

Now copy and paste that cell to the remaining rows. You should see something like this. The numbers will, at first, be formatted as decimals, but we'll convert them to integers.

Step 14: Convert to integers

Highlight the entire column and from the formatting dropdown, select "Numeral System". 

The numbers should be converted to integers if the decimal "Places" field is set to 0.

Step 15: Replace timecodes in the text file with integers

Copy the cells with the integers in Numbers and paste them in place of the time codes, before the marker names, in the text file. 

Step 16: Place XML marker syntax around the integers and marker names

  • At the beginning of each line paste the following:  <marker start=" 
  • After each integer paste the following: /2000s" duration="1001/60000s" value="
  • And after each marker name, to complete the line, paste the following: "/>

If your first marker is at 0s, eliminate the /2000 part for that line. 

When you're done it should look like this. 

Step 17: Find and select marker section of XML file

Find the section of the XML file that you exported from FCPX that contains the <marker> declarations. Highlight that section. 

Step 18: Paste in markers from text file

Now we're going to replace the temporary markers in the XML file with the marker declarations we've created in the text file.  Save the file.

Step 19: Import the XML file into FCPX

You'll see a new event created, with another version of your clip in it. The XML file pointed to the original clip on disk, from the original event, but when you imported the modified XML file, FCPX created a new event, and copied the original file into the new event. 

*Update 9/10/13* The markers should show up right on the clip in the event browser. A previous version of this guide instructed you to open the clip in the timeline, but in the updated version the markers will appear right in the event browser, making it much easier to select portions of the clip using the markers as reference. 

In Closing

There you have it. Twenty-one steps to do something that Apple should have implemented from the beginning. But if you absolutely need to have your markers imported (as I do), at least there's a way to do it.

Rock on.