Friday, January 22, 2010

Apple’s H.264 codec – sucks?

That was the takeaway from yesterday’s meeting of the Boston Final Cut Pro User Group, where the topic was delivering content using H.264.

First up was Francesco Scartozzi of Matrox, demoing their MAX technology (a hardware H.264 compressor.) MAX is available as a plug-in card (CompressHD for $495) or as part of one of their I/O products, and provides one-pass compression in faster than real-time. A 30 second clip was compressed in 3:30 seconds on a MacBook Pro, and in 20 seconds using a MX02 Mini attached to the same computer. It’s faster than an 8-core Mac Pro!

Comparison of performance compressing a video to Blu-ray using Compressor and MAX on an 8-Core Mac Pro

Perhaps more importantly; it actually does a better job of compression than Apple’s H.264 compressor, creating smaller files that look better.


If you edit using a MacBook (that has the ExpressCard 34 slot) then a MX02 Mini looks like a great idea. Even if you have a maxed out Mac Pro, using a MAX means your computer can be back doing editing, rather than devoting cycles to Compressor. You can even use it to compress Screen Flow screen captures, though the output is limited to a maximum of 1920 x 1080.

Just be warned that they sell the MX02 Mini (and other products) with the MAX technology, and without.  The MAX technology adds $400 to the price, and can't be added later. B& H is currently selling the MX02 Mini MAX for $795

Someone asked if you could use it to do live compression, and he suggested that would be possible in the future with a software upgrade.

Next came Craig Seeman of Third Planet Video and a CreativeCOW forum host, to talk more about the problems of H.264 encoding, the deficiencies of  Apple’s codec, and how Telestream’s product Episode Encoder provides more options and control than Apple’s Compressor.

Describing H.264 as the “IT” compressor, and himself as a codec junky, he pointed out that:
  • Microsoft's Silverlight supports H.264 and is used for NetFlix streaming
  • Silverlight supports the .Mov extension on Windows computers
  • There’s no reason to encode video to .FLV (Flash) UNLESS you want an alpha channel video, which FLV supports, but H.264 does not
  • Apple’s codec used to be the best, but now it’s the worst; because the others got better.
  • Apple’s compressor doesn’t support CABAC, only CAVLC*. MAX uses CABAC
  • All things being equal, two-pass compression is better than one-pass, but MAX’s one-pass is better than Apple’s two-pass.
  • Apple’s compressor produces higher bit-rate movies, that have lower visual quality.
* Context-adaptive binary arithmetic coding (CABAC), an algorithm to losslessly compress syntax elements in the video stream knowing the probabilities of syntax elements in a given context. CABAC compresses data more efficiently than Context-adaptive variable-length coding CAVLC but requires considerably more processing to decode. - Wikipedia

Craig then gave a brief demo of Episode, showing some of the more complex features – including 5 types of de-interlacing! – and said that it offers a lot more options and power than Compressor. It also works with MAX. Episode can do things that Compressor can’t, and even allow you to do things that aren’t strictly standard: he gave an example of creating a low resolution video but with PCM audio for the film composer to work with. As he warned; you have to be careful; with great power comes great responsibility. But as well as being able to create things that could really screw you up, you can also solve problems that Compressor can’t.

When not trashing Apple’s Codec, he was also doing his best to kill Flash video (“there’s no reason to use it”, “Flash uses too many processor cycles”) and he is hopeful that HTML 5 - which makes it possible to play back video in a browser without a plug-in - will hasten Flash video's demise.

I always like it when you go to a lecture that has immediate application and is of-the-moment, and last night’s talk was one of the best; today there were a slew of announcements relating to HTML 5 and video. YouTube and Vimeo have both added HTML 5 support. And while yesterday Safari and Chrome were the only browsers supporting HTML 5, today Firefox 3.6 is out and it now supports HTML 5 audio and video.

In conclusion, Craig said that there is no “Best;” there’s only compromise. He gave as an example a clip containing two renderings of the same logo, and how one set of compressor options created the best rendering of the logo in one segment, but a different set gave better results in a second segment in the same clip.

Let the compromise continue.


No comments: