Thursday, April 24, 2008

Video codecs: iPhoto, iMovie HD, iMovie '08 and FLIP Video

As a part of my ongoing struggle with FLIP Video, I'm delving ever deeper into the broken world of Apple video.

iMovie '08, for example, recognizes some video formats when it's importing directly, but a smaller set when the video is stored in iPhoto. I even have an sneaking suspicion that my test results differ between my Intel MacBook and my PowerPC iMac.

The FLIP camcorder uses the 3ivx toolkit form MPEG-4 compression and playback, but it's a completely proprietary implementation. It can only be read with a 3ivx decode, so it's not what I want to keep video in.

So what format makes sense? I'd like something that
  • is fairly standard
  • is fast to edit
  • doesn't use tons of disk space
  • doesn't lose immense quality when it goes through edit cycles
  • is recognized by iMovie '08 even when the video is stored in iPhoto
One option is Apple's Intermediate Codec (used by Final Cut, emphases mine):
Final Cut Pro 5: About HDV and the Apple Intermediate Codec:

... The Apple Intermediate Codec is a high-quality video codec that Apple developed for use as an alternative to native MPEG-2 HDV editing in an HDV workflow. Instead of editing the MPEG-2 HDV data directly, you can capture video from the tape source and then transcode it with the Apple Intermediate Codec to optimize the video data for playback performance and quality.

Working with the Apple Intermediate Codec is less processor-intensive than working with native HDV. Unlike MPEG-2 HDV, the Apple Intermediate Codec does not use temporal compression, so every frame can be decoded and displayed immediately without first decoding other frames. The drawback of this codec is that it requires three to four times as much bandwidth and hard drive storage space as MPEG-2 HDV.

Data rates for the Apple Intermediate Codec are variable; the data rates and storage needed may vary slightly, depending on the complexity of your footage. Images with a lot of detail have a higher data rate, while images with less detail have a lower data rate.
I did some experiments converting FLIP Video to MPEG-2 and Apple Intermediate Codec (AIC). On my MacBook iMovie '08 recognized the AIC encoded .mov files within iPhoto (you need to restart iMovie to get it to recognize new iPhoto additions):
  • Original (3ivx): 3.6MB
  • Apple Intermediate Codec with AAC encoding for audio: 14MB
  • MPEG-2: highest quality, AAC audio - 15MB
    MPEG-2 "high quality" - 7 MB
So in my testing the MPEG highest quality was about the same size as the AIC file, but the MPEG-2 "high quality" was half the size. Both were fairly quick on a MacBook.

On my iMac, using QuickTime Pro, I wasn't able to find MPEG-2 as an option for export. I did find Apple Intermediate Codec and even on the old PowerPC machine the 3ivx to AIC conversion was pretty quick. The resulting file was "seen" by iMovie '08 even when it was stored in an iPhoto library.

So I guess for the moment I'm going to be transcoding to Apple Intermediate Codec. Problem is that QuickTime Pro doesn't do batch file export. More on that later ...

Update 12/25/08: This all largely obsolete when Apple finally updated iMovie HD so it will work with FLIP camcorders after you install the 3ivx files (at least on Intel machines).

In any case, I did come across more explanations of 3ivx and other video codecs in a well done Gizmodo review:
Okay, so all that stuff up there are industry-wide standard video codecs. On top of all of those, various entities love putting out their own spin on those standards. As we mentioned before, DivX (proprietary) and XviD (open source), for instance, use MPEG-4 Part 2 (more specifically, MPEG-4 ASP) compression, meaning stuff that'll natively play back MPEG-4 ASP will also play back DivX. Like the Xbox 360, for instance. There are a ton of MPEG-4 ASP-based codecs, actually, like FFmpeg, 3ivx and others, but DivX and XviD are the most common.
So 3ivx is a sibling of DivX. I wrote a later update on this topic.

No comments: