When Apple launched the iPad , its lack of support for the flash browser plug-in started the HTML5 vs. Flash discussions. Does HTML5 really beat flash? HTML5: could it kill flash and silverlight? Will HTML5 replace flash? And so on…
As developers who work with the Flash platform, we like to point out a few of our observations.
HTML5 promises to bring rich interactive web in the future. Object animation, tweening effects, and video that have long been the domain of Flash. One of the upcoming features of HTML5 which is considered as a Flash killer is the new video tag. You can view the videos without a flash player plug-in !!
But there is a formidable hurdle to cross. Browser vendors cannot get to agree on which codec the video tag will support. “Ogg Theora” was the recommended standard video format in HTML5 and now will support H.264 video codec.
Firefox, Opera and Chrome support the Ogg Theora/On2 VP3codec. Safari, IE 9 and Chrome supports the newer H.264. All major browsers support either of the two codec. YouTube is already showing some videos in HTML5.
Ogg Theora is an open and royalty-free codec, but it is not as efficient as H.264. Google’s Chris DiBona stated that if Youtube were to use Theora as its codec, it would take up most of the available bandwidth on the internet.
Mozilla has also problem with H.264 codec because it would violate the principles of free software.
And there are few questions; Do we have facility to videoconferencing in HTML5? Do we have facility to live audio/video recording in HTML5? Are we able to add dynamic objects over the video? Can one add captions for the video?
HTML5 standards are yet to finalize and formulating them would take time. This would mean a lot of pain for the web designer / programmer over browser compliance.
HTML 5 is a programming language which needs to be interpreted by the browser. It is up to the browser to interpret that language and display the content. If the browser can't render the code, strange things start to happen in the display. Different browsers on different platforms interpret the code differently and browsers display the content as they see fit. Until HTML 5 gets standardized, each browser will interpret it differently.
Here are some lines from Lee Brimelow’s blog
“Now this is not to say that in the future, maybe they will all agree on an implementation. If that happens and it performs better than Flash, then that is how I will be delivering my videos as well. But another thing to point out is that Flash video is used for a lot of things beyond basic playback. Flash supports embedded cue points and alpha channels and is often used in ways beyond the traditional YouTube playback scenario. So while HTML 5 video looks promising, it is clearly way too early for people to be writing an eulogy for Flash video. Remember also that while the browsers get their acts together, Flash video will continue to evolve as well.”
Let us look through the flash gaming industry. Sony has sold 33.5 million playstation 3 units, Microsoft moved 40 million X-box 360 units, Nintendo 70 million and Farmville alone has 80 million active users.
Flash has so many attributes which cannot be easily replicated in HTML5.
Speed – ActionScript 3 Flash is so much faster than current Javascript implementations with the use of new Action script Virtual Machine 2.
Preloading – In flash it is byte-level preloading but in HTML5 it is object-level preloading.
Tweening and timeline animation – It is not easy to create time animations and tweening in HTML5.
Flash games can easily distribute as a single swf file and converted in to desktop applications using Adobe AIR.
Testing Flash and HTML5
Jan Ozer, an expert in video encoding technologies recently put HTML5 up against Flash in a series of tests that pitted the two against each other on both the Mac and PC and on web browsers including Internet Explorer 8, Google Chrome, Apple Safari and Mozilla Firefox.
Mac Tests
With Safari, HTML5 was the most efficient and consumed less CPU than Flash using only 12.39% CPU. With Flash 10.0, CPU utilization was at 37.41% and with Flash 10.1, it dropped to 32.07%
With Google Chrome, Flash and HTML5 were both equally inefficient (both are around 50%)
With Firefox, Flash was only slightly less efficient than in Safari, but better than in Chrome
Windows Tests
Safari wouldn't play HTML5 videos, so there was no way to test that. However, Flash 10.0 used 23.22% CPU but Flash 10.1 only used 7.43% CPU
Google Chrome was more efficient on Windows than Mac. Playback with Flash Player 10.0 was about 24% more efficient than HTML5, while Flash Player 10.1 was 58% more efficient than HTML5.
On Firefox, Flash 10.1 dropped CPU utilization to 6% from 22% in Flash 10.0
In IE8, Flash 10.0 used 22.41% CPU and Flash 10.1 used 14.62% CPU
References:
http://www.readwriteweb.com/archives/does_html5_really_beat_flash_surprising_results_of_new_tests.php
http://theflashblog.com/?p=1698