HTML5

From XiphWiki

(Difference between revisions)
Jump to: navigation, search
(Content management: add link to MetaVidWiki)
(fix link)
(28 intermediate revisions not shown)
Line 1: Line 1:
The HTML5 specification includes support for <video> and <audio>.
The HTML5 specification includes support for <video> and <audio>.
-
This page outlines use of HTML5 syntax with Xiph.Org codecs, particularly Ogg [[Theora]] and Ogg [[Vorbis]].
+
This page outlines use of HTML5 syntax with Xiph.Org codecs, particularly Ogg [[Theora]] and Ogg [[Vorbis]]. It is also a place to collect ideas for [http://ogg.org/ ogg.org].
 +
 
 +
See also the [http://en.flossmanuals.net/theoracookbook Theora Cookbook] for a guide to streaming and working with Ogg Theora.
== Browser Support ==
== Browser Support ==
-
[[TheoraSoftwarePlayers]]
+
Our list of [[TheoraSoftwarePlayers]] lists many general-purpose media players that support Ogg Theora.
 +
 
 +
These web browsers support HTML5 with Ogg video:
=== Mozilla Firefox ===
=== Mozilla Firefox ===
 +
 +
[http://www.mozilla.com/en-US/firefox/firefox.html Firefox 3.5]
 +
includes "support for the HTML5 <video> and <audio> elements including native support for Ogg Theora encoded video and Vorbis encoded audio." See [https://developer.mozilla.org/en/Using_audio_and_video_in_Firefox Using audio and video in Firefox] at the Mozilla Developer Center for more info.
=== Opera ===
=== Opera ===
 +
 +
In [http://dev.opera.com/articles/view/a-call-for-video-on-the-web-opera-vid/ A call for video on the web - Opera <video> release on Labs], Opera announce that they "have created an experimental build of our browser for Windows, Mac and Linux with ... support for the <video> element/Ogg Theora built in".
 +
 +
The article contains links to experimental builds of Opera 9.52, and provides some simple examples of HTML5 <video> markup.
=== Google Chrome ===
=== Google Chrome ===
-
=== Internet Explorer ===
+
Unstable builds are available from the
 +
[http://dev.chromium.org/getting-involved/dev-channel dev-channel].
 +
The first version supporting Ogg Theora was chrome 3.0.182.2.
 +
 
 +
=== Apple Safari ===
 +
 
 +
Install [[XiphQT]]
 +
 
 +
=== Microsoft Internet Explorer ===
 +
 
 +
* The default install of [http://www.videolan.org/vlc/ VLC] includes the activeX extension that enables inline ogg theora playback.
 +
* You can also install the [http://www.xiph.org/dshow/ direct show filters] for windows media player.
=== Plugins ===
=== Plugins ===
Line 20: Line 42:
== Web Video sites ==
== Web Video sites ==
-
The following web sites support HTML5 directly:
+
For more examples of Ogg Theora video, see
 +
[[List of Theora videos]].
-
* tinyvid.tv
+
The following web sites support HTML5 with Ogg Theora.
-
* DailyMotion
+
=== Community upload sites ===
-
* MetaVid
+
These sites allow anyone to upload video, and provide transcoding
 +
to Ogg:
-
For more examples of Ogg Theora video, see
+
* [http://www.dailymotion.com DailyMotion]. See also DailyMotion's [http://www.dailymotion.com/openvideodemo Open Video Demo] (restricted to Firefox 3.5)
-
[[List of Theora videos]].
+
* Chris Double's [http://tinyvid.tv Tinyvid] (transcoding via Firefogg)
 +
 
 +
=== Archival and Reference ===
 +
 
 +
Sites that curate video for general archival and reference purposes,
 +
and allow anyone to upload relevant material:
 +
 
 +
* [http://www.archive.org/details/movies Archive.org’s videos]
 +
* [http://commons.wikimedia.org/wiki/Category:Videos_by_format Wikipedia’s videos]
 +
 
 +
=== Projects ===
 +
 
 +
* [http://metavid.org metavid]: The Open Video archive of the US Congress
 +
* [http://pad.ma pad.ma]: Public Access Digital Media Archive is an online archive of densely text-annotated video material, primarily footage and not finished films.
 +
 
 +
=== Conferences ===
 +
 
 +
* [http://mirror.linux.org.au/linux.conf.au/ linux.conf.au]
 +
* DebConf: on the individual conference pages, e.g. [http://wiki.debconf.org/wiki/DebConf8/Streams]
 +
* The [http://www.foms-workshop.org/foms2009/pmwiki.php/Main/Proceedings FOMS workshop videos]: proceedings from a workshop on free and open multimedia software.
== Technology for setting up your own site ==
== Technology for setting up your own site ==
Line 36: Line 79:
There are various ways to provide HTML5 video content with fallbacks for older browsers and non-free codecs.
There are various ways to provide HTML5 video content with fallbacks for older browsers and non-free codecs.
 +
 +
You can include one of the scripts below, or modify source from an existing page such as the HTML of
 +
[http://www.celt-codec.org/presentations/ CELT presentations].
==== mv_embed ====
==== mv_embed ====
-
[http://metavid.org/w/index.php/Mv_embed mv_embed homepage]
+
[http://metavid.org/w/index.php/Mv_embed Mv_embed] is "a javascript library for easy embedding of ogg theora/vorbis media with the html5 tag. Once the script is included you can include an inline ogg theora clip with:
-
and
+
 
-
[http://www.mediawiki.org/wiki/Media_Projects_Overview#MwEmbed mv_embed on MediaWiki]
+
  <video src="mymovie.ogg">
 +
 
 +
"Mv_embed will then rewrite the video tag to whatever playback method is available on the client be it native support, java cortado, mplayer or vlc".
 +
 
 +
* [http://firefogg.org/make/mwEmbed/example_usage/Player_Simple_Themable.html Demo and sample HTML].
-
Example sites using mv_embed:
+
See also [http://www.mediawiki.org/wiki/Media_Projects_Overview#MwEmbed mv_embed on MediaWiki].
-
* [http://www.firefogg.org/make/mwEmbed/example_usage/Player_Simple_Video_Tag.html]
+
==== iTheora ====
==== iTheora ====
Line 52: Line 101:
Example sites using iTheora:
Example sites using iTheora:
* [http://theorasea.org]
* [http://theorasea.org]
 +
 +
 +
==== video4all ====
 +
 +
[http://code.google.com/p/video4all/ video4all at Google Code]
 +
 +
Uses browser specific technology (.htc, .xbl, or plain .js) to rewrite video tags to fall back to H.264 in Flash for legacy browsers, while providing H.264 natively to Safari and Theora for Mozilla. Roughly speaking a script version of Kroc Camen's pure HTML Video For Everybody solution. Doesn't (currently) use any Theora based fallbacks.
==== Video for Everybody ====
==== Video for Everybody ====
Line 58: Line 114:
"a chunk of HTML code that embeds a video into a website
"a chunk of HTML code that embeds a video into a website
using the HTML5 <video> element."
using the HTML5 <video> element."
 +
 +
:*Comment: We really shouldn't be plugging a solution which eschews cortado as a fall back in favor of FLV.  A pure HTML triple check video/java/youtube would be better, but no pure HTML solution perform a canplaytype so it will break for safari users without xiphqt.  Is "possible to add raw HTML but no JS" a common enough situation that a JS free solution is really needed? --[[User:Gmaxwell|Gmaxwell]] 22:58, 30 June 2009 (PDT)
 +
 +
:*Comment: It's clear that this solution makes a few compromises in order to be JS-free. The code is both fragile and frightening for reasons that make sense with regard to the original author's goals but aren't relevant if e.g. promoting Theora adoption takes precedence over a distaste for Java and/or Javascript. --[[User:Bod|Bod]] 06:03, 6 July 2009 (PDT)
 +
 +
=== HTML5 &lt;audio&gt; embedding ===
 +
 +
There are various ways to provide HTML5 audio content in Vorbis and there are Java and Flash fallbacks for older browsers (and non-free codecs though this is even less necessary than it is in the case of Theora video).
 +
 +
==== Vorbis via Flash 10 ====
 +
 +
[http://barelyfocused.net/blog/2008/10/03/flash-vorbis-player/ fogg (aka FVorbis)], [[Jorbis]] code automatically ported to Haxe and then compiled to AS3
 +
 +
[http://labs.adobe.com/wiki/index.php/Alchemy:Libraries Alchemy Vorbis], Adobe's Alchemy allows compiling C and C++ plus to AS3. Vorbis is one of the demo libraries they ported.
 +
 +
[http://flash.j-ogg.de/10/ flash.j-ogg], haxe and actionscript3 translation of j-ogg
 +
 +
==== Vorbis via Java ====
 +
 +
[http://www.jcraft.com/jorbis/ JorbisPlayer]
 +
 +
[http://www.j-ogg.de/core/main?/index-vorbis.html J-Ogg]
 +
 +
==== Vorbis via Javascript and &lt;audio&gt; tag ====
 +
 +
[http://alpha.libre.fm/listen/?tag=rock web radio interface]
 +
 +
 +
=== Encoding, transcoding ===
 +
 +
==== Firefogg ====
 +
 +
[http://firefogg.org/ Firefogg] provides "video encoding and uploading for Firefox". This includes a Firefox extension that allows users to encode video to Ogg Theora on their own computer while uploading it to your site. This simplifies the upload for users as they can simply choose from their existing video files, and simplifies your web site by allowing you to deal with only one video format, and offloading the CPU cycles required for encoding to the user.
=== Content management ===
=== Content management ===
 +
* The [http://www.mediawiki.org/wiki/Extension:OggHandler OggHandler extension] for MediaWiki provides video and audio support with automatic fallback and thumbnailing.
* [http://metavid.org/wiki/MetaVidWiki_Software MetaVidWiki]
* [http://metavid.org/wiki/MetaVidWiki_Software MetaVidWiki]
=== Backend servers ===
=== Backend servers ===
-
* oggz-chop
+
* [http://www.xiph.org/oggz/ oggz-chop] allows you to serve time ranges of Ogg media over HTTP by any web server that supports CGI. Examples of such time range requests are http://www.example.com/video.ogv?t=200/600 which serves the segment of video.ogv from 200s-600s. This allows users to instantly jump to any point in a video, and you can put links in your web application to play arbitrary scenes.

Revision as of 10:30, 27 October 2009

The HTML5 specification includes support for <video> and <audio>. This page outlines use of HTML5 syntax with Xiph.Org codecs, particularly Ogg Theora and Ogg Vorbis. It is also a place to collect ideas for ogg.org.

See also the Theora Cookbook for a guide to streaming and working with Ogg Theora.

Contents

Browser Support

Our list of TheoraSoftwarePlayers lists many general-purpose media players that support Ogg Theora.

These web browsers support HTML5 with Ogg video:

Mozilla Firefox

Firefox 3.5 includes "support for the HTML5 <video> and <audio> elements including native support for Ogg Theora encoded video and Vorbis encoded audio." See Using audio and video in Firefox at the Mozilla Developer Center for more info.

Opera

In A call for video on the web - Opera <video> release on Labs, Opera announce that they "have created an experimental build of our browser for Windows, Mac and Linux with ... support for the <video> element/Ogg Theora built in".

The article contains links to experimental builds of Opera 9.52, and provides some simple examples of HTML5 <video> markup.

Google Chrome

Unstable builds are available from the dev-channel. The first version supporting Ogg Theora was chrome 3.0.182.2.

Apple Safari

Install XiphQT

Microsoft Internet Explorer

  • The default install of VLC includes the activeX extension that enables inline ogg theora playback.
  • You can also install the direct show filters for windows media player.

Plugins

Compatibility

Web Video sites

For more examples of Ogg Theora video, see List of Theora videos.

The following web sites support HTML5 with Ogg Theora.

Community upload sites

These sites allow anyone to upload video, and provide transcoding to Ogg:

Archival and Reference

Sites that curate video for general archival and reference purposes, and allow anyone to upload relevant material:

Projects

  • metavid: The Open Video archive of the US Congress
  • pad.ma: Public Access Digital Media Archive is an online archive of densely text-annotated video material, primarily footage and not finished films.

Conferences

Technology for setting up your own site

HTML5 <video> embedding

There are various ways to provide HTML5 video content with fallbacks for older browsers and non-free codecs.

You can include one of the scripts below, or modify source from an existing page such as the HTML of CELT presentations.

mv_embed

Mv_embed is "a javascript library for easy embedding of ogg theora/vorbis media with the html5 tag. Once the script is included you can include an inline ogg theora clip with:

 <video src="mymovie.ogg">

"Mv_embed will then rewrite the video tag to whatever playback method is available on the client be it native support, java cortado, mplayer or vlc".

See also mv_embed on MediaWiki.

iTheora

iTheora

Example sites using iTheora:


video4all

video4all at Google Code

Uses browser specific technology (.htc, .xbl, or plain .js) to rewrite video tags to fall back to H.264 in Flash for legacy browsers, while providing H.264 natively to Safari and Theora for Mozilla. Roughly speaking a script version of Kroc Camen's pure HTML Video For Everybody solution. Doesn't (currently) use any Theora based fallbacks.

Video for Everybody

Video for Everybody is "a chunk of HTML code that embeds a video into a website using the HTML5 <video> element."

  • Comment: We really shouldn't be plugging a solution which eschews cortado as a fall back in favor of FLV. A pure HTML triple check video/java/youtube would be better, but no pure HTML solution perform a canplaytype so it will break for safari users without xiphqt. Is "possible to add raw HTML but no JS" a common enough situation that a JS free solution is really needed? --Gmaxwell 22:58, 30 June 2009 (PDT)
  • Comment: It's clear that this solution makes a few compromises in order to be JS-free. The code is both fragile and frightening for reasons that make sense with regard to the original author's goals but aren't relevant if e.g. promoting Theora adoption takes precedence over a distaste for Java and/or Javascript. --Bod 06:03, 6 July 2009 (PDT)

HTML5 <audio> embedding

There are various ways to provide HTML5 audio content in Vorbis and there are Java and Flash fallbacks for older browsers (and non-free codecs though this is even less necessary than it is in the case of Theora video).

Vorbis via Flash 10

fogg (aka FVorbis), Jorbis code automatically ported to Haxe and then compiled to AS3

Alchemy Vorbis, Adobe's Alchemy allows compiling C and C++ plus to AS3. Vorbis is one of the demo libraries they ported.

flash.j-ogg, haxe and actionscript3 translation of j-ogg

Vorbis via Java

JorbisPlayer

J-Ogg

Vorbis via Javascript and <audio> tag

web radio interface


Encoding, transcoding

Firefogg

Firefogg provides "video encoding and uploading for Firefox". This includes a Firefox extension that allows users to encode video to Ogg Theora on their own computer while uploading it to your site. This simplifies the upload for users as they can simply choose from their existing video files, and simplifies your web site by allowing you to deal with only one video format, and offloading the CPU cycles required for encoding to the user.

Content management

Backend servers

  • oggz-chop allows you to serve time ranges of Ogg media over HTTP by any web server that supports CGI. Examples of such time range requests are http://www.example.com/video.ogv?t=200/600 which serves the segment of video.ogv from 200s-600s. This allows users to instantly jump to any point in a video, and you can put links in your web application to play arbitrary scenes.
Retrieved from "http://wiki.xiph.org/HTML5"
Personal tools


Main Page

Xiph.Org Projects

Audio—

Video—

Text—

Container—

Streaming—