HTML5 video
Encyclopedia
HTML5 video is an element
introduced in the HTML5 draft specification for the purpose of playing videos or movies, partially replacing the object element. HTML5 video is intended by its creators to become the new standard way to show video online, but has been hampered by lack of agreement as to which video formats should be supported in the video element.
The following HTML5 code fragment will embed a WebM video into a web page.
canPlay function can be used to achieve the same. The "type" attribute specifies the MIME type
and possibly a list of codecs, which helps the browser to determine whether it can decode the file. Even with only one choice, such hints may be necessary to a hypothetical browser for querying its multimedia framework
for third party codecs. Due to lack of a common video format, multiple sources is an important feature to avoid the need for browser sniffing
, which is error prone: given that any web developer's knowledge of browsers will inevitably be incomplete, the browser in question knows best.
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:
with a placeholder:
Although Theora is not affected by known patents, companies such as Apple and (reportedly) Nokia
are concerned 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 developer
s criticized the removal of the Ogg formats from the specification. A follow-up discussion also occurred on the W3C questions and answers blog.
H.264/MPEG-4 AVC
is widely used, and has good speed, compression, hardware decoders, and video quality, but is covered by patents. Except in particular cases, users of H.264 have to pay licensing fees to the MPEG LA
, a group of patent-holders including Microsoft and Apple. As a result, it has not been considered as a required default codec.
's acquisition of On2
resulted in the release of the VP8
video format as a royalty-free open standard, and the creation of the WebM Project
, which combines VP8 video with Vorbis
audio in a Matroska
container. The release of VP8 was also encouraged 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.
. 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 in to the browser, but rather could be by a browser add-on that might, for example, bypass the browser's normal HTML parsing of the
HTML element
An HTML element is an individual component of an HTML document. HTML documents are composed of a tree of HTML elements and other nodes, such as text nodes. Each element can have attributes specified. Elements can also have content, including other elements and text. HTML elements represent...
introduced in the HTML5 draft specification for the purpose of playing videos or movies, partially replacing the object element. HTML5 video is intended by its creators to become the new standard way to show video online, but has been hampered by lack of agreement as to which video formats should be supported in the video element.
The following HTML5 code fragment will embed a WebM video into a web page.
Multiple sources
Using any number of <source> elements, as shown below, the browser will choose automatically which file to download. Alternatively, the javascriptJavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....
canPlay function can be used to achieve the same. The "type" attribute specifies the MIME type
Internet media type
An Internet media type, originally called a MIME type after MIME and sometimes a Content-type after the name of a header in several protocols whose value is such a type, is a two-part identifier for file formats on the Internet.The identifiers were originally defined in RFC 2046 for use in email...
and possibly a list of codecs, which helps the browser to determine whether it can decode the file. Even with only one choice, such hints may be necessary to a hypothetical browser for querying its multimedia framework
Multimedia framework
A multimedia framework is a software framework that handles media on a computer and through a network. A good multimedia framework offers an intuitive API and a modular architecture to easily add support for new audio, video and container formats and transmission protocols...
for third party codecs. Due to lack of a common video format, multiple sources is an important feature to avoid the need for browser sniffing
Browser sniffing
Browser sniffing is a technique used in websites and web applications in order to determine the web browser a visitor is using, and to serve browser-appropriate content to the visitor. This practice is sometimes utilized to circumvent incompatibilities between browsers in areas such as the...
, which is error prone: given that any web developer's knowledge of browsers will inevitably be incomplete, the browser in question knows best.
Supported video formats
The current HTML5 draft specification does not specify which video formats browsers should support. User agents are free to support any video formats they feel are appropriate.Default video format debate
The HTML5 Working Group considers 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
Ogg
Ogg is a free, open container format maintained by the Xiph.Org Foundation. The creators of the Ogg format state that it is unrestricted by software patents and is designed to provide for efficient streaming and manipulation of high quality digital multimedia.The Ogg container format can multiplex...
Theora
Theora
Theora is a free lossy video compression format. It is developed by the Xiph.Org Foundation and distributed without licensing fees alongside their other free and open media projects, including the Vorbis audio format and the Ogg container....
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:
with a placeholder:
Although Theora is not affected by known patents, companies such as Apple and (reportedly) Nokia
Nokia
Nokia Corporation is a Finnish multinational communications corporation that is headquartered in Keilaniemi, Espoo, a city neighbouring Finland's capital Helsinki...
are concerned about unknown patents
Patent ambush
A patent ambush occurs when a member of a standard-setting organization withholds information, during participation in development and setting a standard, about a patent that the member or the member's company owns, has pending, or intends to file, which is relevant to the standard, and...
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
H.264/MPEG-4 AVC
H.264/MPEG-4 Part 10 or AVC is a standard for video compression, and is currently one of the most commonly used formats for the recording, compression, and distribution of high definition video...
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 developer
Web developer
A web developer is a software developer or software engineer who specializes in, or is specifically engaged in, the development of World Wide Web applications, or distributed network applications that are run over HTTP from a web server to a web browser....
s criticized the removal of the Ogg formats from the specification. A follow-up discussion also occurred on the W3C questions and answers blog.
H.264/MPEG-4 AVC
H.264/MPEG-4 AVC
H.264/MPEG-4 Part 10 or AVC is a standard for video compression, and is currently one of the most commonly used formats for the recording, compression, and distribution of high definition video...
is widely used, and has good speed, compression, hardware decoders, and video quality, but is covered by patents. Except in particular cases, users of H.264 have to pay licensing fees to the MPEG LA
MPEG LA
MPEG LA, LLC, is a Denver-based firm that licenses patent pools covering essential patents requiredfor use of the MPEG-2, MPEG-4 Visual , IEEE 1394, VC-1, ATSC and AVC/H.264 standards...
, a group of patent-holders including Microsoft and Apple. As a result, it has not been considered as a required default codec.
Google purchase of On2
GoogleGoogle
Google Inc. is an American multinational public corporation invested in Internet search, cloud computing, and advertising technologies. Google hosts and develops a number of Internet-based services and products, and generates profit primarily from advertising through its AdWords program...
's acquisition of On2
On2 Technologies
On2 Technologies , formerly known as The Duck Corporation, was a small publicly-traded company , headquartered in Clifton Park, New York, that designs video codec technology. They created a series of video codecs called TrueMotion...
resulted in the release of the VP8
VP8
VP8 is an open video compression format released by Google, originally created by On2 Technologies.After purchasing On2 Technologies in early 2010, Google has provided an irrevocable patent promise for underlying patents for the VP8 format, and released a bitstream format specification under a...
video format as a royalty-free open standard, and the creation of the WebM Project
WebM
WebM is an audio-video format designed to provide a royalty-free, open video compression format for use with HTML5 video. The project's development is sponsored by Google....
, which combines VP8 video with Vorbis
Vorbis
Vorbis is a free software / open source project headed by the Xiph.Org Foundation . The project produces an audio format specification and software implementation for lossy audio compression...
audio in a Matroska
Matroska
The Matroska Multimedia Container is an open standard free container format, a file format that can hold an unlimited number of video, audio, picture or subtitle tracks in one file. It is intended to serve as a universal format for storing common multimedia content, like movies or TV shows...
container. The release of VP8 was also encouraged by the Free Software Foundation
Free Software Foundation
The Free Software Foundation is a non-profit corporation founded by Richard Stallman on 4 October 1985 to support the free software movement, a copyleft-based movement which aims to promote the universal freedom to create, distribute and modify computer software...
.
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
Ars Technica
Ars Technica is a technology news and information website created by Ken Fisher and Jon Stokes in 1998. It publishes news, reviews and guides on issues such as computer hardware and software, science, technology policy, and video games. Ars Technica is known for its features, long articles that go...
and Microsoft web evangelist Tim Sneath, who compared Google's move to declaring Esperanto
Esperanto
is the most widely spoken constructed international auxiliary language. Its name derives from Doktoro Esperanto , the pseudonym under which L. L. Zamenhof published the first book detailing Esperanto, the Unua Libro, in 1887...
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.
Browser support
Table
This table shows which video formats that are likely to be supported by a given user agentUser agent
In computing, a user agent is a client application implementing a network protocol used in communications within a client–server distributed computing system...
. Most of the browsers listed here use a multimedia framework
Multimedia framework
A multimedia framework is a software framework that handles media on a computer and through a network. A good multimedia framework offers an intuitive API and a modular architecture to easily add support for new audio, video and container formats and transmission protocols...
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
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer 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 in to the browser, but rather could be by a browser add-on that might, for example, bypass the browser's normal HTML parsing of the