Final Cut Pro xml parsing

MediaThread, our new media analysis platform, previously codenamed 'Mondrian', now supports Final Cut Pro's XML Interchange Format. I split the XMEML code out as a library that might be useful to others. Get your free (as in BSD) code here:

This library helps create an XMEML file based on references to clips from other XMEML files.  It was born by getting two problems to cancel each other out.

This should help solve a problem the CCNMTL video team frequently encounters. Educational Technologists and professors choose specific sequences from raw video footage. The video team then takes the selected clips and composes a finished product.

How do they communicate clips?  It's generally pretty awkward, and mostly emails with a long list of timecodes goes back and forth which leads to tedious data input on both sides.

We'd always dreamed that the video team could use MediaThread for this purpose. Faculty could clip their video in MediaThread, which would then export an XMEML file that the video team could use.

The first problem was that XMEML contains many variables that MediaThread wouldn't know such as filename and path and details about audio tracks.  None of these variables are contained in the small video encoded for the web--they remain in the raw footage stored by the video team.

The second problem came when we tried using MediaThread anyway. Faculty would choose their clips, but the timecodes recorded from the web video track was different from the timecodes for the raw footage. The web video didn't just start at a different time. Even the 'raw' footage that was being presented to the faculty selecting the video had already been clipped and rearranged.

We solved the problem by taking the original XMEML file that produced that video and using it to spit all the unknown variables right back into the XMEML file. Thus, we no longer had to guess the variables and the original XMEML file contains all the information about how the raw footage was rearranged.

There are still some issues.  I'm not importing transitions at the moment, and not even sure what the best thing to do with them is.  When they're split by a clip, it's ambiguous what should happen. Patches welcome!