Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML 5 <video> tag vs Flash video. What are the pros and cons?

Tags:

html

flash

video

People also ask

Why is HTML5 better than Flash?

There is no doubt, HTML5 is more accessible than Flash. HTML5 consumes less processing power than Flash, so it runs faster, and is easier for people with disabilities to interact with. HTML5 provides easier multimedia integration, making content more accessible on all browsers and platforms, including mobile devices.

What are the advantages and disadvantages of HTML5?

HTML5 has short and crisp syntax and comes with smart and improved security features hence it became very easy to write and manage HTML5 code. HTML5 also included temporary client-side data storage with the help of SQL which made it possible for the users to browse already loaded content even when they are offline.

Is HTML5 more secure than Flash?

Answer: HTML5 is more secure as compared to Flash when considering the fact that HTML5 does not require the use of external plugins, unlike Flash. However, as HTML5 uses Javascript, the malicious code can be inserted in HTML5 without much difficulty.

What is HTML5 and Flash?

Modern HTML5 has feature-parity with the now-obsolete Adobe Flash. Both include features for playing audio and video within web pages. Flash was specifically built to integrate vector graphics and light games in a web page, features that HTML5 also supports.


Imagine if there was no img tag. If you want images, you have to use a 3rd party plugin, that is really slow and has no standard way to embed it in a page. You can't easily copy images in this way, and search engines basically have no clue what if it's an image or a game or anything.

Without this, no images were available.

Then imagine that a browser was released that just let you use this fancy new img tag.

The video (and audio) tag are a logical sensible way for things to work. We shouldn't need a third party plugin to use a completely standard media format.


The biggest benefit of <video>? It's easy. Crazy easy. Ridiculously easy. Your-grandma-can-code-a-video-tag easy. <video src="myfile.ogv"></video> and you're done.

<video> also has clear benefits for your users. They get a browser-native video player, which can potentially be very efficient. They get a consistent UI that won't change from site to site. Mobile browsers that may not implement flash can still implement <video>.

The only con is a temporary one, and that is compatibility. IE8 doesn't support <video>, and it will be some time before IE9 is widely installed. As well, there's some fight over which codecs to support for the videos - Firefox, Chrome, and Opera all support both Ogg Theora and WebM, while Safari and IE are shipping H.264 (though either can support Theora/WebM with proper codecs). For now, this just means that you have to post your video in two formats and provide them both with the source element, i.e.:


<video>
  <source src='video.webm' type='video/webm'>
  <source src='video.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</video>

To add support for IE 8 and earlier, and other downlevel clients (like older versions of FF/Safari/Opera/etc), just put your standard video embed code inside the <video> tag, below the <source> elements. If the browser supports <video>, it'll ignore the embed. If it doesn't, it'll ignore the <video> and run the embed instead.


Flash is slow and inefficient on non-Windows platforms. It has potential security flaws. It stores "flash cookies" on your computer that you don't know about. There is no flash on the iPhone and unlikely ever will be (as a result of its being proprietary and its high CPU consumption).

HTML 5: Could it kill Flash and Silverlight? is an article that might answer your question.

There are probably more reasons out there.


There are many good points here, and like a Martial Arts fighting style, each point has its thrust, and each can be defended; but each can be defeated with the proper moves.

Anyone standing on arguments about "propietary" plugins will fall quickly. Microsoft, Apple, and Adobe all bear the guilt, but that's just BUSINESS. You won't change business overnight, and each layer of complexity added by a new tag such as <video> which supports a very technical interface will result in * slightly * different implementations by each browser.

HTML 5 works now, and so does Flash. How it is implemented, the skill it requires- this defines each resource, whether it's an employee's performance, a webmaster's power, or a domain's influence.

Although I'm only 40, I began programming when orange or green monochrome monitors were the color choice, and hardware installation came with prayer books instead of instruction manuals. Maybe you could figure out AT commands for the modem when it wouldn't configure with your hardware, and 64K RAM was like, WOWWWWW!

HTML 5/Flash is a minor nuisance compared to that crap. Let's all learn how to collaborate in community toward a better resource. There is an Open Source Flash Project, it will have bugs. So will HTML 5...

Every argument here is true, but not necessarily productive. Use that energy toward a solution.


Flash is a real headache on non-Windows platforms. Not only is it slow and inefficient (as someone else pointed out), but it isn't very stable, either. As we learned at the most recent Apple WWDC, "browser plugins" (read: Flash) account for the majority of all application crashes across all of Mac OS X (and by "majority", I mean some absurdly high number like 80% or something, can't remember the exact figure offhand). This is such a problem on Mac OS X that for Snow Leopard, Apple has re-engineered Safari so that Flash runs, not just sandboxed, but in fact as an entirely separate process, so that when (not if) Flash crashes, Safari as a whole remains unaffected.

The instability of Flash on OS X, coupled with its poor performance, is why...

  • ...Flash is not now, nor unlikely to be soon, available for the iPhone. I disagree with the premise that people don't want to watch video on their mobile devices -- this is why Apple made a special arrangement for YouTube to serve their content in h.264 for the purposes of allowing it to play on the iPhone. I, for one, happily paid the $10 for MLB 2009 exactly because I could watch video on my iPhone, and if they made every game available for live viewing, I'd pay much much more.
  • ...so many Mac OS X users (like me) are installing Flash blockers for their browsers. By my choice, Flash content no longer even loads in my browser without my explicit permission. Since installing it, my CPU usage has dropped considerably, and my browser crashes have basically gone away. This is great news for me, of course, but it's bad news for any advertisers hoping to serve me Flash-based ads.

As far as users having to know anything about codecs is concerned, you can avoid this issue and serve them the appropriate codec (including Flash, if their browser doesn't support OGG or h.264) by using the simple non-Javascript html code found in this article.


Pros:

  1. You can easily use the tag and let it degrade to flash or other filetypes/codecs for backwards compatibility without using javascript.
    • Doesn't need a proprietary plug-in
    • Is platform-independent while flash is not (see nr. 2)
    • Using it will encourage other browser vendors to implement it (read as IE)
    • The tag has semantic meaning.
    • Comes built into the browser.
    • No vendor lockin

Cons:

  1. It's a part of an unfinished standard.
    • A very small percentage of installed browsers support it <-- not an issue (See pro nr. 1)
    • Browser vendors have yet to agree on a standard codec <-- not an issue either, see link in nr. 1)