Fixing Assets in FCP using XML
COW Library : Apple Final Cut Pro Legacy Tutorials : Matt Lyon : Fixing Assets in FCP using XML
Fixing incorrectly imported assets and solving media manger problems using XML.
In this article I will give a step by step guide for fixing a major issue with the way Final Cut Pro imports audio files. This problem likely affects a small number of users, but it can lead to serious problems with Media Manager. In detailing my solution, I will also provide a general guideline for properly importing audio and still image media. If you make these concepts a consistent part of your workflow, you should be rewarded with a more reliable overall experience with the software.
There is a lot of information in this tutorial, so I advise reading the entire article from start to finish before putting it into practice. The information is provided "as-is." Every user needs to evaluate and test for themselves whether it is appropriate for each situation.
Who should read this:
If you experience lots of errors when running Media Manager, or are struggling with getting the stills you imported into FCP to animate smoothly, this article may have a solution for you.
Even if you are working away problem free, I recommend that everyone familiarizes themselves with the "right" way to import media files, which I describe in the last section of the tutorial.
This article is intended for medium to advanced users of Final Cut Pro. You should be have a firm grasp of frame rates and video standards and you should be comfortable viewing and editing XML files in a text editor.
This tutorial has not been tested on projects that are using mixed frame rate VIDEO material. Therefore, before running this tutorial, I advise you to duplicate your timeline and remove any VIDEO material that uses a different frame rate then your base sequence setting. (You can put it back later).
This technique was developed while I was working on an animated television series. The problems described will most likely affect more users working on projects that utilize large amounts of stills or non-timecoded audio formats. PAL and 23.98 based projects are especially susceptible to these problems (more on that later).
On our show, the voice actors were recorded out of house. The studio sent us AIFF files exported directly from a ProTools session. Editing proceeded with out a hitch until it came time to media manage and deliver a show to the online suite. On every episode, we would see literally hundreds of errors being reported by Media Manager. We were ready to give up and change our entire workflow until I discovered a fix using XMLs and a little "search and replace" in the OS X text editor.
All the testing and screen grabs for this tutorial were done in FCP version 6.0.6. I have every reason to believe that it will apply equally well to FCP 7, 5 and 4, but I can?t make any guarantees. As always, test and see for yourself!
Some Technical details:
Under the hood, Final Cut Pro does not like media that has no timebase associated with it. When you import a file, FCP will attempt to figure out the timebase of the asset (presumably using the timecode track or other attributes).
Unfortunately, certain file formats, like AIFF, WAV and PNGs do not contain timecode tracks.
This is the first important concept to wrap your head around:
When you import a media file that does not contain timecode, FCP will "assign" a timebase to the file. The timebase it uses is based on your DEFAULT SEQUENCE SETTING, as selected in your "audio/video settings" window.
It does not matter what the settings are of your open sequence(s).
Now, to make things worse. The default sequence setting FCP uses out of the box is "DV NTSC." Many users never change this!
Going back to my specific example: our animated series was a PAL show, so we cut at 25 fps. After talking to some of our editors, I realized all our audio was being imported on a workstation with the "DV NTSC" sequence setting still set as default! This was the source of our problem! You can imagine how this issue could affect anyone not working with 29.97, interlaced material.
The Solution:Step 1. - Diagnosis
The first thing to do is recognize you have a problem! The easiest way to tell is by the "little green bars" that will appear on your audio clips in the timeline. Be mindful that there are other circumstances that will cause this bar to appear, like mismatched sample rates. Write down the exact names of a couple of these files, as you will need to search for them in your xml later.
Notice the green bars on the two audio clips in this timeline!
If we attempt to media manage this sequence, all sorts of errors occur:
An example of a typical error reported while media managing a problematic sequence.
An example of a typical error reported on a different workstation when trying to reconnect clips in the Media Managed project.
Another example of conflicts reported during the reconnect process (notice the clips in italics)
Step 2. - Create a sequence preset
The first Step to fix the problem and prevent it from recurring is creating a sequence preset that matches exactly the settings you are using in your project sequences. After creating this preset, make sure it is the "default" by clicking next to it in the list, so the little checkmark appears.
Step 3. - Exporting an xml
Note: If you'd like, it is possible to re-import your media using the proper settings, then replace your clips manually in your timeline(s) (check out my guide at the bottom of this article). However, this is only practical if you have a handful of affected clips, or if you haven?t done much serious editing yet. We had hundreds of clips, and nearly finished shows, so I developed this xml fix.
Open up the sequence you wish to fix. In the FCP menu bar, select "File>Export>XML…" Use the most recent version of the XML protocol that your copy of FCP supports.
Step 4. - Quitting Final Cut Pro, the proper way
Close every project you have open, saving if necessary. With FCP still running, confirm you have no project open and quit FCP.
THIS STEP IS VITAL. The next steps will not work unless you follow step four exactly!
Step 5. - Editing your xml
Open your newly created xml in TextEdit.
By examining your sequence parameters at the very top of your xml, it is possible to see the "correct" settings for the 'rate' item (the highlighted text in the screen grab). Click above for larger image.
Now you'll be able to see exactly where FCP is going wrong in interpreting your footage. Go to "Edit>Find>Find..." (or press 'apple-f') to open the "Find" dialog box. Type in the name of one of your affected clips and hit "next."
TextEdit will search your document and take you to the section outlining the properties for the clip you chose. You should see an entry called "Timebase" and another one called "NTSC."
"Timebase" is an INTEGER value that describes the timebase of your clip (as opposed to the FRAME RATE proper). It can be a whole number such as 24, 25 or 30.
"NTSC" is a flag that can either be set to TRUE or FALSE. As you might imagine, it tells FCP whether to give the clip certain special considerations appropriate for NTSC material (this affects things like audio pulldown).
Chances are one, or both of these settings are wrong. If you are unsure what the correct settings are, try finding a "good" clip in the xml, and take note of its settings.
Now we're ready to fix the xml. We'll use the "FIND" dialog box, and the "find and replace" command. Using the picture below as a guide, copy the full, incorrect "Timebase" item for your xml clip and paste it into the "FIND" text entry field.
Next, paste the same text into the "Replace with" text entry field. Change the timebase number to the desired setting that matches your project. In this example (which is a PAL project) we are changing the timebase from the incorrect "30" value, to the correct value of "25." Use the "replace all" button to adjust ALL THE CLIPS in your xml.
Now repeat the same Step for the "NTSC" flag, setting the correct value as appropriate for your project. In this example, we are changing it from "TRUE" to "FALSE." Again, make sure you use the "replace all" command.
Use the timebase setting appropriate for your media. This example uses 25. A 23.98 fps project would use 24 for its timebase attribute.
Save your xml and quit text edit.
Step 6. - Importing your fixed xml into FCP
Open FCP and verify that no projects open automatically. Create a new project, then select "File>import>xml…"
Choose your edited xml, and select the import settings as pictured below (these should be the default settings).
If all goes well, FCP will import your xml without any errors. Navigate to one of your clips previously identified as "bad." The green bars should be gone!
Goodbye Green Bars!
I highly recommend you watch your project all the way through, and make certain that nothing has shifted unexpectedly in the timeline.
Next time you run Media Manager, there should be NO ERRORS!
If desired, you should merge bins from your old project into this new project. I advise you don't use your old project AT ALL moving forward. Consider it CORRUPT and keep a copy for archival purposes only.
If you need to open the corrupt version of your project, make sure to always open it second. In other words, open the GOOD project first, then the corrupt one. This ensures FCP interprets the media correctly.
ONE FINAL NOTE ON OPENING SOMEONE ELSE'S MEDIA MANAGED PROJECTS:
The timebase information associated with a project's assets do not necessarily travel along with a Media Managed project. It seem to be refreshed from scratch when the project is opened on a new machine!
If you are opening a project that has been media managed and sent to you from another editor, you MUST make sure that your "default sequence preset" (see STEP TWO, above) matches the timeline settings of the project you were delivered. This will guarantee that all the media is assigned the correct timebase upon import onto your workstation!
An alternative to my XML fix -- a surefire way to re-import media the proper way:
If my xml fix does not suit your needs, I advise using this method to re-import your media into FCP. This method works equally well for audio and still image files.
WHY FIX STILL IMAGE ASSETS? Sometimes you can get away with incorrectly imported still images. Depending on your workflow, you may never notice a problem. However, incorrectly imported stills can cause serious issues, like objectionable artifacts when keyframing via the motion tab, or bad results when making a still image from your timeline. From what I can tell, these problems can be caused by mismatches in timebase AND/OR field dominance.
In Final Cut Pro it is a little easier to see if your still images have problems. Unlike audio files, you can actually view the frame rate of your still images directly in the program:
In the Browser, find an example of a still image, and scroll the column display until you see the "frame rate" column (you may need to unhide it). Is it incorrect? (Maybe 29.97 instead of 25 fps?)
Unfortunately, you can't change the frame rate of a still after you've already imported it. The solution? Follow my guide below:
Advisory: It is possible to achieve similar results by duplicating, renaming and then re-importing your media into your project. But I often find myself in situations where space is an issue, or I really don't want to change the names of files. So I use this somewhat more involved process. Feel free to experiment and find simpler techniques that work for you. This fix works equally well for audio and stills.
Step 1. - Clean up your project
Thanks for reading! Comments and feedback are more then welcome. Please help improve this guide by reporting your successes and failures in the comments section.