VP8 (WebM) vs H.264 (MP4) – December 2012

Edit: As pointed out by Hupo, who did a significantly better test than the mere “for fun” one posted here, it’s apparent that H.264 still leads VP8 in terms of quality. And, even more interesting are recent developments in H.265 and VP9, also mentioned in his post, due to the fact H.265 has been approved by the ITU, essentially advancing it a step further than VP9 in terms of potential hardware support.

Given that H.265 and VP9 are right around the corner, I felt this would be a good time to get a refresher on VP8’s progress. As tested back in August 2010 on this blog, H.264 turned out to be superior. The test was also conducted on H.264’s Baseline Profile because it did made sens back then to encode web video in High Profile. Nowadays however, thanks to better CPUs and widespread hardware acceleration, we can safely encode H.264 in High Profile for web videos, which also means we can extract more quality out of it, which is a good thing. VP8’s encoding library has also significantly improved, giving us a very competitive codec even with H.264 High Profile.

The encoding was done on a video clip which has some grain, resulting in a more difficult encoding situation. The following encoders and specs have been used:

H.264
Encoder: x264 rev. 2208
Quality: Placebo High Profile in XMedia Recode
Bitrate: 2 pass @ 2 Mb/s
Resolution: 960 x 540

VP8
Encoder: libvpx 1.1.0
Quality: Best in XMedia Recode
Bitrate: 2 pass @ 2 Mb/s
Resolution: 960 x 540

Results

Source

VP8

H.264

Details

Source

VP8

H.264

Winner

As you can see, this time around however, VP8 wins (see Hupo’s counter-post for a better comparison, where H.264 wins). H.264 doesn’t look bad in practice, but VP8 manages to retain a more accurate encoding of the image. If you do a back-and-forth comparison (simply open the images in new tabs (Open image in new tab)), you’ll see what I’m talking about.

The upcoming H.265 claims to be twice as efficient as H.264, which is mind boggling if it turns out to be true, and definitely gives VP9 and Google quite the challenge. However, contrary to many’s belief, Google was able to push in some significant improvements in its VP8 encoders, enough to make it better than H.264, so there is still hope, in my opinion, that VP9 can beat H.265.

15 thoughts on “VP8 (WebM) vs H.264 (MP4) – December 2012

  1. Nobody cares. Quality is not the most important factor.

    H.264 is the defacto standard in the industry supported by almost every digital and video camera, browser, operating system, editing software, website, etc etc. Interoperability and support by third parties is the key to a useful codec.

  2. Well, I’m sure at least some people do (there’s sizable support for it), but I agree H.264 is the current defacto standard in the industry; that’s not even questionable.

    What is, though, is what’s going to happen with H.265 and VP9. One of them will inevitably replace H.264 as the industry standard in several years, but the question is which.

    When Google acquired On2, one of the big question was, can they fix the codec, because it was obvious that VP8 had nowhere near the level of finish that H.264 had at the encoder level. So if Google could fix it, it could establish its reputation as a potential industry disruptor in consumer video codecs.

    This is why this post is important, because having confirmed the significant improvements in encoding technology by Google, it positions VP9 as a far more interesting codec than if Google had not shown the chops to fix VP8 in the first place.

    Quality may not be the most important factor, but at one point in a codec’s life, it is. If VP9 can prove to have a significant advantage over H.265 in quality, and of course in many other areas such as licensing and implementability, it could win the race.

    Others might tell you this isn’t even important because it’ll take years before H.264 goes away, but these years too will pass, just like they did for MPEG 2.

  3. @Luke Nothing really looks good at 1 Mb/s with 720p, 2 Mb/s is more realistic considering you can easily need upwards of 3 Mb/s with 720p content with H.264/VP8. The goal is not to challenge the codecs in an unrealistic scenario, although I think H.265/VP9 will pull that stunt.

    @William Motion is overrated. Just kidding, I know it’s not a very thorough test, but trust me, you won’t see anything glaringly different with the complete source, only that VP8 is indeed closer to the original. But the margin is so thin, you can probably call it a tie too. As mentioned in my answer to Nathan, the point isn’t really to say you should encode everything in VP8 now, obviously you shouldn’t, but more so to look at Google’s improvements which are somewhat of an indicator to what they can do with the upcoming VP9, so I won’t go out of my way to provide an in-depth comparison.

  4. Yes, you’re right. This is a very shallow analysis. However I don’t think it’s worth the effort at this point, considering upcoming codecs and H.264’s actual dominance. I’d like to point out however that just by looking at the videos, it’s visually percetible that VP8 is closer to the original.

    However, this is admittedly very unscientific, but I think I’ll put in the extra effort for H.265 and VP9 ^_^

  5. lol @ Hyunseung

    on a serious note, I find the h.264 capture above to be a bit better (although insignificant to the naked eye) compare to the VP8.

    how is the difference in term of file size?

  6. I think better formats using less size and power is very relevant. If I can get the same quality with nearly half the size I would certainly use the codec. Let’s not forget that 4k TV’s are out and will slowly start to dropprices and when that happens people are going to want content in 4k. A codec such as H.265 and VP9 will play an important role as although we have 50GB blurays and up to 100gb I have a feeling 100gb blurays for printing movies will be a bit too expensive due to the cost of the disc itself. I believe most companies will want to stick with 50gb and simply use a better codec to deliver 4k content. As for video phones I do care about quality as I stated before getting better quality with less data help a lot in the video phone sector. As our communication methods change the one thing that remains the same and will for awhile is the bandwidth is expensive and some folks are so cheap they still use DSL as a form of broadband. Using less and achieving more is a no brainer.

  7. If it’s a tie between VP8 and H264, I would always support the free alternative. Industrial elephants like Apple, Microsoft, Adobe, Canon and Sony are never gonna support open formats, unless they’re forced to do it.

    If I had to deliver a lossless video or audio recording to someone, I would always send an MKV or a FLAC file and let the recipient bother with the container conversion :P

    The main reason why we are still (indirectly, at least) paying with license-encumbered containers – even nowadays when there are equally good (or even better) free alternatives – is because we are letting the industry decide which formats we should use. I have had enough of that.

  8. Well, you aren’t, really. The industry makes content deals and the next thing you know, Netflix is streaming House of Cards season 2 in 4K in HEVC on Samsung TVs.

    Yes, consumers decide with their money, but that only works when they actually have a choice. In the case of video codecs, it’s even worse, because in reality, only a tiny fraction of the population knows what they are or cares about them.

    So no, you’re not letting the industry decide which formats we should use, because even if you decided that you would not let them, you wouldn’t have a choice anyway.

    Now, it’s a completely different story when you have Google, another industry giant, pushing an open codec like VP9 on a giant video delivery platform like YouTube.

    But when the industry’s gonna say, look, we have 4K TVs with HEVC hardware decoders in them, but not VP9, so we can’t playback 4K YouTube, but all of your competitors have 4K with us now, Google’s gonna have no choice but to embrace HEVC, just like they did with H.264 in Google Chrome (remember, they had said they would drop playback support, and that didn’t happen).

    I’m afraid that regardless of the merits of each codec, the one with the best lobbying / hardware support will win.

Leave a Reply

Your email address will not be published. Required fields are marked *

− 2 = 5

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>