VP8 vs. H.264

Brandon Aaskov
4 min readApr 3, 2015

--

(Originally Written/Posted on May 19, 2014)

History

Basically, the gist is this. The IETF was supposed to decide late last year what codec was going to be the standard for WebRTC: VP8/VP9 or H.264/H.265. WebRTC is an emerging standard for real time communication over the web for video/audio. I’ve done some experiments with this over the past couple of months that I’d like to dive into in future articles. But, in true industry fashion, no decision was made and they left it up to all the people in the world to determine which is which.

The Licensing Problem

Historically, H.264 has come with some licensing costs as MPEG-LA holds the patent, and they will until at least 2027. That gave Google a huge leg up in getting hardware and software engineers to adopt their open codec. However, at that same IETF conference, Cisco announced that it will be making a binary distribution of H264 (dubbed OpenH264) available, and that they would eat the licensing costs for the end user and deal with MPEG-LA directly. However, there are caveats to that generosity that need to be taken into consideration when building a product, but they’re pretty fair.

The Hardware Problem: Encoding

This is a deep subject, but what you probably care most about is which performs better. The short story is that, in 2011 anyway:

“When comparing VP8 and x264, VP8 also shows 5–25 times lower encoding speed with 20–30% lower quality at average. For example x264 High-Speed preset is faster and has higher quality than any of VP8 presets at average.”

The Hardware Problem: Decoding

The other aspect is playback performance. Typically when codecs start out they are decoded in software only. Over time, hardware acceleration is adopted by hardware manufacturers (which obviously update much slower than software).

By this point, H.264 is the clear winner for hardware acceleration support, despite the licensing. The iPhone 4, iPad 2 and Apple TV 2 all had an ARM Cortex-8 processor that supported hardware acceleration for VP8. They switched to the Apple A4 chip, which technically extends the Cortex-8 processor, but I couldn’t find any definitive answers if that chip still supports hardware acceleration for VP8; i imagine it does.

Most articles from the 2010–2011 days discuss performance benchmarks about hardware acceleration and the use in Flash players. As we see Flash quickly go away in favor of HTML5/native solutions, software decoding is becoming less of an issue. In 2011, hardware acceleration (thanks to Chip&Media) got to a point where they could use a hardware-only solution to get 1080p playback at 60fps.

The Standards Problem

I’m honestly not sure how much has changed since 2010, but back then the creator of the x264 codec criticized VP8 for its lack of standards definition. That said, it’s undeniable that H.264 is a robust standard and has been in place longer.

The Audience

This is really the most important part. Does your audience mostly use old Windows XP machines, or are they millennials primarily watching video on mobile devices and laptops? If you find that the majority of your audience are using devices that support only H.264, well then your answer is pretty clear. Maybe your audience is cutting edge and it doesn’t matter. At that point, it’s a matter of deciding whether or not Cisco’s terms work well for your business.

WebRTC and Why Do We Care?

The reason the IEFT met late last year was to discuss what was going to be the standard for WebRTC, not the web in general (though the impact would be largely felt, regardless). Unfortunately, most of the people in the room were too biased to begin with and those that weren’t felt they didn’t get enough info to make a decision. So we’re left with no standard for WebRTC.

WebRTC could be revolutionary the way that instant messaging was. This is an area with applications that could be so life-changing that it’s almost hard to consider the multitude of possibilities (think Oculus Rift and real time video/audio communication, for instance). Needless to say, it’s important to get this right. Until there’s a clear winner, or the next versions of the codecs (VP9 and H.265) come out and have a battle royale, the industry will likely continue to use H.264 or perhaps support both. I can’t think of a single media company that uses VP8/WebM only — even YouTube doesn’t do that, and Google owns both.

My Decision (Conclusion/Rant)

Right now I’m leaning heavily toward H.264.

Google bought On2, creators of the VP6 codec that was originally the only thing you could play in a Flash video player. Then one magical day, H.264 videos were allowed to be played back in Flash. And the industry lunged forward ditching VP6 as fast as it could. If you’re ever watching an old video on YouTube and you try to skip to a certain time and it jumps ahead several seconds, that’s because it’s an old VP6-encoded video that can only seek to keyframes. I hated VP6. So did everyone else, but it was all we had. Once the H.264 Flash support came about, On2 quickly started to fade. Google bought them and saved the day. But these newer codecs are based on that older, VP6 codec that I’ve come to loathe. It too suffered from lack of hardware support, and slower encoding times that output lower quality videos. 2-pass VBR encoding was necessary just to get the quality up and file size down. When H.264 became a viable option, 1-pass CBR was the better option at a time because you could get videos live faster and it would be about the same file size as the VP6 equivalent and look better. And play better on devices. Given that history, I can’t put my faith in the VPx codecs. Google’s effort to create an open solution for the web is novel, but in my personal opinion, they’re backing the underdog codec. And now that Cisco is offering up a binary solution that eliminates licensing costs (at least for most people), it seems like sticking with H.264 for now is the right choice. If the VP9 codec drastically improves and comes along with widely supported hardware decoding, we’ll be revisiting this dilemma.

--

--