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 started being discussed by the WHATWG in October 2006.. 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 10 December 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 7 March 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.
In 2012, VP9 was released by Google as a successor to VP8, also open and royalty free.
At the end of 2017 the new AV1 format developed by the Alliance for Open Media (AOMedia) as the evolution of VP9 has reached the feature freeze, and the bitstream freeze is expected for January 2018. Firefox nightly builds already include support for AV1.
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 30 October 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 30 October 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)||AV1 (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||Yes|
|Google Chrome||Unix-like, Android, macOS, iOS, and Windows||Since 3.0||Since 3.0[a]||No||Since 6.0||Since 29.0[b]||Since 70|
|Internet Explorer||Windows||Via OpenCodecs||Since 9.0||No||Via OpenCodecs||No||No|
|Windows Phone||No||Since 9.0||No|
|Windows RT||Since 10.0|
|Microsoft Edge||Windows 10||with Web Media Extensions||Since 12.0||Needs hardware decoder[c]||Only via MSE
|Only enabled by default if hardware decoder present
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||in Nightly|
|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 (macOS 10.11 and earlier)||?|
|GNOME 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 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. Archived from the original on 13 August 2010. Retrieved 27 September 2010.
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 10 April 2010.
- "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). Archived from the original on 18 March 2012. Retrieved 25 February 2008.
- "(X)HTML5 Tracking". HTML5. Retrieved 23 June 2009.
- Amador, Manuel (11 December 2011). "Removal of Ogg is *preposterous*". WHATWG (Mailing list). Retrieved 25 August 2009.
- "Steve Jobs: mystery patent pool to attack Ogg Theora". The Register. Retrieved 9 July 2011.
- Hickson, Ian (11 December 2007). "Re: Removal of Ogg is *preposterous*". WHATWG (Mailing list). Retrieved 25 February 2008.
- Stachowiak, Maciej (21 March 2007). "Codecs (was Re: Apple Proposal for Timed Media Elements)". WHATWG (Mailing list).
- "[whatwg] Removal of Ogg is *preposterous*". WHATWG (Mailing list). 11 December 2007. Retrieved 25 August 2009.
- Connolly, Dan (18 December 2007). "When will HTML 5 support <video>? Sooner if you help". W3C. Retrieved 23 June 2009.
- Jazayeri, Michael 'Mike' (14 January 2011). "More about the Chrome HTML Video Codec Change". Chromium blog.
- Shankland, Stephen (14 March 2012). "Mozilla execs capitulate in H.264 Web-video war". CNET.
- Hoffman, Chris (9 September 2015). "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 (19 May 2010). "Free Software Foundation statement on WebM and VP8". FSF.
- Jazayeri, Michael 'Mike'. "HTML Video Codec Support in Chrome". The Chromium Blog.
- Bright, Peter (12 January 2011). "Google's dropping H.264 from Chrome a step backward for openness". Ars Technica.
- Sneath, Tim (11 January 2011). "An Open Letter from the President of the United States of Google". MSDN blogs.
- Moen, Haavard K (13 January 2011). "Is the removal of H.264 from Chrome a step backward for openness?". My Opera.
- Metz, Cade (28 May 2010). "Mozilla and Opera call for Google open codec in HTML5 spec". The Register.
- djwm (7 March 2013). "Google and MPEG LA make a deal over VP8 codec - Update". The H Open. Heise Media UK. Retrieved 3 April 2013.
- "VP8 and MPEG LA". WebM Project blog. 7 March 2013. Retrieved 3 April 2013.
- "Patent clouds remain over VP8: Google points to FRAND option, Nokia alleges infringement in court".
- Shankland, Stephen (28 November 2017). "Firefox now lets you try streaming-video tech that could be better than Apple's". CNET. Retrieved 25 December 2017.
- "AVC/H.264 Patent List" (PDF). MPEG LA. 1 February 2010.
- AVC/H.264 Licensors, MPEG LA
- Hickson, Ian (29 June 2009). "Codecs for <audio> and <video>". WHATWG (Mailing list).
- "Open-Sourced H.264 Removes Barriers to WebRTC". Cisco. 30 October 2013. Retrieved 30 October 2013.
- Brendan Eich (30 October 2013). "Cisco's H.264 Good News". Brendan Eich's blog.
- Monty Montgomery. "Comments on Cisco, Mozilla, and H.264". Monty Montgomery blog.
- Gal, Andreas (14 October 2014). "OpenH264 now in Firefox". Retrieved 25 February 2015.
- "MediaSourceExtensions (mozilla wiki)". mozilla. Retrieved 25 February 2015.
- "Support H.264/AAC/MP3 video/audio playback on desktop Firefox". mozilla. Retrieved 25 February 2015.
- xiphmont. "It's not a strawman after it comes true".
- "Phonon documentation of backends", Qt, Nokia, retrieved 3 June 2011
- "Phonon documentation of querying", Qt, Nokia, retrieved 3 June 2011
- GNU General Public License Version 3, Free Software Foundation, 29 June 2007, retrieved 27 April 2013
- Kyrnin, Jennifer, Understanding HTML5 Video Formats, About, retrieved 1 January 2012
- 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 10 September 2010
- enable proprietary_codecs h.264, retrieved 30 April 2016
- Chromium does not support H.264, retrieved 30 April 2016
- Audio/Video - The Chromium Projects, Google, retrieved 21 March 2016
- "Issue 2093007: Chromium side changes for enabling VP8 and WebM support", Code review, Google, retrieved 10 September 2010
- "[chrome] Revision 172738".
- "Google Chrome support Theora and Vorbis", Code, Google, 20 May 2010
- "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 (19 May 2010). "WebM and VP8 land in Chromium". Chromium Blog. Google.
- Kersey, Jason (3 June 2010), "Dev Channel Update", Chrome Releases, Google, retrieved 1 July 2010
- 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.
- "AV1 Decode". Chrome Platform Status. Retrieved 2018-09-04.
- McCracken, Harry (16 March 2010), Microsoft Previews the Revamped Internet Explorer 9 Platform, Technologizer
- HTML5 Video Support in IE9 Mobile, Microsoft, 13 October 2011, retrieved 11 March 2014
- "Introducing the Web Media Extension Package with OGG Vorbis and Theora support for Microsoft Edge". Microsoft Edge Dev Blog. Microsoft. 5 December 2017.
- "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?".
- "Mozilla Firefox 3.5 Release Notes". Mozilla. 30 June 2009.
- Bug 799315 – Windows Media Foundation backend for media playback, Mozilla, retrieved 21 December 2012
- Bug 837859 – Enable WMF backend, Mozilla, retrieved 5 April 2013
- 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 8 December 2013
- "Firefox — Notes (28.0)".
- "DASH playback of AV1 video in Firefox". Mozilla. 28 September 2017.
- Bug 825153 - Add support for Windows Vista WMF and prepend the system32 directory path to dll names, Mozilla, retrieved 28 March 2013
- Bug 1250766 - Re-enable using Adobe GMP for decoding when system H.264/AAC codecs not available, Mozilla, retrieved 30 April 2016
- Bug 886181 - Pref on gstreamer backend, Mozilla, retrieved 21 September 2013
- Bug 794282 - Enable GStreamer in official builds, Mozilla, retrieved 23 June 2013
- Bug 1207429 - Enable FFMpeg by default, Mozilla, retrieved 30 October 2015
- "Mozilla ships Firefox with H.264 support on Android".
- Bug 1070703 - Add mp4 support in 10.6 and 10.7 on Aurora, Mozilla, retrieved 2 October 2014
- "H.264 support in Firefox".
- Ozer, Jan. "The Case for VP9 - Streaming Media Magazine".
- Jägenstedt, Philip (31 December 2009), "(re-)Introducing <video>" (official blog), Core developers, Opera, retrieved 6 February 2010
- "Changelog for 24 - Opera Desktop".
- Lie, Håkon Wium (19 May 2010), Welcome, WebM <video>!, Opera, archived from the original on 21 March 2011
- Mills, Chris (19 May 2010), 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.
- Persch, Christian (1 April 2008), "The Future of Epiphany" (announcement), epiphany mailing list-list
- "Overview of available plug-ins", GStreamer, retrieved 4 July 2012
- "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 5 April 2010.
- "Watch Video…without Flash". Dailymotion. 27 May 2009. Retrieved 18 May 2010.
- Carle, Kevin; Zacharias, Chris (20 January 2010). "Introducing YouTube HTML5 Supported Videos". Youtube. Google. Retrieved 7 March 2010.
- Dougherty, Brad (21 January 2010). "Try our new HTML5 player!". Vimeo. Retrieved 7 March 2010.
- "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".
- "So long, and thanks for all the Flash". Retrieved 8 December 2017.
- "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)".
- "Flash & The Future of Interactive Content". Retrieved 8 December 2017.
- "HTML5 – The Video Element", What WG, W3C, retrieved 23 September 2016.
- Daoust, Francois; Hoschka, Philipp; Patrikakis, Charalampos Z (2010), Towards Video on the Web with HTML5 (PDF), Barcelona: NEM Summit.
- Lawson, Bruce; Lauke, Patrick H. (11 February 2010), Introduction to HTML5 video, Opera.
- HTML5 Video video platform software and news.
- Pieters, Simon (3 March 2010), Everything you need to know about HTML5 video and audio, Opera
- Mozilla's overview of media formats supported by browsers