29 May 2010

Watching YouTube in HTML5 mode

YouTube HTML5 throbber Earlier this year, YouTube launched an experimental HTML5 video player as an alternative to the ubiquity of Flash on video streaming sites. I was curios to see if the new technology has any advantages, so I decided to give it a try in . Right now, the test is basically limited to the browsers with native h.264 video codec support – Safari and Chrome -, at least until more videos are available in the newly-released open source WebM format, which and will also support. You can join the beta test in Internet Explorer 9 also, but you will only see the throbber instead of videos, because the codec isn’t integrated in this preview.

Unlike other Google beta releases, which tend to be polished enough for regular use, this one really feels like a work in progress. When I first joined the experiment, about two weeks ago, the video controls were practically unusable, because they kept collapsing before you could click on them to change the volume. The playback quality was really poor on low resolution, with lots of pixelation. Since it’s basically the same video file, I expected the quality from the different players to be more or less the same. Flash probably employs some anti-aliasing to give the impression of smoothness. On the other hand, the progress made in this short time is impressing: these days the quality is almost indistinguishable from Flash and the controls have been fixed and redesigned to match the new Flash player. YouTube controls HTML5 and Flash

Of course, the experience is far from perfect yet. Even with the HTML5 experiment enabled, some videos continue to default to Flash, namely the ones with ads, captions or annotations. I think the team behind the project is already testing HTML5 videos with captions, because I have found at least one example. The same happens when you play videos on a channel page or embedded on other sites. In fact, given that YouTube forbids video downloads, I fear they will never release an official option to embed using strictly HTML5, since this could expose the path to the video file stored on their servers. Other small features are also missing: there is no full-screen option (although you can activate it in Chrome with an extension) and the volume level resets between each video to maximum, whereas the Flash player would remember the last used value. Also, videos no longer have customized context menus for several YouTube features.

YouTube performance HTML5 vs. Flash Even though I have only listed disadvantages until now, there is one thing HTML5 is better at: performance. Usually, about half way through a Flash video, the fan on my laptop would start to speed up and blow out warmer air, indicating the processor was hard at work. It took a while before I noticed it, but that usually doesn’t happen with HTML5-rendered videos. I made a small test with a video at low resolution and the difference is pretty clear in the Chrome task manager: Flash uses twice the amount of RAM and 50% more processor power than HTML5. The CPU utilization varies a lot, but over time it averages around 20% for HTML5 versus 30% for Flash. Some earlier tests suggested Flash has a better performance, but, at least for me, the opposite is true. And other users seem to back this up: look on this forum thread for the test results from link48010 with Safari on Mac OS:

no Videos playing;
Fan Speed: 1800 RPM
Temperature: 110 F
After eight minutes of video played by flash they are as follows;
Fan Speed: 5000 RPM
Temperature: 150 F
After eight minutes of the same video played in HTML5;
Fan Speed: 1800 RPM
Temperature: 130 F

For now, I will keep using the HTML5 player for it’s slightly better performance and to see how it evolves over time. If you ever run into playback issues with it, you can easily reload the video in Chrome’s incognito mode: the experiment uses a cookie to track if it’s enabled or not, so without it the incognito window defaults to the Flash player.

3 comments:

Ileane Smith said...

Hi Fors, I had to switch off the HTML5 experiment because with it turned on, I could not access the full screen on my Blogger in Draft editor. It took me awhile to figure out that this was causing the problem until someone suggested that I try another browser. When I tried IE8 and things were fine I realized the only recent change I had made on Chrome was joining this experiment, so I switched it off.
Thanks for sharing all of the technical details.

George B. Moga said...

Hi, Ms. Ileane!
That's a very strange bug.
I didn't notice anything wrong with Blogger, but I write my blog posts in Windows Live Writer and so I rarely use the Blogger online interface.

youtube html5 player said...

I have no words for this great post such a awe-some information i got gathered. Thanks to Author.

Post a Comment