Curious Notes about WebM on YouTube

When looking at one of the trailers (Tetro: Original Trailer) that has been transcoded into WebM. I wanted to compare YouTube’s x264 settings versus their WebM settings. I’ve also uploaded some 1080p footage for more recent footage (in case the H.264 settings had changed between Dec. 2009 and now - which AFAIK they haven’t) to compare. It’s also important to note that the HTML5 access to YouTube videos is only available on non-monetized content.

During my testing I noticed that in the HTML5 Beta on older versions of Chrome and Safari (aka H.264 using browsers) when you select 360p for your video size, YouTube does NOT give you a 360p file - it is actually smaller in terms of resolution (480x270) and has to be upscaled. This is most likely a reason why my initial thoughts on Twitter didn’t match with what I had on paper.

Disclaimer: Subjective paragraph to follow - I’m not an expert and I’m judging just by general visual quality to my eye.

A quick visual inspection shows the WebM version in 360p seem noticeably sharper in terms of details than the 480x270 H.264 which had to be upscaled. The 720p WebM version was close enough to it’s H.264 counterpart. However I did definitely notice with the 360p version, a “quality bump” every once in a while as described in the ratecontrol section of a blog post by one of the x264 developers when criticizing the VP8 specification.

Using MediaInfo Mac the following settings can be found:

Tetro Trailer (Originally encoded 12/26/09)

Resolution Container - Codec Total Rate (kbps) Video Bit Rate File Size (MiB) Notes
640x360 WebM - VP8/Vorbis 812 ? 14.2
480x270 MPEG4 - H.264/AAC 500 393 VBR 8.7 Baseline Profile - HTML 5’s “360p”
640x360 FLV - H.264/AAC 677 568 11.8 Main Profile
1280x720 WebM - VP8/Vorbis 2887 ? 50.4
1280x720 MPEG4 - H.264/AAC 2172 2045 37.8 High Profile

Part of the reason I chose Teatro is that it has some excellent DOF changes, the other reason is that I just liked the visual style of the trailer. It was also the first trailer I clicked on that worked in the HTML5 beta that didn’t resort to using Flash because it has been monetized.

12 Second Test Clip Uploaded Today

Resolution Container - Codec Total Rate (kbps) Video Bit Rate File Size (MiB) Notes
640x360 WebM - VP8/Vorbis 709 ? 709 KiB
480x270 MPEG4 - H.264/AAC 508 415 VBR 751 KiB Baseline Profile - HTML 5’s “360p”
640x360 FLV - H.264/AAC 542 466 835 KiB Main Profile
1280x720 WebM - VP8/Vorbis 1736 ? 2.61
1280x720 MPEG4 - H.264/AAC 2120 2005 3.06 High Profile

What’s the conclusion for what YouTube is offering? Visually, WebM can be made to look quite decent - especially for what I believe is it’s target market; the web and mobile devices. However on higher resolution and higher bit rates, H.264 definitely appears better. I don’t think most people will notice - they’re close enough with the current settings. However I do believe that the WebM settings are more fine tuned than the x264 settings to get a little bit more video quality. Encoding my sample 12 second video with a relatively recent version of x264 locally with some rather generic settings is more visually appealing than YouTube’s.

Even though H.264 is definitely better on paper, I think VP8 will do just fine as a replacement for Theora and a competitor to H.264 for use on the web. For the near future (next 3 months IMO) you won’t see a lot of WebM footage available as the playback availability is extremely limited.