Jump to content

HTML video: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 136: Line 136:
| rowspan="3" {{yes|3.5}}<ref>{{citation |title= Firefox 3.5 | type = release notes |date=2009-06-30 |publisher=Mozilla |url = http://www.mozilla.com/en-US/firefox/3.5/releasenotes/ |accessdate=2010-02-15}}</ref>
| rowspan="3" {{yes|3.5}}<ref>{{citation |title= Firefox 3.5 | type = release notes |date=2009-06-30 |publisher=Mozilla |url = http://www.mozilla.com/en-US/firefox/3.5/releasenotes/ |accessdate=2010-02-15}}</ref>
| {{depends |4.0, Manual install}}{{#tag:ref|Possible on Windows 7 with HTML5 extension for Windows Media Player Firefox plug-in.<ref>{{citation |url= http://www.interoperabilitybridges.com/html5-extension-for-wmp-plugin |title= HTML5 Extension for Windows Media Player Firefox Plug-in |publisher=Microsoft |accessdate=2011-01-28}}</ref>|group=note}}
| {{depends |4.0, Manual install}}{{#tag:ref|Possible on Windows 7 with HTML5 extension for Windows Media Player Firefox plug-in.<ref>{{citation |url= http://www.interoperabilitybridges.com/html5-extension-for-wmp-plugin |title= HTML5 Extension for Windows Media Player Firefox Plug-in |publisher=Microsoft |accessdate=2011-01-28}}</ref>|group=note}}
| rowspan="2" {{yes|4.0}}<ref>{{citation |url= https://bugzilla.mozilla.org/show_bug.cgi?id=566243 |title= Bug 566243 – Merge mozilla-webmedia repository to mozilla-central |publisher=Mozilla}}</ref><ref>{{citation | url= http://nightly.mozilla.org/ | title = Firefox Nightly Builds |publisher=Mozilla}}</ref>
| rowspan="3" {{yes|4.0}}<ref>{{citation |url= https://bugzilla.mozilla.org/show_bug.cgi?id=566243 |title= Bug 566243 – Merge mozilla-webmedia repository to mozilla-central |publisher=Mozilla}}</ref><ref>{{citation | url= http://nightly.mozilla.org/ | title = Firefox Nightly Builds |publisher=Mozilla}}</ref>
|-
|-
| Android
| Android

Revision as of 22:41, 11 December 2012

The HTML5 draft specification introduced the video element 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 on the web without plugins, but has been hampered by lack of agreement as to which video formats should be supported in web browsers.

History of <video> element

The <video> element was proposed by Opera Software in February 2007.[2] Opera also released a preview build that was showcased the same day,[3][4] and a manifesto that called for video to become a first-class citizen of the web.[5]

<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>

The "controls" attribute enables the browser's own user interface for controlling playback. Alternatively, playback can be controlled with JavaScript, which the web designer can use to create a custom user interface. The optional "poster" attribute specifies an image to show in the video's place before playback is started. Its purpose is to be representative of the 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 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.ogg" 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.

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

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

The result has been the polarisation of HTML5 video between industry standard, ISO defined but patented formats, and free, open formats.

Patented formats

H.264/MPEG-4 AVC is widely used, and has good speed, compression, hardware decoders, and video quality, but is patent-encumbered.[9] 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.[10] 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.[11]

Apple and Microsoft, controlling 39% of the browser market, support only H.264. This share is 15% higher than that of browsers supporting only free formats.

Free formats

Although Theora is not affected by known patents, Apple[12] is 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.[13][14] 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.[14]

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

Mozilla and Opera, controlling 24% of the market, support only the open formats of Theora and WebM.

Google, controlling 27% of the market, has stated its intention to remove support for H.264. Although it has been removed from Chromium, it has yet to be removed from Google Chrome. If it is removed, market share of browsers supporting only free formats would stand at 51%, 12% higher than that of browsers supporting only H.264.

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.[17] Google also started WebM, which combines the standardized open source VP8 video codec with Vorbis audio in a Matroska container. The opening of VP8 was welcomed by the Free Software Foundation.[18]

When Google announced in January 2011 that it would end native support of H.264 in Chrome[19], criticism came from many quarters including Peter Bright of Ars Technica[20] and Microsoft web evangelist Tim Sneath, who compared Google's move to declaring Esperanto the official language of the United States.[21] However, Haavard Moen of Opera Software strongly criticized the Ars Technica article[22] and Google responded to the reaction by clarifying its intent to promote WebM in its products on the basis of openness.[23]

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

Browser support

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.[25] 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.[26]

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.[citation needed]

Browser Operating system Latest stable release Video formats supported
Theora H.264 VP8 (WebM)
Android browser Android Template:Latest stable software release/Android (operating system) 2.3[27] 3.0[27] 2.3[27]
Chromium All supported r18297[28] Manual install[note 1] r47759[30]
Google Chrome All supported
Windows, macOS, Linux131.0.6778.204/205[31] Edit this on Wikidata / 18 December 2024; 8 days ago (18 December 2024)
Windows Server 2012/2012 R2109.0.5414.165[32] / 13 September 2023; 15 months ago (2023-09-13)
Android131.0.6778.200[33] Edit this on Wikidata / 18 December 2024; 8 days ago (18 December 2024)
iOS, iPadOS131.0.6778.154[34] Edit this on Wikidata / 17 December 2024; 9 days ago (17 December 2024)
Extended Support Release130.0.6723.170[35] Edit this on Wikidata / 19 December 2024; 7 days ago (19 December 2024)
3.0[36][37] 3.0[37][note 2] 6.0[39][40]
Internet Explorer Windows Template:Latest stable software release/Internet Explorer Manual install[note 3] 9.0[42] Manual install[note 4]
Windows Phone 11.0 (February 10, 2014; 10 years ago (2014-02-10)) [±] No[citation needed] 9.0[citation needed] No[citation needed]
Windows RT 10.0 No[citation needed] 10.0[citation needed] No[citation needed]
Konqueror All supported Template:Latest stable software release/Konqueror 4.4[note 5]
Mozilla Firefox Windows 7+
Standard133.0[46] Edit this on Wikidata / November 26, 2024; 30 days ago (November 26, 2024)
Extended support release 1128.5.2esr[47] Edit this on Wikidata / December 12, 2024; 14 days ago (December 12, 2024)
Extended support release 2115.18.0esr[48] / November 26, 2024; 30 days ago (2024-11-26)
3.5[49] 4.0, Manual install[note 6] 4.0[51][52]
Android 17.0[53]
All other supported No
Opera All supported 100.0.4815.21 (June 20, 2023; 18 months ago (2023-06-20)[54][55][56])


10.50[57] No 10.60[58][59]
Safari iOS Template:Latest stable software release/Safari No 3.1[60][61] No
MacOS X Manual install[note 7] Manual install[62]
Windows 5.1.7 Manual install[63]
Web (previously Epiphany) All supported 45.0[64] (20 September 2023; 15 months ago (2023-09-20)) [±] 2.28[note 8]
Notes
  1. ^ Third-party codec packages are available.[29]
  2. ^ On 11 January 2011 the removal of support for H.264 was announced on Chromium Blog.[38] As of 8 September 2012 neither actual support was removed, nor the change to this plan was announced.
  3. ^ Third-party codec packages are available.[41]
  4. ^ Possible if the user has installed a VP8 codec on Windows for IE9.[43][44]
  5. ^ Any format supported by Phonon on Qt 4.5.[45] Any format supported by Phonon backend. Available Phonon backends include DirectShow, QuickTime, GStreamer and xine; backends using MPlayer and VLC are in development.
  6. ^ Possible on Windows 7 with HTML5 extension for Windows Media Player Firefox plug-in.[50]
  7. ^ Supported if XiphQT is installed.
  8. ^ Any format supported by GStreamer on Webkit/GTK+.[65] The support for Ogg Theora, WebM and h.264 formats is included with base, bad and ugly plugins respectively.[66]

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

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 (using Ogg Theora and Vorbis format),[68] YouTube (using the H.264 and WebM formats),[69] and Vimeo (using the H.264 format)[70] 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.[71][72][73] According to a YouTube blog post from June 2010, the <video> tag “does not currently meet all the needs of a website like YouTube”.[74] 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.[75] 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.[72][76]

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 for Windows 7 which added the ability to use the licensed H.264 player included with Windows 7 to play back H.264 media content using Chrome.[77]

See also

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. ^ van Kesteren, Anne (28 February 2007). "[whatwg] <video> element proposal". What Working Group (Mailing list). Retrieved 2010-04-10. {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  3. ^ "Browser War: Episode II – Attack of the DOMs". Retrieved 10 April 2012.
  4. ^ "SV Web Builders Event – World Premier of Opera with builtin video support". Retrieved 10 April 2012.
  5. ^ "A Call for Video on the Web". Retrieved 10 April 2012.
  6. ^ Hickson, Ian (10 December 2007). "Video codec requirements changed". What WG (Mailing list). Retrieved 2008-02-25. {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  7. ^ "(X)HTML5 Tracking". HTML5. Retrieved 2009-06-23.
  8. ^ Amador, Manuel (2011-12-11). "Removal of Ogg is *preposterous*". WHATWG (Mailing list). Retrieved 2009-08-25. {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  9. ^ "AVC/H.264 Patent List" (PDF). MPEG LA. 2010-02-01.
  10. ^ AVC/H.264 Licensors, MPEG LA
  11. ^ Hickson, Ian (2009-06-29). "Codecs for <audio> and <video>". WHATWG (Mailing list). {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  12. ^ "Steve Jobs: mystery patent pool to attack Ogg Theora". The Register. Retrieved 9 July 2011.
  13. ^ Hickson, Ian (2007-12-11). "Re: Removal of Ogg is *preposterous*". WHATWG (Mailing list). Retrieved 2008-02-25. {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  14. ^ a b Stachowiak, Maciej (2007-03-21). "Codecs (was Re: Apple Proposal for Timed Media Elements)". WHATWG (Mailing list). {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  15. ^ "[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)
  16. ^ Connolly, Dan (December 18, 2007). "When will HTML 5 support <video>? Sooner if you help". W3C. Retrieved 2009-06-23.
  17. ^ Google. "Additional IP Rights Grant (Patents)". Google. {{cite web}}: |author= has generic name (help)
  18. ^ Lee, Matt (May 19, 2010). "Free Software Foundation statement on WebM and VP8". FSF.
  19. ^ Jazayeri, Michael ‘Mike’. "HTML Video Codec Support in Chrome". The Chromium Blog.
  20. ^ Bright, Peter (2011-01-12). "Google's dropping H.264 from Chrome a step backward for openness". Ars Technica.
  21. ^ Sneath, Tim (2011-01-11). "An Open Letter from the President of the United States of Google". MSDN blogs.
  22. ^ Moen, Haavard K (2011-01-13). "Is the removal of H.264 from Chrome a step backward for openness?". My Opera.
  23. ^ Jazayeri, Michael ‘Mike’ (2011-01-14). "More about the Chrome HTML Video Codec Change". Chromium blog.
  24. ^ Metz, Cade (2010-05-28). "Mozilla and Opera call for Google open codec in HTML5 spec". The Register.
  25. ^ "Phonon documentation of backends", Qt, Nokia, retrieved 2011-06-03
  26. ^ "Phonon documentation of querying", Qt, Nokia, retrieved 2011-06-03
  27. ^ a b c Kyrnin, Jennifer, Understanding HTML5 Video Formats, About, retrieved 2012-01-01
  28. ^ Issue 4363: [HTML5-Video] Enable HTML5 video/audio elements, Google, retrieved 2010-09-10
  29. ^ "Get Chromium on Ubuntu To Play MP4, H.264, MP3 & view PDF files natively", OMG Ubuntu, 2010-11-21, retrieved 2011-11-12
  30. ^ Code review, Google, retrieved 2010-09-10 {{citation}}: Text "Issue 2093007: Chromium side changes for enabling VP8 and WebM support" ignored (help); Text "contribution" ignored (help)
  31. ^ "Stable Channel Update for Desktop". 18 December 2024. Retrieved 19 December 2024.
  32. ^ "Stable Channel Desktop Update". 13 September 2023. Retrieved 14 September 2023.
  33. ^ "Chrome for Android Update". 18 December 2024. Retrieved 19 December 2024.
  34. ^ "Chrome Stable for iOS Update". 17 December 2024. Retrieved 17 December 2024.
  35. ^ "Extended Stable Updates for Desktop". 19 December 2024. Retrieved 19 December 2024.
  36. ^ "Google Chrome support Theora and Vorbis", Code, Google, 2010-05-20
  37. ^ a b Google Chrome 3.0 will support <video> tag, FR: C net
  38. ^ Mike, Jazayeri (11 January 2011). "Chromium Blog: HTML Video Code Support in Chrome". The Chromium Blog. Retrieved 22 April 2012.
  39. ^ Bankoski, Jim (2010-05-19), "WebM and VP8 land in Chromium", Chromium (World Wide Web log), Google
  40. ^ Kersey, Jason (2010-06-03), "Dev Channel Update", Chrome Releases, Google, retrieved 2010-07-01
  41. ^ Paul, Ryan (2010-02-05), "Nuanti brings HTML5 and Ogg Theora video to Silverlight", Ars Technica, retrieved 2012-01-02
  42. ^ McCracken, Harry (2010-03-16), Microsoft Previews the Revamped Internet Explorer 9 Platform, Technologizer
  43. ^ Jazayeri, Mike (2011-01-14), More about the Chrome HTML Video Codec Change, Google
  44. ^ Hachamovitch, Dean (2010-05-19), Another Follow-up on HTML5 Video in IE9, Microsoft
  45. ^ Vestbø, Tor Arne (2008-05-13), Top Secret, Hush Hush!, Nokia, retrieved 2010-03-14
  46. ^ "Firefox 133.0, See All New Features, Updates and Fixes". 26 November 2024. Retrieved 26 November 2024.
  47. ^ "Firefox ESR 128.5.2, See All New Features, Updates and Fixes". 12 December 2024. Retrieved 23 December 2024.
  48. ^ "Firefox ESR 115.18.0, See All New Features, Updates and Fixes". mozilla.org. 26 November 2024. Retrieved 26 November 2024.
  49. ^ Firefox 3.5 (release notes), Mozilla, 2009-06-30, retrieved 2010-02-15
  50. ^ HTML5 Extension for Windows Media Player Firefox Plug-in, Microsoft, retrieved 2011-01-28
  51. ^ Bug 566243 – Merge mozilla-webmedia repository to mozilla-central, Mozilla
  52. ^ Firefox Nightly Builds, Mozilla
  53. ^ http://arstechnica.com/information-technology/2012/11/mozilla-ships-firefox-with-h-264-support-on-android/
  54. ^ "Thanks for downloading Opera". Opera Norway. Retrieved 21 June 2023.
  55. ^ "Thanks for downloading Opera". Opera Norway. Retrieved 21 June 2023.
  56. ^ "Index of /ftp/pub/opera/desktop/100.0.4815.21/". Opera Norway. Retrieved 21 June 2023.
  57. ^ Jägenstedt, Philip (2009-12-31), "(re-)Introducing <video>", Core developers (official blog), Opera, retrieved 2010-02-06
  58. ^ Lie, Håkon Wium (2010-05-19), Welcome, WebM <video>!, Opera
  59. ^ Mills, Chris (2010-05-19), Opera supports the WebM video format, Opera
  60. ^ "HTML5 video formats", Web design, About.
  61. ^ "Media formats supported by the HTML audio and video elements", Developer, Mozilla.
  62. ^ "WebM plugin available", Code, Google, retrieved 2011-06-23
  63. ^ HTML5 Audio/Video Not working at all on new Windows 7 install, retrieved 2012-06-07
  64. ^ "Introducing GNOME 45". 20 September 2023. Retrieved 21 September 2023.
  65. ^ Persch, Christian (April 01, 2008), "The Future of Epiphany", epiphany mailing list-list (announcement) {{citation}}: Check date values in: |date= (help)
  66. ^ "Overview of available plug-ins", GStreamer, retrieved 2012-07-04
  67. ^ "iPad-ready websites". Apple. Retrieved 2010-04-05.
  68. ^ "Watch Video… without Flash". Dailymotion. 2009-05-27. Retrieved 2010-05-18.
  69. ^ Carle, Kevin; Zacharias, Chris (2010-01-20). "Introducing YouTube HTML5 Supported Videos". Youtube. Google. Retrieved 2010-03-07.
  70. ^ Dougherty, Brad (2010-01-21). "Try our new HTML5 player!". Vimeo. Retrieved 2010-03-07.
  71. ^ Herrman, Johan (2010-02-03). "Giz Explains: Why HTML5 Isn't Going to Save the Internet". Gizmodo. Retrieved 2012-07-25.
  72. ^ a b "Netflix has no plans to use HTML5", Gigaom.
  73. ^ "Why HTML5 won't replace Flash", Pseudocoder.
  74. ^ "Flash and the HTML5 <video> tag". You tube. Google.
  75. ^ "Pardon Our Dust <video> tag". Hulu. 2010‐5‐13. {{cite web}}: Check date values in: |date= (help)
  76. ^ "Netflix working on HTML5 streaming", PCMag.
  77. ^ Caldato, Claudio (2011-02-02). "Greater Interoperability for Windows Customers With HTML5 Video". MSDN (blog). Microsoft. Retrieved 2012-07-25.