FORUMS: list search recent posts

Python and XML references in FCP X binary file

COW Forums : Apple Final Cut Pro X Debates

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris Kenny
Python and XML references in FCP X binary file
on Jun 22, 2011 at 3:50:30 am

I ran the 'strings' command on the Final Cut Pro X binary. This command tries to extract things that look like human-readable text out of binary files. Used on Cocoa apps, it can often turn up the names of internal methods, classes, etc. Here are some of the more interesting strings it found:

PEXMLImport
PEXMLImportButton
importXML:
importFinalCutXML
importXMLViaAppleScript:
scriptingExportListAsXML:

/System/Library/Frameworks/Python.framework/Python
Py_IsInitialized
Py_Initialize
Py_SetProgramName
PyRun_SimpleFileExFlags
/usr/bin/python
FCPythonPluginExecutor
sharedManager
loadPythonScriptAtPath:runFunction:withArguments:
setupPythonEnvironment
PEPythonPluginManager
loadPythonModuleAtPath:functionName:arguments:

This suggests partial or stub implementations of XML import and Python scripting features are already present. As far as the XML stuff goes, my guess is FCP X was supposed to ship with XML import, and this was the solution for brining in FCP 7 projects... but it wasn't done in time and they decided to ship anyway.

Notice that there's not much about XML exporting, however. What's up with that? Well, I think the Python stuff actually explains that. Normally if I saw references to Python like this in an app, I'd assume it was just being used internally, but here it appears along with references to plug-ins. My guess is that the plan is to allow third-parties to write Python scripts that hook directly into FCP X, which could, if implemented in the right way, be far more powerful than XML exporting, because it could give third-party tools access to FCP X's functionality, not just to static project data.

--
Digital Workflow/Colorist, Nice Dissolve.

You should follow me on Twitter here. Or read our blog.


Return to posts index

Andrew Richards
Re: Python and XML references in FCP X binary file
on Jun 22, 2011 at 3:56:31 am

Nice find, methinks you are onto something. Now try running sqlite3 against a project file or event file...

Best,
Andy Richards

VP of Product Development
Keeper Technology


Return to posts index

Chris Kenny
Re: Python and XML references in FCP X binary file
on Jun 22, 2011 at 4:00:26 am

[Andrew Richards] "Nice find, methinks you are onto something. Now try running sqlite3 against a project file or event file..."

I tried that this afternoon, but while those are SQLite data files, they're pretty clearly generated by CoreData, which produces structure that's fairly incomprehensible to humans. If you've had more luck figuring them out, I'd certainly be interested in anything you might have discovered, through.

--
Digital Workflow/Colorist, Nice Dissolve.

You should follow me on Twitter here. Or read our blog.


Return to posts index


Andrew Richards
Re: Python and XML references in FCP X binary file
on Jun 22, 2011 at 4:06:42 am

[Chris Kenny] "I tried that this afternoon, but while those are SQLite data files, they're pretty clearly generated by CoreData, which produces structure that's fairly incomprehensible to humans. If you've had more luck figuring them out, I'd certainly be interested in anything you might have discovered, through."

Yeah, still working on deciphering the hex blobs. That hex blob stuff isn't unique to CoreData though- that is standard SQLite:

The quote(X) function returns a string which is the value of its argument suitable for inclusion into another SQL statement. Strings are surrounded by single-quotes with escapes on interior quotes as needed. BLOBs are encoded as hexadecimal literals.

That doesn't mean there isn't some CoreData uniqueness to these that would prevent us decoding them though. Not yet an area of expertise for me.

Best,
Andy Richards

VP of Product Development
Keeper Technology


Return to posts index

Chris Kenny
Re: Python and XML references in FCP X binary file
on Jun 22, 2011 at 4:19:52 am

[Andrew Richards] "Yeah, still working on deciphering the hex blobs"

Hmm... They seem to be binary plist data, pretty clearly serialized objects. If you paste the hex from one of them into a hex editor and save the file out with a .plist extension, you can open it in the Properly List Editor and get something sensible, or as sensible as serialized objects are going to be. Still a lot of work to figure out the structure and all the relationships, though, and possibly quite pointless given that the Python thing might provide much easier access sooner or later.

--
Digital Workflow/Colorist, Nice Dissolve.

You should follow me on Twitter here. Or read our blog.


Return to posts index

Andrew Richards
Re: Python and XML references in FCP X binary file
on Jun 22, 2011 at 4:39:04 am

Interesting. Maybe an API is hiding in there...

Best,
Andy Richards

VP of Product Development
Keeper Technology


Return to posts index


Matt Callac
Re: Python and XML references in FCP X binary file
on Jun 22, 2011 at 3:59:23 am

Wow, chris. Really good work. I'm afraid you might be making too much sense for some of the people on the boards though. All day you've been way too rational and not skeptical enough. I haven't seen you once post about jumping ship.

your find makes me wish i'd have studied programing a little bit.

-mattyc


Return to posts index

Marcus Samuel-Gaskin
Re: Python and XML references in FCP X binary file
on Jun 22, 2011 at 5:07:08 am

Lol, so true. Level heads will eventually prevail. No feature to ship before its time.


Return to posts index

gary adcock
Re: Python and XML references in FCP X binary file
on Jun 22, 2011 at 11:43:30 am

[Chris Kenny] "I ran the 'strings' command on the Final Cut Pro X binary."



Well done Chris.

I said there was alot going on behind the scences, thanks for looking.

gary adcock
Studio37

Post and Production Workflow Consultant
Production and Post Stereographer
Chicago, IL

http://blogs.creativecow.net/24640



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]