WebM vs. H.264: A First Look

Article Featured Image

This article compares H.264 to WebM, Google's implementation of the VP8 codec, using three variables (encoding time, compressed quality, and CPU requirements) for playback on three personal computers. Here's the headline version of the results: using Sorenson Squeeze to produce both H.264 and WebM, the latter definitely took longer, but there are techniques that you can use to reduce the spread to less than 25%, which is pretty much irrelevant. Though H.264 offers slightly higher quality than the VP8 codec used by WebM using the aggressive (e.g., very low data rate) parameters that I tested, at normal web parameters, you couldn't tell the difference without a score card. Even compared to H.264 files produced with x264, VP8 holds its own.

The most significant difference between the technologies is the required CPU horsepower to play back the respective files, as shown in Table 1, which contains the results from four different computers. All numbers are "best case," or the lowest CPU utilisation in any of the tested browsers. More on test procedures later.

On a MacBook Pro with GPU acceleration for H.264 decoding, WebM took 38% of the total CPU to play back a 720p file, compared to 24% for H.264 played via Flash and 15% via HTML5 in Apple Safari. On an Acer Aspire One netbook without GPU acceleration for H.264, WebM was actually slightly more efficient than H.264 played back either via Flash or HTML5, though the difference wasn't significant. Note that the tests on this small-screen netbook involved an 640x480 file, not 720p.

On an HP 8710w mobile workstation with GPU acceleration for H.264 playback, H.264 via Flash required 70% less CPU power than WebM to play back the 720p file, and H.264 via HTML5 took 47% less CPU power. On my daughter's iMac, WebM and nonaccelerated Flash-based H.264 playback ran neck and neck, while Apple's Safari, presumably with hardware acceleration, proved 54% more efficient than WebM.

Basically, though, there are huge swings with the individual browsers. Where GPU acceleration exists for H.264, it's significantly more efficient than WebM; where it doesn't, the two formats run neck and neck. At this point, between Flash Player 10.1 with hardware acceleration on supported graphics cards and platforms and Apple's own Safari browser, there are a lot of hardware-accelerated platforms for H.264 playback and few if any for WebM, though they may come in time.

Interestingly, on the WebM website, Google says, "Note: The initial developer preview releases of browsers supporting WebM are not
yet fully optimised and therefore have a higher computational footprint for screen rendering than we expect for the general releases. The computational efficiencies of WebM are more accurately measured today using the development tools in the VP8 SDKs. Optimisations of the browser implementations are forthcoming."

Truth be told, I'm not that much of a geek, so the low-level development tools were a nonstarter for me. However, I did download the DirectShow components to my two Windows computers and played the WebM file via Windows Media Player. On the HP 8710w, CPU load during playback of the same HD WebM file was 18%, with all acceleration disabled, compared to a low of 70% on any of the tested browsers and 21% for hardware-accelerated Flash H.264 playback. On the Acer Aspire One, CPU load dropped to 24% (30% with hardware acceleration disabled), down from a low of 51% with any of the tested browsers and compared to 53% for nonhardware accelerated Flash-based H.264 playback.

I'm from Missouri (the "Show Me" state) when it comes to all codec-related claims, so I'm not willing to assume that subsequent updates will reduce browser-based WebM playback loads to these levels. If that occurs, however, the value proposition for WebM as compared to H.264 changes to similar quality, a bit slower encode, but much lower playback requirements, which could be pretty compelling, particularly for low-powered mobile markets.

Now that you know the end of the story, let's dive in at the beginning.

Streaming Covers
Free
for qualified subscribers
Subscribe Now Current Issue Past Issues