Compressor annotation plist format

Compressor accepts annotations on the command line via a plist file. This lets you add things like keyword metadata, author, etc. But Apple has neglected to document the file format. Luckily it wasn’t too hard to reverse engineer by poking at the traffic the compressor GUI sends to qmaster.

Under the root node, just make keys named ‘com.apple.quicktime.keyword’ or .producer or whatever. Then populate the values as you wish.

Attached is a sample plist file with a producer and keyword field. You’ll probably need to ‘view source’ to actually see it in your browser. Merry Christmas.

Untitled.plist

DFXP to SCC

As promised, I’m posting some sample code for converting from DFXP to SCC. Actually, the SCC generated is contained in a class (captionConvertClass.php) independent of the DFXP parsing. To use it, all you do is:

$myClass = new captionConvert(startingTimecode);

$myClass->addCaptions(time,caption);

$finishedCaptions = $myClass->outputCaptions();

the “startingTimecode” item is somewhat important. Quicktime files can have timecode tracks that don’t start at zero, but DFXP captions are always relative to a 00:00:00.00 start time. So, if the timecode track of your movie begins at 01:00:00:00 (as any file coming out of FCP will) but your DFXP file starts at 00:00:00.00, you need to let the convertor know so that it adds the right times.

Otherwise, it’s pretty simple and pretty basic. There are lots of things it doesn’t do (scc formating, proper Drop Frame handling, foreign characters, etc). But at least it’s a start. If you want to see conversion done right, look at SCC Tools, which is much more feature complete, at the expense of being much more complicated and … perl.

captionConvert.phps (sample dfxp parsing)

captionConvertClass.phps (plain text -> scc conversion)

Captioning with Compressor

There’s a lot of misinformation on the net about how to do proper Quicktime captioning using Compressor. Here’s the deal.

To start with – Compressor 3.0.4 can caption MPEG-2 files, as well as MOV and M4V files. When it first shipped, it could only deal with MPEG-2, and some sources haven’t been updated to reflect the additional formats. That means, you can add a proper closed captioning track to a quicktime movie, and have it playable on an iPhone or Apple TV, etc.

Next, the captions must be in the Scenarist Closed Caption (SCC) format. This is a really funky format, as my recent rants have attested. The definitive site on the format is that of the SCC Tools project. There’s not a ton of other information out there, as much of the spec is locked up in a design document that’ll run you $170.

I believe the commercial MacCaption application will output SCC, as will a handful of other applications. Next week, I’ll post some sample code for converting DFXP (flash) captions into SCC.

So, to get started, open Compressor and add your video. Highlight the background space of your imported video and then click the “additional information” tab.

Untitled

Now, select “choose” at the top and point to your SCC file. Click save at the bottom of the pane.

Now you just need to pick your preset (again, any mpeg-2, mov or m4v preset) and submit the job as per usual.

Build your own Perian

Perian 1.1.1 came out today, with fixes for flash video playback and a number of other things. This gives me a good chance to mention something we do when using Perian with Media Mill.

Because Perian doesn’t always play nice with other codecs on your system, I was long hesitant to add it to the codec pack we use for the media mill cluster. But, a few months back I realized I could do a custom build of perian that just had the codecs I wanted. It’s not very hard at all. Here’s the deal.

First, get Xcode 3.1 – you’ll need to sign up for a free apple developer account.

Next, open up your terminal, move to a directory you want to work in, and type “svn co http://svn.perian.org/tunk/” which will give you the most recent Perian source.

Picture 2-1

Next, browse to that folder in Finder and double click the xcode project file. Find the FFusionCodec.r file and double click it.

It’s a fairly readable file, with sections for each codec. Just comment out or delete the codecs you don’t want. In my case, I kept just a few.

Picture 3-1

When you’re done, hit the project setting dropdown and switch to deployment, then press the big ‘build and go’ button. A while later, it’ll finish, and you can find the “build” folder in the same place you found the xcode project. In there, find the deployment folder, and in there, find your nice shiny new Perian.component. Drop it in your /Library/Quicktime folder and you’re done.

If you want to double check that you’ve gotten rid of the codecs you don’t want, grab a copy of Fiendishthngs and run it before and after installing.

Open Directory for Editing Suites

I’m currently working on switching our edit suites over to an Open Directory authenticated setup, with centralized storage of permissions. The idea is that we want a student to be able to sit down at any Mac editing station and have the dock look the same, Final Cut behave the same, etc. I figured I’d offer a few tips for folks trying to do similar things.

I’m an Open Directory newbie. There’s plenty of documentation and training material out there, but often it’s overly complicated. For a setup like this, here’s a few things I’ve found helpful.

  1. In workgroup manager, make sure each user has a local home (/Users/username) and a network home (afp://server/sharename/username) and leave the network home highlighted.
  2. Create a group to assign the preferences to, and then make each editor a member of that group
  3. In mobility preferences for the group, be sure that you ‘always manage’ all of the sync options, even if you don’t intend to use background or manual sync
  4. Sync a non-existant folder in each of the important ‘home directory’ folders. Otherwise, folders like Music, Pictures, etc won’t exist for users on machines other than the one they do their first login on:

Picture 4-4

That’s pretty much it. You should be able to leave the OD server in ‘basic’ mode, and do all of your work within Workgroup Manager, aside from setting up the afp share. Then just add the server within Directory Utility on the clients and you’re set. Syncing is very quick and painless.