Jump to content

HTML video

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 70.227.162.152 (talk) at 01:52, 24 February 2012 (→‎Table). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

HTML5 video is an element introduced in the HTML5 draft specification for the purpose of playing videos or movies,[1] partially replacing the object element. HTML5 video is intended by its creators to become the new standard way to show video online,[citation needed] but has been hampered by lack of agreement as to which video formats should be supported in the video element.

<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 if the browser
	does not support the video element.
</video>

Multiple sources

Using any number of <source> elements, as shown below, the browser will choose automatically which file to download. Alternatively, the JavaScript 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.

<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</p>
</video>

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, 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 formats to support.

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 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,[2] 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:[3]

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.[4]

Although Theora is not affected by known patents, companies such as Apple[5] and (reportedly) Nokia[citation needed] 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.[6][7] 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.[7]

Some web developers criticized the removal of the Ogg formats from the specification.[8] A follow-up discussion also occurred on the W3C questions and answers blog.[9]

H.264/MPEG-4 AVC is widely used, and has good speed, compression, hardware decoders, and video quality, but patent-encumbered.[10] 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.[11] As a result, it has not been considered as a required codec.

In June 2009, the WHATWG concluded that no existing format was suitable as a specified requirement.[12]

Google purchase of On2

Google's acquisition of On2 in 2010 resulted in its acquisition of the VP8 video format by Google. Google has provided a royalty-free license to use VP8.[13] Google also started WebM, which combines the non-standardized (but open source) VP8 video codec with Vorbis audio in a Matroska container. The opening of VP8 was welcomed by the Free Software Foundation.[14]

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[15] and Microsoft web evangelist Tim Sneath, who compared Google's move to declaring Esperanto the official language of the United States.[16] However, Haavard Moen of Opera Software strongly criticized the Ars Technica article[17] and Google responded to the reaction by clarifying its intent to promote WebM in its products on the basis of openness.[18]

After the launch of WebM, Mozilla and Opera have called for the inclusion of VP8 in HTML.[19]

Browser support

Values

These indicate the level of support for the given item in each engine. By default, the most recent version of the engine is implied. However, a specific version number can be listed; when this indicates full support, it's the initial version of the engine fully supporting the item.

Legend
Value Meaning
Yes Fully supported
No Has never been supported
Partial Only some values are supported
Incorrect Not implemented correctly in all cases
Experimental May be incomplete or buggy
Nightly build Currently in development; full support is expected
Depends Only supported for the specified conditions
Dropped No longer supported

Table

Media formats availability regarding browsers' usage shares

This table shows which video formats that 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.[20] 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 <video> tag to embed a plug-in based video player.

The video format can be specified by MIME type in HTML (see example). MIME types are used for querying multimedia frameworks for supported formats. [note 1]

Of these browsers, only Firefox, Opera and Origyn 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.[citation needed]

Browser Latest stable release version date Formats supported by different web browsers
Ogg Theora H.264 VP8 (WebM)
Internet Explorer Template:Latest stable software release/Internet Explorer Manual install[note 2] 9.0[23] Manual install[note 3]
Mozilla Firefox[26]
Standard130.0[27] Edit this on Wikidata / September 3, 2024; 11 days ago (September 3, 2024)
Extended support release 1128.2.0esr[28] Edit this on Wikidata / September 3, 2024; 11 days ago (September 3, 2024)
Extended support release 2115.15.0esr[29] / September 3, 2024; 11 days ago (2024-09-03)
3.5[30] Manual install/Microsoft Windows only[note 4] 4.0[32][33]
Google Chrome
Windows, macOS, Linux128.0.6613.137/138[34] Edit this on Wikidata / 10 September 2024; 4 days ago (10 September 2024)
Windows Server 2012/2012 R2109.0.5414.165[35] / 13 September 2023; 12 months ago (2023-09-13)
Android128.0.6613.127[36] Edit this on Wikidata / 4 September 2024; 10 days ago (4 September 2024)
iOS129.0.6668.46[37] Edit this on Wikidata / 11 September 2024; 3 days ago (11 September 2024)
Extended Support Release128.0.6613.138[34] Edit this on Wikidata / 10 September 2024; 4 days ago (10 September 2024)
3.0[38][39] Planned for removal[40] 6.0[41][42]
Chromium r18297[43] Manual install[note 5] r47759[45]
Android browser 2.3[46] 3.0[46] 2.3[46]
Safari with Quicktime Template:Latest stable software release/Safari Manual install[note 6] 3.1 Manual install[47]
Opera 100.0.4815.21 (June 20, 2023; 14 months ago (2023-06-20)[48][49][50])


10.50[51] No 10.60[52][53]
Konqueror Template:Latest stable software release/Konqueror 4.4[54] Manual install[note 7] Yes[56]
Epiphany 45.0[57] (20 September 2023; 11 months ago (2023-09-20)) [±] 2.28[58] Manual install[note 8] Yes[note 8][59]

Usage

As of April 2010, in the wake of Apple iPad launch, a number of high-profile sites have started to serve H.264 HTML5 video instead of Flash for user-agents identifying as iPad.[60]

As of May 2010, HTML5 video is not currently as widespread as Flash videos, though recent rollouts of experimental HTML5-based video players from DailyMotion[61] (using Ogg Theora and Vorbis format), YouTube[62] (using the H.264 and WebM formats) and Vimeo[63] (using the H.264 format) suggest that interest in adopting HTML5 video is increasing.

Some major video-providing websites have announced decisions to continue using technologies other than HTML5 video.[64][65][66] According to a YouTube blog post from June 2010, the <video> tag “does not currently meet all the needs of a website like YouTube”.[67] The main reasons stated include the lack of a standard format, the absence of an effective and reliable means of delivering the video to the browser, JavaScript unable to display video fullscreen, and content protection issues. Hulu also has not adopted HTML5 video due to the inability of providing the user with adaptive bandwidth videos, securing the producer's content, and providing advertisers with data.[68] Netflix stated that there are a number of issues preventing them from using HTML5 video: acceptable A/V container formats; acceptable audio and video codecs; streaming protocol; a way for the streaming protocol to adapt to available bandwidth; a way of conveying information about available streams and other parameters to the streaming player module; a way of supporting protected content; and a way of exposing all this functionality into HTML5.[65][69]

On January 11, 2011, Google's Chromium Project announced on their blog that support for closed codecs (particularly H.264) would be removed from future releases of Chrome. The Chromium announcement specifically mentioned that this removal was an effort to increase the use of license-free HTML5 and the <video> tag, driving web-wide adoption of the open-source codecs VP8 and Theora. On February 2, 2011 Microsoft released the Windows Media Player HTML5 Extension for Chrome which added the ability to use the licensed H.264 player included with Windows to play back H.264 media content using Chrome.[70]

A number of advanced HTML5 video players and larger solutions have appeared. SublimeVideo Player was the first to demo how a custom player could provide a better viewing experience than the browser's native player, introducing features a unified player across all devices, flash fallback for older and incompatible devices and true HTML5 fullscreen video. Other popular[citation needed] choices include JW Player, Video JS and MediaElement.js.

See also

Notes

  1. ^ at least for Phonon and its backends,[21] that is DirectShow, QuickTime and GStreamer
  2. ^ Third-party codec packages are available.[22]
  3. ^ Possible if the user has installed a VP8 codec on Windows for IE9.[24][25]
  4. ^ Possible in a limited fashion on some systems if the HTML5 extension for Windows Media Player Firefox plug-in is installed.[31]
  5. ^ Third-party codec packages are available.[44]
  6. ^ Supported if XiphQT is installed.
  7. ^ Any format supported by Phonon on Qt 4.5.[55] Format support depends on the backend of Phonon. Available Phonon backends include GStreamer and xine; backends using MPlayer and VLC are in development.
  8. ^ a b Any format supported by GStreamer on Webkit/GTK+ builds of Epiphany.

References

  1. ^ "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.
  2. ^ Hickson, Ian (10 December 2007). "[whatwg] Video codec requirements changed". whatwg mailing list (Mailing list). Retrieved 2008-02-25. {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  3. ^ "(X)HTML5 Tracking". HTML5.org. Retrieved 2009-06-23.
  4. ^ Amador, Manuel (2011-12-11). "[whatwg] Removal of Ogg is *preposterous*". WHATWG (Mailing list). Retrieved 2009-08-25. {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  5. ^ "Steve Jobs: mystery patent pool to attack Ogg Theora". The Register. Retrieved 9 July 2011.
  6. ^ Hickson, Ian (2007-12-11). "Re: [whatwg] Removal of Ogg is *preposterous*". WHATWG (Mailing list). Retrieved 2008-02-25. {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  7. ^ a b Stachowiak, Maciej (2007-03-21). "[whatwg] Codecs (was Re: Apple Proposal for Timed Media Elements)". WHATWG (Mailing list). {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  8. ^ "[whatwg] Removal of Ogg is *preposterous*". WHATWG (Mailing list). 2007-12-11. Retrieved 2009-08-25. {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  9. ^ Connolly, Dan (December 18, 2007). "When will HTML 5 support <video>? Sooner if you help". W3C. Retrieved 2009-06-23.
  10. ^ "AVC/H.264 Patent List" (PDF). MPEG LA. 2010-02-01.
  11. ^ AVC/H.264 Licensors, MPEG LA
  12. ^ Hickson, Ian (2009-06-29). "Codecs for <audio> and <video>". WHATWG (Mailing list). {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  13. ^ Google. "Additional IP Rights Grant (Patents)". Google. {{cite web}}: |author= has generic name (help)
  14. ^ Lee, Matt (May 19, 2010). "Free Software Foundation statement on WebM and VP8". FSF.
  15. ^ Bright, Peter (2011-01-12). "Google's dropping H.264 from Chrome a step backward for openness". Ars Technica.
  16. ^ Sneath, Tim (2011-01-11). "An Open Letter from the President of the United States of Google". MSDN blogs.
  17. ^ Moen, Haavard K. (2011-01-13). "Is the removal of H.264 from Chrome a step backward for openness?". My Opera.
  18. ^ Jazayeri, Mike (2011-01-14). "More about the Chrome HTML Video Codec Change". Chromium blog.
  19. ^ Metz, Cade (2010-05-28). "Mozilla and Opera call for Google open codec in HTML5 spec". The Register.
  20. ^ Phonon documentation of backends, Qt, retrieved 2011-06-03
  21. ^ Phonon documentation of querying, Qt, retrieved 2011-06-03
  22. ^ Paul, Ryan (2010-02-05), "Nuanti brings HTML5 and Ogg Theora video to Silverlight", Ars Technica, retrieved 2012-01-02
  23. ^ McCracken, Harry (2010-03-16), Microsoft Previews the Revamped Internet Explorer 9 Platform, Technologizer
  24. ^ Jazayeri, Mike (2011-01-14), More about the Chrome HTML Video Codec Change, Google
  25. ^ Hachamovitch, Dean (2010-05-19), Another Follow-up on HTML5 Video in IE9, Microsoft
  26. ^ Media formats supported by the audio and video elements, Mozilla
  27. ^ "Firefox 130.0, See All New Features, Updates and Fixes". 3 September 2024. Retrieved 3 September 2024.
  28. ^ "Firefox ESR 128.2.0, See All New Features, Updates and Fixes". 3 September 2024. Retrieved 3 September 2024.
  29. ^ "Firefox ESR 115.15.0, See All New Features, Updates and Fixes". mozilla.org. 3 September 2024. Retrieved 3 September 2024.
  30. ^ Mozilla Firefox 3.5 Release Notes, Mozilla, 2009-06-30, retrieved 2010-02-15
  31. ^ HTML5 Extension for Windows Media Player Firefox Plug-in, Microsoft Corporation, retrieved 2011-01-28
  32. ^ Bug 566243 - Merge mozilla-webmedia repository to mozilla-central, Mozilla
  33. ^ Firefox Nightly Builds, Mozilla
  34. ^ a b "Stable Channel Update for Desktop". 10 September 2024. Retrieved 10 September 2024.
  35. ^ "Stable Channel Desktop Update". 13 September 2023. Retrieved 14 September 2023.
  36. ^ "Chrome for Android Update". 4 September 2024. Retrieved 5 September 2024.
  37. ^ "Chrome Stable for iOS Update". 11 September 2024. Retrieved 13 September 2024.
  38. ^ Google Chrome support Theora and Vorbis, Google, 2010-05-20
  39. ^ Google Chrome 3.0 will support <video> tag
  40. ^ HTML Video Codec Support in Chrome, Google, 2011-01-11
  41. ^ Bankoski, Jim (2010-05-19), WebM and VP8 land in Chromium, Google
  42. ^ Kersey, Jason (2010-06-03), Google Chrome Releases: Dev Channel Update, Google, retrieved 2010-07-01
  43. ^ Issue 4363: [HTML5-Video] Enable HTML5 video/audio elements, Google, retrieved 2010-09-10
  44. ^ Get Chromium on Ubuntu To Play mp4, H.264, MP3 & view PDF files natively, 2010-11-21, retrieved 2011-11-12
  45. ^ Issue 2093007: Chromium side changes for enabling VP8 and WebM support., Google, retrieved 2010-09-10
  46. ^ a b c Jennifer Kyrnin, Understanding HTML5 Video Formats, About.com, retrieved 2012-01-01
  47. ^ Google's WebM plugin available, retrieved 2011-06-23
  48. ^ "Thanks for downloading Opera". Opera Norway. Retrieved 21 June 2023.
  49. ^ "Thanks for downloading Opera". Opera Norway. Retrieved 21 June 2023.
  50. ^ "Index of /ftp/pub/opera/desktop/100.0.4815.21/". Opera Norway. Retrieved 21 June 2023.
  51. ^ Jägenstedt, Philip (2009-12-31), (re-)Introducing <video> - Official blog for Core developers at Opera, Opera, retrieved 2010-02-06
  52. ^ Lie, Håkon Wium (2010-05-19), Welcome, WebM <video>!, Opera
  53. ^ Mills, Chris (2010-05-19), Opera supports the WebM video format, Opera
  54. ^ Davison, Peter (2010-03-03), KHTML Browsers including Konqueror, Legend Scrolls, retrieved 2010-03-12
  55. ^ Vestbø, Tor Arne (2008-05-13), Top Secret, Hush Hush!, Nokia Corporation, retrieved 2010-03-14
  56. ^ webm troubleshooting for Konqueror, Xiph.org, retrieved 2011-06-01
  57. ^ "Introducing GNOME 45". 20 September 2023. Retrieved 21 September 2023.
  58. ^ Toker, Alp (2007-12-08), HTML5 media support with GStreamer, retrieved 2010-03-12
  59. ^ YouTube and WebM support, Fedora Project, retrieved 2010-07-01
  60. ^ "iPad-ready websites". Apple, Inc. Retrieved 2010-04-05.
  61. ^ "Watch Video…without Flash". Dailymotion. 2009-05-27. Retrieved 2010-05-18.
  62. ^ Carle, Kevin; Zacharias, Chris (2010-01-20). "Introducing YouTube HTML5 Supported Videos". Youtube. Retrieved 2010-03-07.
  63. ^ Dougherty, Brad (2010-01-21). "Try our new HTML5 player!". Vimeo. Retrieved 2010-03-07.
  64. ^ Gizmodo: HTML5 isn't going to save the internet
  65. ^ a b Gigaom.com: Netflix has no plans to use HTML5
  66. ^ Pseudocoder: Why HTML5 won't replace Flash
  67. ^ "Flash and the HTML5 <video> tag".
  68. ^ "Pardon Our Dust <video> tag".
  69. ^ PCMag: Netflix working on HTML5 streaming
  70. ^ interoperability@microsoft: Greater Interoperability for Windows Customers With HTML5 Video