Flash vs HTML5 Video and the Codec thing

The ongoing debate about whether it is better to use Flash or HTML5 to deliver web based video and the related kerfuffle regarding H.264 and WebM.

  1. By Mark Boas

    As one half of the team that produces jPlayer - a JavaScript media library that uses both HTML5 and Flash, this affects me directly. There also seems to be a lot of interest in this subject at an organisation I've just started working with. I'm not sure if this heightened my senses to the subject, but over the last day or so I've noticed some interesting discussion on Twitter. So I thought it was worthwhile documenting for the next time it crops up.

    The first discussion takes place between Mike Shaver (Facebook and ex-Mozilla) and Brendan Eich (CTO of Mozilla and inventor of JavaScript) - I include a portion of it below.
  2. Did Chrome ever actually drop H.264? I haven't seen anything since the blog post 13 months (!) ago.
  3. H.264 is a video compression format, which although fairly recently open-sourced - H.264 is 'patent encumbered' in other words royalties for its use could be claimed at any time. Currently latest versions of Chrome, Internet Explorer and Safari all support H.264 but Firefox and Opera do not but support an alternative format known as WebM (as does Chrome). However around 13 months ago Google stated their intention to drop H.264 support from Chrome 'in the coming months'.
  4. @shaver Not yet. If/when, NBD because content authors put Flash fallback inside <video>, and Chrome has a "special" Flash deal from Adobe...
  5. A Flash fallback is used when we detect whether HTML5 or a particular format is supported and fall back to a Flash solution if not. At this point it's worth mentioning that Mobile Safari does not support Flash. NBD in this case means no big deal (for Chrome). The special Flash deal probably alludes to Chrome and Adobe's deal to bundle Flash with Chrome and Adobe's intention to drop support for Flash on Linux for browsers other than Chrome. Note that Adobe plan to not support 'new mobile device configurations' going forward.
  6. @BrendanEich yeah, and it looks like B2G will support H.264 as well, so to the extent that mobile is the future, open codecs probably aren't
  7. B2G refers to Boot-2-Gecko a new initiative by Mozilla to create a web-based open source mobile operating system.
  8. @shaver We have to play in order to place or win, but we're playing the longer game (Broadway.js is a first move) too.
  9. Note. Whereas there is more room to maneuver with desktop browsers, with mobile devices, speed and battery life are of prime concern. Since currently most, if not all mobile devices that play video, support H.264 decoding directly via hardware, it would be difficult to enter the market with a mobile OS that didn't support H.264.

    Broadway.js is an open-source library that decodes H.264 in JavaScript by taking advantage of the newer faster JavaScript engines that are built into the latest browsers. This means that in theory a developer can add H.264 playback capability to any modern browser. See also JSMad for MP3 playback and ALAC.js for lossless playback.

    I encourage you to expand their tweets to see who else has chimed in. You can see the full discussion here.


  10. WebM vs H.264 Showdown


    The second discussion involves David Storey (former Opera Web Evangelist now working for Motorola which has recently been acquired by Google) and Faruk Ateş ('Entreprenerd' and former web-standards specialist for Apple). Excerpts follow.
  11. MS “Motorola is on a path to use standard essential patents to kill video on the Web” Even if true it would be H.264 not video. WebM anyone?
  12. …oh I forgot, MS and Apple don’t support the open format. My bad. Supporting WebM would solve their issues, but do they want to do that?
  13. @dstorey WebM is an idealist’s pipe dream, completely devoid of any shred of pragmatism.
  14. @KuraFire I'm not sure how H.264 is pragmatic for the web. Open source can't use it. Browsers like Opera can’t afford to licence it.
  15. @dstorey Not saying it’s pragmatic for the web per sé, but at least it works well on the 350+ million hardware devices people have bought.
  16. @dstorey Unlike WebM, which is a dreadful experience having to rely on far-slower software decoders, killing battery life.
  17. @KuraFire that is/was a temporary issue. Hardware decoders are available for WebM en.wikipedia.org/wiki/WebM#Hard…
  18. @dstorey Yeah, "temporary". Who’s going to insert hardware WebM decoders into those 350+ million devices? Dude, seriously not an argument.
  19. @dstorey That the HW decoders are now available for it means WebM is useful once _every popular consumer electronics device_ ships with one.
  20. @KuraFire how quick will you upgrade to the iPhone 5? Phone upgrade life cycles are short. Who says existing decoders can't be reprogrammed?
  21. @dstorey If the H.264 hardware decoders can be reprogrammed to do HW decoding for WebM, *that* would make this an interesting thing.
  22. This is the interesting part for me. H.264 and VP8 (the video part of WebM) are both based on Inverse Discrete Cosine Transform for decoding so in theory at least this could happen.
  23. @dstorey I don't think you're getting the business economics of this. Companies can’t just afford to support 2 video formats for everything.
  24. @dstorey Every additional codec is a duplication of their entire library and infrastructure. Why do you think that comes free?
  25. It's worth pointing out that services exist that will do this for you. Upload once and have multiple formats available automatically. Vid.ly comes to mind but I'm sure there are others. Although I do think it would be nice to have a package that did something similar which you could install on a server of your choice.

    So there you have it, two interesting conversations from around the Twitterverse on web video. I guess time will tell if Google removes support for H.264 from their browsers as they have promised to and whether the VP8 part of WebM can be decoded using the same hardware already in place for decoding H.264. Above all is the future really JavaScript decoders? Could we do this in hardware somehow? Also it seems that H.264 and VP8's similarities cut both ways, if they really are so similar we could see royalty issues cropping up with VP8 too. The difference being that a large company like Google could intervene to prevent this becoming an issue.

    You can view the full discussion here.

    Follow me on Twitter at @maboa.

Did you find this story interesting? Be the first to or comment.

Liked!

Mark Boas

Web App Developer specializing in Front-end, JS, Real-time Web and HTML5 esp. audio. jPlayer dev. Hyperaudio. Qwiiz.com. Open Web MoJo Fellow.

Total views
5,848

Storify

@Storify