Flash vs. HTML5

There is a big debate raging in the world of the online video space.  It is really about formats and open source.  The purpose of this article is to put the Flash vs HTML5 controversy into perspective in a non-technical way.   Note that this article is also a blog so that it can be updated with the most current information.  Also I invite guest posts and corrections, as some of the article will be facts and some opinion.

Flash is the ever popular plug-in that animates graphics, provides for rich user interfaces and also the most popular form of streaming video.  Flash was once the flagship product of Macromedia, but Adobe needed to own it, so they bought Macromedia a few years back.  Not only is flash found on 98% of all desktop computers, it is increasing popular on devices such as game consoles, but also the new generation of smartphones (but not the iPhone, which is a whole other story).  A major advancement is that the latest version of Flash called 10.1  supports video streaming and is shipping on a number of phones including:  Droid, Palm Pre, Nokia, and Blackberry.

Now HTML5 is a new way to embed video into a page without needing a proprietary container.  Previously, you needed to embed a Flash or Silverlight player, and a lot of Flash developers owe their livelyhood to customers in need of video on their websites.  The new video tag in HTML5 is essentially a container for video, but the key to its future popularity is that you don’t have to know anything about Flash to develop video applications.    The community of web site developers who know HTML is infinitely larger than the Flash development community.    One of the things holding HTML5 from having killer video, is about to be solved.  Up until now, there has not been a state-of-the-art codec in the public domain (aka open source).  A codec is a software plug-in that converts the electronic bits your computer receives over the Internet.  A codec comes in two parts, the encoder which encodes the image into bits that can be streamed over the Internet, and a decoder, that takes the bits and turns them back into images (codec = “cod” for encode + dec for decode).  In the world of audio, and MP3 is a popular audio codec.   To clarify, the codec and the format usually have the same name.

In the video world, the codec that has been gaining popularity is referred to H.264.  It also has a container for DVDs and other applications like set-top boxes that is referred to as MPEG4.  Many people use H.284 synonymously but just remember H.264 is the codec and MPEG4 is the container.   It turns out that nowadays H.264 has become extremely popular.   Both Adobe’s Flash supports it and so does Microsoft’s Silverlight, and add to that Apple’s iPhone and many other devices.  So you think it must be “game over”, H.264 wins the codec wars.  Not so fast.

Remember HTML5 and all of those web site developers that want to use it?  So here is the issue, H.264 requires a commercial license and companies need to pay a royalty for it.  Remember that HTML is open sorce (aka free) and it is not likely that H.264 will end up in HTML5 anytime soon.  Well, Google has a vested interest in the success of the Chrome browser and the Chrome OS.  They really don’t want to be supporting Adobe or Microsoft any more than they have to.  Therefore, video in HTML5 is strategically very important to them.  Remember that Google owns YouTube a site responsible for delivering over 40% of the video content on the internet.  Recently, Google purchased a codec company called ON2.  On2 had a codec that was very popular in Flash called VP6, which was later supplanted by H.264.  On2′s latest codec called VP8 is very comparable to H.264 in overall video quality.  Some say it is better.   Google has two opportunities now, they can make VP8 the new encoding standard for You Tube videos and now that they own the product, they can easily make the encoder a plug-in to Chrome and ask their YouTube customers to encode the videos prior to uploading them to YouTube.  This step alone accomplishes two things.  It gets more people using Chrome as their standard browser, and it also gets a ton of VP8 content out there.  Not to mention the fact that it could potentially saved Google more than $100M a year in server and bandwidth costs incurred today, by doing the  encoding on their servers.   The second important move by Google is to make VP8 “open source”, which will enable it to become the HTML5 video standard.   All of the other open source codecs “pale by comparison” in the area of video quality.

******************************************************************

Update:  Kaltura in a recent announcement has announced support of HTML5.  Kaltura advertises itself as the “open Source” video platform.  This is a very bold move for Kaltura and it could open up a huge opportunity for the company.

In another recent announcement:

Microsoft Throws Its Weight Behind HTML5 and H.264

Microsoft has taken a big step toward standards-based web video by announcing support for HTML5 and the H.264 encoding format in Internet Explorer 9, the next version of its web browser. At its MIX10 developers conference, Microsoft became the latest company to throw its weight behind H.264-based HTML video playback, following YouTubeand Vimeo.

Using HTML5, publishers will be able to serve video directly into certain modern browsers without an external plugin like Adobe Flash or Microsoft Silverlight. Up until recently, however, most browsers didn’t support H.264 as the default encoding format. Today, users can access HTML5 video encoded in H.264 with Chrome, Safari or Internet Explorer with Google’s ChromeFrame installed. That means that only about 25 percent of users can actually watch HTML5 video encoded in H.264, according to Vimeo. But adding H.264 support to the latest version of Internet Explorer could boost the number of people that will be able to view video in browser without requiring a plugin.

Although Internet Explorer has been losing share for years, it still holds a sizable portion of the browser market — more than 60 percent in February, according to NetMarketShare. Launched about a year ago, Internet Explorer 8 has roughly 22 percent market share, while IE6 still holds a surprising 20 percent, despite being nearly 10 years old. But that could end soon, as multiple sites, including YouTube, are ending support for that version.

While H.264 is slowly becoming the default encoding format for video on the web, it isn’t yet supported by Firefox and Opera. Despite the fact that H.264 licensing body MPEG LA announced that it will extend its royalty-free license of the video codec for an additional five years, Firefox creator Mozilla continues to shy away from supporting H.264. Instead, Mozilla has decided to support video through the Ogg Vorbis encoding format, which is open source and therefore isn’t encumbered by licenses.

While Microsoft’s support of HTML5 and H.264 could potentially give in-browser video viewing a big boost, there are a number of issues that need to be resolved before the standard goes mainstream. In addition to lack of universal browser support, HTML5 also lacks support for advertising, the majority of which is built in Flash.

+++++++++++++++++++++++++++++++++++++++++++++++++++++

New Ann0uncement

Streaming Media Global

by Tim Siglin
March 17, 2010

The last time we explored HTML 5 in detail, specifically the video tag, the jury was out on whether the tag could be implemented with a specific codec: Apple had implemented H.264 in its Safari browser and Google had implemented both H.264 and Ogg Theora in Chrome, while both Mozilla Firefox and the Opera browser had settled for Ogg implementation, citing it as the open source video standard. Microsoft, for its part, was playing its hand close to the vest, telling the specifications editor of the HTML 5 working group, Ian Hickson, that it had no comment on either the tag or a particular codec.

At MIX 10, Microsoft’s developer’s conference that wraps up today in Las Vegas, the company has partially revealed its hand, announcing HTML 5 support for its upcoming Internet Explorer 9 (IE9) browser.

I say partially because, even though we know that Microsoft is supporting a large portion of the draft HTML 5 specification—joining Apple’s Safari, Google’s Chrome and Mozilla’s Firefox browsers in supporting Cascading Style Sheets 3 (CSS3) and Scalable Vector Graphics (SVG)—we don’t yet know other pertinent details, such as which video codec the new IE9 will be using. (UPDATE: According toYahoo! News, Microsoft is indeed using H.264 in its HTML implementation.)

Let’s look first at what we do know.

Compatibility
The essence of browser nirvana, the thinking goes, is to have content represented the same across any HTML-based browser. As such, most browser vendors have adhered to the Web Standards Project’s Acid Tests. Initial indications are that the IE9 browser scores much better on the Acid tests, which measure compatibility with cross-browser HTML code implementation, than any previous version of Internet Explorer. According to Microsoft, IE9 scores 55% on the Acid3 test, in contract to approximately 20% for IE8. By way of comparison, Acid3 scores for Chrome and Safari, based on WebKit implementations, are approximately 96% for each.

“IE supports CSS3 features such as rounded corners and opacity,” one report of the conference stated, “while also now supporting SVG (scalable vector graphics) even though Microsoft is pushing its own Silverlight platform for rich graphics.”

Speed
Acid3 isn’t the only test that is used for compatibility; the SunSpider benchmark test is also used for assessing JavaScript speed. IE9 has a markedly improved JavaScript engine, with an almost seven-fold improvement over IE8, which brings it into line with the Firefox 3.7 browser beta.

Given that IE9 is a preview release, there’s a good chance that JavaScript speeds could continue to increase. A part of the magic in the new JavaScript engine, named Chakra, is that it assigns an available core to work on processing the script. This hardware abstraction layer (HAL) allows the browser to take advantage of multiple cores without requiring the JavaScript or HTML programmer to program for a specific processor.

Another HAL that Microsoft uses is the graphics processor unit (GPU) as a way to offload graphics rendering from the CPU to the GPU. Microsoft calls this GPU-powered-HTML5 and was able to demonstrate smooth graphics and motion, as well as video playback.

Legacy support
IE9 will not support Windows XP, as the minimum requirement for IE9 is Vista’s Service Pack 2 (SP2).

Support for legacy browsers provides a launching point into the discussion of how HTML 5 video tags are handled, as well as a few possible scenarios around the video codec that Microsoft will choose.

What happens when those users who have legacy browsers stumble on a site with HTML 5 video content?

The HTML 5 draft spec (March 2010 version) includes two options of ways to handle HTML 5 video tags. Using the term “user agent” to describe the browser, the draft spec notes that content can be embedded within the video element:

“Content may be provided inside the video element,” the draft notes, adding “User agents should not show this content to the user; it is intended for older Web browsers which do not support video, so that legacy video plugins can be tried, or to show text to the users of these older browsers informing them of how to access the video contents.”

The spec goes on to note that this is not a workaround for addressing accessibility concerns (508a in the U.S.) and suggests that authors are to pre-embed “accessibility aids (such as caption or subtitle tracks, audio description tracks, or sign-language overlays) into their media streams.”

What This About Plug-Ins?
Isn’t the HTML5 video tag supposed to eliminate the need for video plug-ins?

The answer is a bit convoluted. While it is true that the HTML5 video tag makes it possible to directly embed video clips in web pages, eliminating the need for plug-ins, the specification does not require such, in part because of legacy browser backwards-compatibility requirements.

In fact, in one of the bastions of open source software, the news and opinion site Slashdot.org, says the HAL concept is giving hope to those who see their favorite browsers moving toward H.264 when the users want to use open source codecs.

“There’s nothing precluding the browser from using the OS centralized codec repository,” said one Slashdot poster, “to which a codec can then be added (if not there already). In fact, Opera 10.50 does just that on Linux (it uses gstreamer). It also uses its own copy of gstreamer on Windows and OS X, to which you can add codecs if you want to.”

A second approach that the HTML 5 draft suggests is the use of an external player.

“User agents that cannot render the video may instead make the element represent a link to an external video playback utility or to the video data itself,” the draft states.

This leads to a third option, however, which is not part of the draft spec but has been popular for quite some time and may continue to gain in popularity for those who continue to want to use Flash.

The HTML video tag provides the opportunity to offer up multiple versions of a video file, covering the options amongst browsers that have settled on one specific codec. Here is an example of code gleaned from Henrik Sjökvist’s website, in which he offers the third solution:

code

“A downside to this [HTML5 video] approach as opposed to using Flash or another plugin,” he states, “is obviously that we currently need to provide three versions of every clip we want to embed (MPEG4, Ogg and FLV). For legacy browsers that don’t support [the video tag] we need to use an alternative. An easy solution is to degrade to Flash using SWFObject.”

In Sjokvist’s version of the HTML5 video playback, with a failover to Flash, “the browser detects a video element and attempts to play it. If the content fails to play, a JavaScript kicks in and asks for the Flash player to play the video file that is encapsulated within an SWF (Flash-native) object.

Which Codec Will Microsoft Use?
All this talk about legacy support leads us back around to the question of which codec Microsoft will choose to use. My expectation is that they will use H.264 because it is natively supported within Windows 7 as part of the Windows Media Player, the exact same way that H.264 support on Apple’s Safari browser takes advantage of QuickTime to access the H.264 codec for playback within Safari on the Mac OS X desktop operating system as well as the iPhone mobile operating system.

So why does the operating system’s native support matter? In a word, distribution. The H.264 licensing addresses media players but not necessarily browsers.

This presents a conundrum for browser manufacturers that don’t have a single desktop operating system to rely on: Do they create one official version of the browser that includes H.264 or do they revert back to plug-ins to insert H.264 after the browser is distributed.

A Slashdot commenter sums up one side of the argument.

“If Firefox had H.264 support, it could not be redistributed. Period.” the poster said. “Everyone would have to download the ‘official’ version from Mozilla. No Linux distro could include it. No one could change the code and distribute it. It would cripple Firefox.”

Another commenter countered with the plug-in option.

“H.264 can be implemented as a plugin,” the second commenter stated. “Firefox needn’t include this plug-in by default. There are plenty of third-party H.264 implementations to choose from. Mozilla themselves could even create such a plugin as an add-on, and make it freely available (sans source, if necessary).”

“Mozilla are shooting themselves in the foot,” the commenter continued, “if their present stance is anything but bluster. The H.264 train is leaving the station, and Apple, Google, and even Microsoft are on board.”