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.
The following HTML5 code fragment will embed a WebM video into a web page.
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.
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.
The result has been the polarisation of HTML5 video between industry-standard, ISO-defined but patented formats, and free, open formats.
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.
Some web developers criticized the removal of the Ogg formats from the specification. A follow-up discussion also occurred on the W3C questions and answers blog.
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 it has yet to be removed from Google Chrome five years later.
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.
Apple still only supports H.264, but Microsoft now supports VP9 and WebM, and has pledged support for AV1.
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.
The video format can be specified by MIME type in HTML (see example). MIME types are used for querying multimedia frameworks for supported formats.
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.Notes
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 2013 Netflix added support for HTML5 video using EME, beside their old delivery method using a Silverlight plugin (also with DRM).
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.