Scripting & Automation in the Edit Room
Drew Lahat
Issue: December 1, 2012

Scripting & Automation in the Edit Room

Editing has come a long way since the upright Moviola. Those of us who started cutting on film or tape know full well how computers revolutionized our industry. Nonlinear editing systems help us make decisions, experiment, and work faster than ever, but there's one revolution that's still waiting to happen.

Ask any science teacher what is a computer, and they'd tell you it's a device that can be programmed to carry out operations. Oddly enough, this is something we barely get to see in our editing software. Every so often you encounter a task that's specific, mundane and repetitive. If you're lucky, you have an assistant to do it for you. If it's 1am and you need that deliverable out the door, you'll grind your teeth and make that change 25 times, manually.

What's missing are macros or scripts: small programs that automate a set of instructions so the computer can do them instead of you. Scripts can be as simple as a few commands or become fairly complex, but they don't require an armada of programmers to develop. VFX artists already enjoy extensive scripting support that's available in programs like Nuke and After Effects. The latter is a great example of scripting's potential — just check out the thriving community at, where you can find myriad ways to extend After Effect's functionality.

Large facilities utilize scripting in asset management and archive systems. Those tools shuttle data around, automate tasks, run QC checks, and can “talk” to editing programs. For example, StorageDNA knows how to archive just the media in your final edit by looking at an XML from your NLE.

When it comes to the confines of the editing room, we're still waiting for scripting support (so keep those feature requests going). But there's something you can about it right now.

ReTimer for Final Cut Pro

About a year ago I was online editing a documentary feature that contained footage in almost every frame rate imaginable. It was offlined in NTSC (30i) but needed to deliver in 720/60p. Alas, Final Cut Pro could not change the frame rate of an existing sequence. Numerous attempts with multiple tools only resulted in mangled edits. 

I ended up creating a program that addressed this major hole in FCP's functionality. "ReTimer" did 90 percent of the conversion work for me, saving me from having to manually conform the whole film shot by shot. I also made it conform PAL footage to NTSC, correct aspect ratios, and do a variety of mundane tasks. 

Like other tools in the market, ReTimer leverages XML to do its work. Variants of this interchange format are becoming increasingly popular, with support in FCP7, FCP X, Premiere, Resolve, and more. However while most XML-aware programs are closed-source, ReTimer is intentionally lightweight, open-source, and free. I hope it will solve time base conversion problems for others, but its real value is as a starting point to develop your own automation programs.

XML files contain a representation of your bins and sequences. Once you can read, manipulate, and write them you've got an extraordinary "hook" into your editing system. ReTimer offers such a platform for FCP7 XMLs. It is written in JavaScript, one of the most accessible programming languages, and one of the most popular. Every other Web page on the Internet includes some JavaScript code, and there's a profusion of online help available to learn it. 

Just a few ideas of what you could do with XML automation:

- Create bins based on input from a Filemaker database.
- Modify all the titles in a sequence in one click.
- Take all the clips with green markers, fix their aspect ratio, and stretch them to fit the frame.
- Create an edited sequence based on users' votes on a Website.

Whatever your job title, if you fulfill the duties of an assistant, online editor, or facility engineer, I encourage you to familiarize yourself with scripting platforms and the power they can provide. Yes, they require coding, but if you learn the craft it will take your post production skills to a whole new level. Trust me, the computers are here to stay.

To learn more about ReTimer and download a copy, CLICK HERE.

What about Avid?

Avid, Vegas, and other programs rely on an alternate exchange format called AAF. Unlike XML, which is human-readable, AAF is binary, so it's all machine code. It's definitely possible to read, write, and manipulate AAF files yourself — the instructions are FREELY AVAILABLE — it just requires a considerable amount of programming expertise to get started.

Drew Lahat is a Lead Engineer with LA-based Precision Productions+Post (