The HTML5 specification introduced the video element for the purpose of playing videos, partially replacing the object element. HTML5 video is intended by its creators to become the new standard way to show video on the web, instead of the previous de facto standard of using the proprietary Adobe Flash plugin, though early adoption was hampered by lack of agreement as to which video coding formats and audio coding formats should be supported in web browsers.
- 1 History of <video> element
- 2 <video> element examples
- 3 Supported video and audio formats
- 4 Browser support
- 5 Digital rights management (Encrypted Media Extensions)
- 6 Usage
- 7 See also
- 8 References
- 9 External links
History of <video> element
The <video> element was proposed by Opera Software in February 2007. Opera also released a preview build that was showcased the same day, and a manifesto that called for video to become a first-class citizen of the web.
<video> element examples
The following HTML5 code fragment will embed a WebM video into a web page.
<video src="movie.webm" poster="movie.jpg" controls> This is fallback content to display for user agents that do not support the video tag. </video>
<video poster="movie.jpg" controls> <source src="movie.webm" type='video/webm; codecs="vp8.0, vorbis"'> <source src="movie.ogv" type='video/ogg; codecs="theora, vorbis"'> <source src="movie.mp4" type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"'> <p>This is fallback content to display for user agents that do not support the video tag.</p> </video>
Supported video and audio formats
The HTML5 specification does not specify which video and audio formats browsers should support. User agents are free to support any video formats they feel are appropriate, but content authors cannot assume that any video will be accessible by all complying user agents, since user agents have no minimal set of video and audio formats to support.
The HTML5 Working Group considered it desirable to specify at least one video format which all user agents (browsers) should support. The ideal format in this regard would:
- Have good compression, good image quality, and low decode processor use.
- Be royalty-free.
- In addition to software decoders, a hardware video decoder should exist for the format, as many embedded processors do not have the performance to decode video.
Initially, Ogg Theora was the recommended standard video format in HTML5, because it was not affected by any known patents. But on December 10, 2007, the HTML5 specification was updated, replacing the reference to concrete formats:
User agents should support Theora video and Vorbis audio, as well as the Ogg container format.
with a placeholder:
It would be helpful for interoperability if all browsers could support the same codecs. However, there are no known codecs that satisfy all the current players: we need a codec that is known to not require per-unit or per-distributor licensing, that is compatible with the open source development model, that is of sufficient quality as to be usable, and that is not an additional submarine patent risk for large companies. This is an ongoing issue and this section will be updated once more information is available.
Although Theora is not affected by known non-free patents, Apple has expressed concern about unknown patents that might affect it, whose owners might be waiting for a corporation with extensive financial resources to use the format before suing. Formats like H.264 might also be subject to unknown patents in principle, but they have been deployed much more widely and so it is presumed that any patent-holders would have already made themselves known. Apple has also opposed requiring Ogg format support in the HTML standard (even as a "should" requirement) on the grounds that some devices might support other formats much more easily, and that HTML has historically not required particular formats for anything.
Mozilla and Opera support only the open formats of Theora and WebM. Google stated its intention to remove support for H.264 in 2011, specifically for the HTML5 video tag. Although it has been removed from Chromium, As of November 2016[update] it has yet to be removed from Google Chrome five years later.
MPEG-DASH Support via the HTML5 Media Source Extensions (MSE)
Google's purchase of On2
Google's acquisition of On2 in 2010 resulted in its acquisition of the VP8 video format. Google has provided a royalty-free license to use VP8. Google also started WebM, which combines the standardized open source VP8 video codec with Vorbis audio in a Matroska based container. The opening of VP8 was welcomed by the Free Software Foundation.
When Google announced in January 2011 that it would end native support of H.264 in Chrome, criticism came from many quarters including Peter Bright of Ars Technica and Microsoft web evangelist Tim Sneath, who compared Google's move to declaring Esperanto the official language of the United States. However, Haavard Moen of Opera Software strongly criticized the Ars Technica article and Google responded to the reaction by clarifying its intent to promote WebM in its products on the basis of openness.
After the launch of WebM, Mozilla and Opera have called for the inclusion of VP8 in HTML.
On March 7, 2013, Google Inc. and MPEG LA, LLC announced agreements covering techniques that "may be essential" to VP8, with Google receiving a license from MPEG LA and 11 patent holders, and MPEG LA ending its efforts to form a VP8 patent pool.
H.264/MPEG-4 AVC is widely used, and has good speed, compression, hardware decoders, and video quality, but is patent-encumbered. Users of H.264 need licenses either from the individual patent holders, or from the MPEG LA, a group of patent holders including Microsoft and Apple, except for some Internet broadcast video uses. H.264 is usually used in the MP4 container format, together with Advanced Audio Coding (AAC) audio. AAC is also patented in itself, so users of MP4 will have to license both H.264 and AAC.
In June 2009, the WHATWG concluded that no existing format was suitable as a specified requirement.
Cisco makes a licensed H.264 binary module available for free
On October 30, 2013, Cisco announced that they were making a binary H.264 module available for download. Cisco will pay the costs of patent licensing for those binary modules when downloaded by the using software while it is being installed, making H.264 free to use in that specific case.
In the announcement, Cisco cited its desire of furthering the use of the WebRTC project as the reason, since WebRTC's video chat feature will benefit from having a video format supported in all browsers. The H.264 module will be available on "all popular or feasibly supportable platforms, which can be loaded into any application".
Cisco is also planning to publish source code for those modules under BSD license, but without paying the royalties, so the code will practically be free software only in countries without H.264 software patents, which has already been true about other existing implementations.
Also on October 30, 2013, Mozilla's Brendan Eich announced that Firefox would automatically download Cisco's H.264 module when needed by default. He also noted that the binary module is not a perfect solution, since users do not have full free software rights to "modify, recompile, and redistribute without license agreements or fees". Thus Xiph and Mozilla continue the development of Daala.
OpenH264 only supports the baseline profile of H.264, and does not by itself address the need for an AAC decoder. Therefore, it is not considered sufficient for typical MP4 web video, which is typically in the high profile with AAC audio. However, for use in WebRTC, the omission of AAC was justified in the release announcement: "the standards bodies have aligned on Opus and G.711 as the common audio codecs for WebRTC". There is doubt as to whether a capped global licensing of AAC, like Cisco's for H.264, is feasible after AAC's licensing bureau removed the price cap shortly after the release of OpenH264.
This table shows which video formats are likely to be supported by a given user agent. Most of the browsers listed here use a multimedia framework for decoding and display of video, instead of incorporating such software components. It is not generally possible to tell the set of formats supported by a multimedia framework without querying it, because that depends on the operating system and third party codecs. In these cases, video format support is an attribute of the framework, not the browser (or its layout engine), assuming the browser properly queries its multimedia framework before rejecting unknown video formats. In some cases, the support listed here is not a function of either codecs available within the operating system's underlying media framework, or of codec capabilities built into the browser, but rather could be by a browser add-on that might, for example, bypass the browser's normal HTML parsing of the <video> tag to embed a plug-in based video player.
Note that a video file normally contains both video and audio content, each encoded in its own format. The browser has to support both the video and audio formats. See HTML5 audio for a table of which audio formats are supported by each browser.
Of these browsers, only Firefox and Opera employ libraries for built-in decoding. In practice, Internet Explorer and Safari can also guarantee certain format support, because their manufacturers also make their multimedia frameworks. At the other end of the scale, Konqueror has identical format support to Internet Explorer when run on Windows, and Safari when run on Mac, but the selected support here for Konqueror is the typical for GNU/Linux, where Konqueror has most of its users. In general, the format support of browsers is much dictated by conflicting interests of vendors, specifically that Media Foundation and QuickTime support commercial standards, whereas GStreamer and Phonon cannot legally support other than free formats by default on the free operating systems that they are intended for.
|Browser||Operating System||Theora||H.264 (MP4)||HEVC (MP4)||VP8 (WebM)||VP9 (WebM)|
|Android browser||Android||Since 2.3||Since 3.0||No||Since 2.3||Since 4.4|
|Chromium||Unix-like and Windows||Since r18297||Via FFmpeg||No||Since r47759||Since r172738|
|Google Chrome||Unix-like, Android, macOS, iOS, and Windows||Since 3.0||Since 3.0[a]||No||Since 6.0||Since 29.0[b]|
|Internet Explorer||Windows||Via OpenCodecs||Since 9.0||No||Via OpenCodecs||No|
|Windows Phone||No||Since 9.0||No|
|Windows RT||Since 10.0|
|Microsoft Edge||Windows 10||No||Since 12.0||Needs hardware decoder[c]||No||Only via MSE|
|Windows 10 Mobile||Since 13.0|
|Konqueror||Unix-like and Windows||Needs OS-level codecs[d]|
|Mozilla Firefox||Windows 7+||Since 3.5||Since 21.0[e]||No||Since 4.0||Since 28.0|
|Windows Vista||Since 22.0|
|Windows XP and N editions||Since 46.0|
|Linux||26.0 (via GStreamer)[f]
43.0 (via FFmpeg)
|Firefox OS||Since 1.1|
|Opera Mobile||Android, iOS, Symbian, and Windows Mobile||Since 13.0||Since 11.50||No||Since 15.0||Since 16.0|
|Opera||macOS, Windows, Linux||Since 10.50||Since 24.0||Since 10.60||Yes|
|Safari||iOS||No||Since 3.1||Since 11||No||No|
|macOS||Via Xiph QuickTime Components||Via a plugin|
|Web||Linux and BSD||Needs OS-level codecs[g]|
- On 11 January 2011 the removal of support for H.264 was announced on Chromium Blog. As of 7 November 2016[update] neither actual support was removed, nor the change to this plan was announced.
- VP9 support in 25, turned off by default. Enabled by default in version 29.
- Available if the device has hardware support for HEVC. No software decoding support was included because "HEVC is very computationally complex, this will provide a more consistent experience."
- Any format supported by Phonon on Qt 4.5. Any format supported by Phonon backend. Available Phonon backends include DirectShow, QuickTime, GStreamer and xine; backends using MPlayer and VLC are in development.
- As of version 20, prefed off by default. Enabled by default beginning in version 21.
- Disabled by default until version 26. Also, depends on the codec on the system.
- Any format supported by GStreamer on Webkit/GTK+. The support for Ogg Theora, WebM and h.264 formats is included with base, good, and bad plugins respectively.
Digital rights management (Encrypted Media Extensions)
HTML has support for digital rights management (DRM, restricting how content can be used) via the HTML5 Encrypted Media Extensions (EME). The addition of DRM is controversial because it allows restricting users' freedom to use media restricted by DRM, even where fair use gives users the legal right to do so. A main argument in W3C's approval of EME was that the video content would otherwise be delivered in plugins and apps, and not in the web browser.
In 2010, in the wake of Apple iPad launch and after Steve Jobs announced that Apple mobile devices would not support Flash, a number of high-profile sites began to serve H.264 HTML5 video instead of Adobe Flash for user-agents identifying as iPad. HTML5 video was not as widespread as Flash videos, though there were rollouts of experimental HTML5-based video players from DailyMotion (using Ogg Theora and Vorbis format), YouTube (using the H.264 and WebM formats), and Vimeo (using the H.264 format).
Support for HTML5 video has been steadily increasing. In June 2013, Netflix added support for HTML5 video. In January 2015, YouTube switched to using HTML5 video instead of Flash by default. In December 2015, Facebook switched from Flash to HTML5 for all video content.
As of 2016, Flash is still widely installed on desktops, while generally not being supported on mobile devices such as smartphones. The Flash plugin is widely assumed, including by Adobe, to be destined to be phased out, which will leave HTML5 video as the only widely supported method to play video on the World Wide Web. Chrome, Firefox, Safari, and Edge, have plans to make almost all flash content click to play in 2017. The only major browser which does not have announced plans to deprecate Flash is Internet Explorer. Adobe announced on 25 July 2017 that they would be permanently ending development of flash in 2020.
- "The video element". HTML5: A vocabulary and associated APIs for HTML and XHTML. World Wide Web Consortium. 24 June 2010. Retrieved 2010-09-27.
A video element is used for playing videos or movies.
- van Kesteren, Anne (28 February 2007). "[whatwg] <video> element proposal". What Working Group (Mailing list). Retrieved 2010-04-10.
- "Browser War: Episode II – Attack of the DOMs". Retrieved 10 April 2012.
- "SV Web Builders Event – World Premier of Opera with builtin video support". Retrieved 10 April 2012.
- "A Call for Video on the Web". Retrieved 10 April 2012.
- Hickson, Ian (10 December 2007). "Video codec requirements changed". What WG (Mailing list). Retrieved 2008-02-25.
- "(X)HTML5 Tracking". HTML5. Retrieved 2009-06-23.
- Amador, Manuel (2011-12-11). "Removal of Ogg is *preposterous*". WHATWG (Mailing list). Retrieved 2009-08-25.
- "Steve Jobs: mystery patent pool to attack Ogg Theora". The Register. Retrieved 9 July 2011.
- Hickson, Ian (2007-12-11). "Re: Removal of Ogg is *preposterous*". WHATWG (Mailing list). Retrieved 2008-02-25.
- Stachowiak, Maciej (2007-03-21). "Codecs (was Re: Apple Proposal for Timed Media Elements)". WHATWG (Mailing list).
- "[whatwg] Removal of Ogg is *preposterous*". WHATWG (Mailing list). 2007-12-11. Retrieved 2009-08-25.
- Connolly, Dan (December 18, 2007). "When will HTML 5 support <video>? Sooner if you help". W3C. Retrieved 2009-06-23.
- Jazayeri, Michael 'Mike' (2011-01-14). "More about the Chrome HTML Video Codec Change". Chromium blog.
- Shankland, Stephen (2012-03-14). "Mozilla execs capitulate in H.264 Web-video war". CNET.
- Hoffman, Chris (2015-09-09). "Why YouTube in Chrome (and Firefox) is Draining Your Laptop’s Battery and How to Fix It". Howtogeek.
- "Media Source Extensions".
- "Adaptive Streaming HTML5 Player from Bitmovin".
- Google. "Additional IP Rights Grant (Patents)". Google.
- Lee, Matt (May 19, 2010). "Free Software Foundation statement on WebM and VP8". FSF.
- Jazayeri, Michael 'Mike'. "HTML Video Codec Support in Chrome". The Chromium Blog.
- Bright, Peter (2011-01-12). "Google's dropping H.264 from Chrome a step backward for openness". Ars Technica.
- Sneath, Tim (2011-01-11). "An Open Letter from the President of the United States of Google". MSDN blogs.
- Moen, Haavard K (2011-01-13). "Is the removal of H.264 from Chrome a step backward for openness?". My Opera.
- Metz, Cade (2010-05-28). "Mozilla and Opera call for Google open codec in HTML5 spec". The Register.
- djwm (2013-03-07). "Google and MPEG LA make a deal over VP8 codec - Update". The H Open. Heise Media UK. Retrieved 2013-04-03.
- "VP8 and MPEG LA". WebM Project blog. 2013-03-07. Retrieved 2013-04-03.
- "Patent clouds remain over VP8: Google points to FRAND option, Nokia alleges infringement in court".
- "AVC/H.264 Patent List" (PDF). MPEG LA. 2010-02-01.
- AVC/H.264 Licensors, MPEG LA
- Hickson, Ian (2009-06-29). "Codecs for <audio> and <video>". WHATWG (Mailing list).
- "Open-Sourced H.264 Removes Barriers to WebRTC". Cisco. 2013-10-30. Retrieved 2013-10-30.
- Brendan Eich (2013-10-30). "Cisco’s H.264 Good News". Brendan Eich's blog.
- Monty Montgomery. "Comments on Cisco, Mozilla, and H.264". Monty Montgomery blog.
- Gal, Andreas (2014-10-14). "OpenH264 now in Firefox". Retrieved 2015-02-25.
- "MediaSourceExtensions (mozilla wiki)". mozilla. Retrieved 2015-02-25.
- "Support H.264/AAC/MP3 video/audio playback on desktop Firefox". mozilla. Retrieved 2015-02-25.
- xiphmont. "It's not a strawman after it comes true".
- "Phonon documentation of backends", Qt, Nokia, retrieved 2011-06-03
- "Phonon documentation of querying", Qt, Nokia, retrieved 2011-06-03
- GNU General Public License Version 3, Free Software Foundation, 29 June 2007, retrieved 2013-04-27
- Kyrnin, Jennifer, Understanding HTML5 Video Formats, About, retrieved 2012-01-01
- Jan Ozer (5 November 2014). "Apple Supports H.265, But So Far Only in FaceTime on an iPhone 6".
- "Android Core media format and codec support.". Retrieved 18 December 2015.
- Issue 4363: [HTML5-Video] Enable HTML5 video/audio elements, Google, retrieved 2010-09-10
- enable proprietary_codecs h.264, retrieved 2016-04-30
- Chromium does not support H.264, retrieved 2016-04-30
- Audio/Video - The Chromium Projects, Google, retrieved 2016-03-21
- "Issue 2093007: Chromium side changes for enabling VP8 and WebM support", Code review, Google, retrieved 2010-09-10
- "[chrome] Revision 172738".
- "Google Chrome support Theora and Vorbis", Code, Google, 2010-05-20
- "Chrome 3.0 supportera la balise vidéo du HTML 5" [Google Chrome 3.0 will support <video> tag]. CNET France (in French).
- Mike, Jazayeri (11 January 2011). "Chromium Blog: HTML Video Code Support in Chrome". The Chromium Blog. Retrieved 22 April 2012.
- Bankoski, Jim (2010-05-19). "WebM and VP8 land in Chromium". Chromium Blog. Google.
- Kersey, Jason (2010-06-03), "Dev Channel Update", Chrome Releases, Google, retrieved 2010-07-01
- Lucian Parfeni (28 December 2012). "Chrome Adds Support for the Next-Generation VP9 Video Codec and Mozilla's Opus Audio". Softpedia.
- Lucian Parfeni (17 June 2013). "Chrome Now Supports Google's Next-Gen VP9 Video Codec by Default". Softpedia.
- McCracken, Harry (2010-03-16), Microsoft Previews the Revamped Internet Explorer 9 Platform, Technologizer
- HTML5 Video Support in IE9 Mobile, Microsoft, 2011-10-13, retrieved 2014-03-11
- "The status of Theora Video Codec in Microsoft Edge is Not currently planned". Microsoft Edge Development. Microsoft.
- "HTML5test - How well does your browser support HTML5?".
- "HEVC Support".
- "Windows 10 HEVC playback - Yes or No?".
- "WebM, VP9 and Opus Support in Microsoft Edge". Microsoft Edge Dev Blog. Microsoft. 18 April 2016.
- "HTML5test - How well does your browser support HTML5?".
- Vestbø, Tor Arne (2008-05-13), Top Secret, Hush Hush!, Nokia, retrieved 2010-03-14
- "Mozilla Firefox 3.5 Release Notes". Mozilla. 2009-06-30.
- Bug 799315 – Windows Media Foundation backend for media playback, Mozilla, retrieved 2012-12-21
- Bug 837859 – Enable WMF backend, Mozilla, retrieved 2013-04-05
- Bug 566243 – Merge mozilla-webmedia repository to mozilla-central, Mozilla
- Firefox Nightly Builds, Mozilla
- [Phoronix] Mozilla Firefox Enables VP9 Video Codec By Default, Phoronix, retrieved 2013-12-08
- "Firefox — Notes (28.0)".
- Bug 825153 - Add support for Windows Vista WMF and prepend the system32 directory path to dll names, Mozilla, retrieved 2013-03-28
- Bug 1250766 - Re-enable using Adobe GMP for decoding when system H.264/AAC codecs not available, Mozilla, retrieved 2016-04-30
- Bug 886181 - Pref on gstreamer backend, Mozilla, retrieved 2013-09-21
- Bug 794282 - Enable GStreamer in official builds, Mozilla, retrieved 2013-06-23
- Bug 1207429 - Enable FFMpeg by default, Mozilla, retrieved 2015-10-30
- "Mozilla ships Firefox with H.264 support on Android".
- Bug 1070703 - Add mp4 support in 10.6 and 10.7 on Aurora, Mozilla, retrieved 2014-10-02
- "H.264 support in Firefox".
- Ozer, Jan. "The Case for VP9 - Streaming Media Magazine".
- Jägenstedt, Philip (2009-12-31), "(re-)Introducing <video>" (official blog), Core developers, Opera, retrieved 2010-02-06
- "Changelog for 24 - Opera Desktop".
- Lie, Håkon Wium (2010-05-19), Welcome, WebM <video>!, Opera
- Mills, Chris (2010-05-19), Opera supports the WebM video format, Opera
- Jennifer Kyrnin. "Understanding HTML5 Video Formats". About Tech. About.com..
- "Media formats supported by the HTML audio and video elements". Mozilla Developer Network. Mozilla..
- Martin Smole (6 June 2017). "WWDC17 – HEVC with HLS – Apple just announced a feature that we support out of the box". Bitmovin.
- "WebM plugin available", Code, Google, archived from the original on 2015-10-04, retrieved 2011-06-23
- Persch, Christian (April 1, 2008), "The Future of Epiphany" (announcement), epiphany mailing list-list
- "Overview of available plug-ins", GStreamer, retrieved 2012-07-04
- "Keep DRM out of Web standards -- Reject the Encrypted Media Extensions (EME) proposal - Defective by Design".
- Yegulalp, Serdar. "Berners-Lee and W3C approve HTML5 video DRM additions".
- "HTML5 Video at Netflix".
- "iPad-ready websites". Apple. Retrieved 2010-04-05.
- "Watch Video…without Flash". Dailymotion. 2009-05-27. Retrieved 2010-05-18.
- Carle, Kevin; Zacharias, Chris (2010-01-20). "Introducing YouTube HTML5 Supported Videos". Youtube. Google. Retrieved 2010-03-07.
- Dougherty, Brad (2010-01-21). "Try our new HTML5 player!". Vimeo. Retrieved 2010-03-07.
- "Netflix switches from Silverlight to HTML5 in Windows 8.1, reduces CPU usage dramatically - ExtremeTech". 28 June 2013.
- McCormick, Rich (27 January 2015). "YouTube drops Flash for HTML5 video as default".
- Welch, Chris (18 December 2015). "Facebook's website now uses HTML5 instead of Flash for all videos".
- "Availability of Adobe’s Flash browser plugin discontinued on Android".
- Tittel, Chris Minnick and Ed. "How Adobe Is Moving on From Flash to Embrace HTML5".
- Williams, Owen (1 September 2015). "Adobe Flash is finally dead".
- Barrett, Brian. "Flash. Must. Die.".
- "Google Groups".
- https://blog.chromium.org/2017/07/so-long-and-thanks-for-all-flash.html. Missing or empty
- "Reducing Adobe Flash Usage in Firefox".
- Mondello, Ricky (14 June 2016). "Next Steps for Legacy Plug-ins". WEbKit.org. Apple Inc.
- Cowan, Crispin (14 December 2016). "Extending User Control of Flash with Click-to-Run". Microsoft Edge DevBlog. Microsoft.
- eross-msft. "Microsoft Edge and Internet Explorer 11 (Microsoft Edge for IT Pros)".
- https://blogs.adobe.com/conversations/2017/07/adobe-flash-update.html. Missing or empty
- "HTML5 – The Video Element", What WG, W3C, retrieved 2016-09-23.
- Daoust, Francois; Hoschka, Philipp; Patrikakis, Charalampos Z (2010), Towards Video on the Web with HTML5 (PDF), Barcelona: NEM Summit.
- Lawson, Bruce; Lauke, Patrick H. (2010-02-11), Introduction to HTML5 video, Opera.
- HTML5 Video video platform software and news.
- Pieters, Simon (2010-03-03), Everything you need to know about HTML5 video and audio, Opera
- Mozilla's overview of media formats supported by browsers