HTML 5 <video> tag vs Flash video. What are

2019-01-16 04:24发布

IMPORTANT UPDATE

This question was made over 9 years ago. It made sense then, it doesn't make it now. Flash is hard on its way out; <video> support is ubiquitous, including mobile devices. Almost anything that Flash could do, HTML can now do too. HTML won, Flash lost. If you're pondering on how to embed video in your page, just use <video> and don't give it a second thought. This question is only preserved for historical value.

Original question

Seems like the new <video> tag is all the hype these days, especially since Firefox now supports it. News of this are popping up in blogs all over the place, and everyone seems to be excited. But what about?

As much as I searched I could not find anything that would make it better than the good old Flash video. In fact, I see only problems with it:

  • It will still be some time before all the browsers start supporting it, and much more time before most people upgrade;
  • Flash is available already and everyone has it;
  • You can couple Flash with whatever fancy UI you want for controlling the playback. I gather that the tag will be controllable as well (via JavaScript probably), but will it be able to go fullscreen?

The only two pros for a <video> tag that I can see are:

  • It is more "semantic" - which probably holds no importance to a whole lot of people, including me;
  • It is not dependent on a single commercial 3rd party entity (Adobe) - which I also don't see as a compelling reason to switch, because free players and video converters are already available, and Adobe is not hindering the whole process in any way (it's not in their interests even).

So... what's the big deal?

Added:

OK, so there is one more Pro... maybe. Support for mobile devices. Hard to say though. A number of thoughts race through my head about the subject:

  • How many mobile devices are actually able to decode video at a decent speed anyway, Flash or otherwise?
  • How long until mainstream mobile devices get the <video> support? Even if it is available through updates, how many people actually do that?
  • How many people watch videos on web pages on their mobile phones at all?

As for the semantics part - I understand that search engines might be able to detect videos better now, but... what will they do with them anyway? OK, so they know that there is a video in the page. And? They can't index a video! I'd like some more arguments here.

Added:

Just thought of another Cons. This opens up a whole new area of cross-browser incompatibility. HTML and CSS is quite messy already in this aspect. Flash at least is the same everywhere. But it's enough for at least one major browser vendor to decide against the <video> tag (can anyone say "Internet Explorer"?) and we have a nice new area of hell to explore.

Added:

A Pro just came in. More competition = more innovation. That's true. Giving Adobe more competition will probably force them to improve Flash in areas it has been lacking so far. Linux seems to be a weak spot for it, cited by many.

31条回答
Lonely孤独者°
2楼-- · 2019-01-16 04:54

You can use Flash today... it's the most realistic way to reach full-sized audiences.

(FD: I work for Adobe)

查看更多
Anthone
3楼-- · 2019-01-16 04:54

I've been reading around this recently for a site I'm building now. I've gone with Flash video for now, because the launch is pretty soon. Also, we're on a shared hosting environment, so all video conversion has to be done before the video is uploaded. I don't want to ask the client to upload two versions of each video.

But, ultimately, I do want to switch to open video. It looks pretty cool. I've seen a demo which uses javascript to overlay subtitles on a video, degrading gracefully in the absence of javascript to a text transcript below the video. (I think that was on A List Apart.) And Mozilla have some fun demos up. http://arstechnica.com/open-source/news/2009/05/google-dailymotion-endorse-html-5-and-standards-based-video.ars

查看更多
Juvenile、少年°
4楼-- · 2019-01-16 04:54

Current state of Flash is:

Flash Desktop platforms:

  • IE
  • Microsoft Edge
  • Safari (Mac)
  • Chrome
  • FF
  • Opera

Mobile browsers:

  • No

So you can't use Flash video on mobile browsers because Flash Player is not pre-installed by default.

Optimal way - using HTML5 video with Flash fallback for those browsers where HTML5 video is not supported.

查看更多
乱世女痞
5楼-- · 2019-01-16 04:55

Adobe's Flash player (being a plugin) does not take any of the browser's privacy settings into account, while Adobe is not actively making clear to normal users what is being stored. This alone is a good reason to stop using Flash (or any video plugin) and welcome <video>.

Some details about the privacy issues (not to be confused with security issues or vulnerabilities) can be found at How to automatically remove Flash history trail? on Super User.

Like Vilx noted in the comments: these privacy issues remain when replacing Flash-video by <video>, as Flash is used in many more ways. Still, once <video> is supported then site owners who offer video (and don't use Flash in any other way) will have a choice not to burden their visitors with this poorly documented record of visited Flash-sites.

(EDIT: I replaced the details with a link to SU, which gives some more insight; some of the comments below will only make sense with respect to a previous revision.)

查看更多
爱情/是我丢掉的垃圾
6楼-- · 2019-01-16 04:56

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.

查看更多
时光不老,我们不散
7楼-- · 2019-01-16 04:58

More pros for Flash:

  • Adobe can add new features and new codecs to video a lot quicker to a mass audience (generally under a year over 90% of users upgrade to the latest version of Flash) compared to browser vendors (there's still a large number of IE6 users out there and that browser came out in 2001).

  • Features found in Flash that I imagine will eventually make it to browsers but are not there yet:

    • full screen video (there's a Firefox add-on that supports this but none of the browser do natively yet)
    • video cam, only a small number of websites use this, but there's some really cool stuff happening these days with the video cam and augmented reality in Flash
    • peer-to-peer video, was just added in Flash Player 10 and as the penetration of Flash 10 is getting close to 90%, I think you will see more

As those who say Flash is not indexable, check out what Google has been doing lately with indexing Flash content thanks to a headless player Adobe has supplied. So if you do a google search for FLV files, you can see that Google already indexes Flash video files.

Meanwhile, Adobe Premiere CS4 has speech recognition that will output subtitles for video files in an XML format that can be easily used in Flash video. So expect video for Flash to become a lot more searchable in the future.

查看更多
登录 后发表回答