Media formats supported by the HTML audio and video elements

  • Revision slug: Media_formats_supported_by_the_audio_and_video_elements
  • Revision title: Media formats supported by the HTML audio and video elements
  • Revision id: 10153
  • Created:
  • Creator: derf
  • Is current revision? No
  • Comment Removed OggYUV. It's disabled, doesn't compile (bug 671978), and doesn't correctly handle most of the format options anyway.; 1 words added, 3 words removed

Revision Content

{{ gecko_minversion_header("1.9.1") }}

Gecko 1.9.1 supports the HTML 5 audio and video elements, which provide integrated support for playing audio and video media without requiring plug-ins. This article covers the formats supported in Gecko's implementation of these elements.

Supported media formats

Currently, Gecko supports WAVE format audio as well as Ogg containers with Vorbis-encoded audio and/or Theora video.

{{ gecko_callout_heading("2.0") }}

Starting with Gecko 2.0, the WebM media format is also supported. WebM uses the VP8 codec for video and Vorbis for audio.

WAVE containers

Gecko supports audio in WAVE containers; files of this type typically end with a ".wav" extension. Currently, only codec "1" (PCM) is supported.

Note: See RFC 2361 for the WAVE codec registry.

Recognized MIME types for WAVE audio

The following MIME types are recognized by Gecko as representing WAVE audio files.

  • audio/wave (preferred)
  • audio/wav
  • audio/x-wav
  • audio/x-pn-wav

{{ h2_gecko_minversion("WebM", 2) }}

WebM is a new, open standards based format for video presentation on the web. It uses VP8 for video and Vorbis for audio, in a container based on Matroska.

Recognized MIME types for WebM media

The following MIME types are recognized by Gecko as representing WebM media files.

video/webm
A WebM media file containing video (and possibly audio as well).
audio/webm
A WebM media file containing only audio.

Ogg containers

Gecko also supports Ogg containers, which can contain audio and/or video. Gecko supports the Vorbis codec for Ogg audio, and the Theora codec for video.

You can learn more about creating Ogg media by reading the Theora Cookbook.

Recognized MIME types for Ogg media

The following MIME types are recognized by Gecko as Ogg files.

audio/ogg
An Ogg file containing only audio.
video/ogg
An ogg file containing video (and possibly also audio).
application/ogg
An Ogg file with unspecified content. Using one of the other two MIME types is preferred, but you can use this if you don't know what the contents of the file are.

See also

Revision Source

<p>{{ gecko_minversion_header("1.9.1") }}</p>
<p>Gecko 1.9.1 supports the <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/" title="http://www.whatwg.org/specs/web-apps/current-work/">HTML 5</a> <a class="internal" href="/En/HTML/Element/Audio" title="En/HTML/Element/Audio"><code>audio</code></a> and <a class="internal" href="/En/HTML/Element/Video" title="En/HTML/Element/Video"><code>video</code></a> elements, which provide integrated support for playing audio and video media without requiring plug-ins. This article covers the formats supported in Gecko's implementation of these elements.</p>
<h2>Supported media formats</h2>
<p>Currently, Gecko supports WAVE format audio as well as Ogg containers with Vorbis-encoded audio and/or Theora video.</p>
<div class="geckoVersionNote">
<p>{{ gecko_callout_heading("2.0") }}</p>
<p>Starting with Gecko 2.0, the WebM media format is also supported. <a class=" external" href="http://www.webmproject.org/" title="http://www.webmproject.org/">WebM</a> uses the VP8 codec for video and Vorbis for audio.</p>
</div>
<h3>WAVE containers</h3>
<p>Gecko supports audio in WAVE containers; files of this type typically end with a ".wav" extension. Currently, only codec "1" (PCM) is supported.</p>
<div class="note"><strong>Note: </strong>See <a class="external" href="http://www.rfc-editor.org/rfc/rfc2361.txt" title="http://www.rfc-editor.org/rfc/rfc2361.txt">RFC 2361</a> for the WAVE codec registry.</div>
<h4>Recognized MIME types for WAVE audio</h4>
<p>The following MIME types are recognized by Gecko as representing WAVE audio files.</p>
<ul> <li><code>audio/wave</code> (preferred)</li> <li><code>audio/wav</code></li> <li><code>audio/x-wav</code></li> <li><code>audio/x-pn-wav</code></li>
</ul>
<p>{{ h2_gecko_minversion("WebM", 2) }}</p>
<p><a class=" external" href="http://www.webmproject.org/" title="http://www.webmproject.org/">WebM</a> is a new, open standards based format for video presentation on the web. It uses VP8 for video and Vorbis for audio, in a container based on <a class=" external" href="http://corecodec.com/products/matroska" title="http://corecodec.com/products/matroska">Matroska</a>.</p>
<h4>Recognized MIME types for WebM media</h4>
<p>The following MIME types are recognized by Gecko as representing WebM media files.</p>
<dl> <dt><code>video/webm</code></dt> <dd>A WebM media file containing video (and possibly audio as well).</dd> <dt><code>audio/webm</code></dt> <dd>A WebM media file containing only audio.</dd>
</dl>
<h3>Ogg containers</h3>
<p>Gecko also supports Ogg containers, which can contain audio and/or video. Gecko supports the Vorbis codec for Ogg audio, and the Theora codec for video.</p>
<p>You can learn more about creating Ogg media by reading the <a class="external" href="http://en.flossmanuals.net/TheoraCookbook" title="http://en.flossmanuals.net/TheoraCookbook">Theora Cookbook</a>.</p>
<h4>Recognized MIME types for Ogg media</h4>
<p>The following MIME types are recognized by Gecko as Ogg files.</p>
<dl> <dt><code>audio/ogg</code></dt> <dd>An Ogg file containing only audio.</dd> <dt><code>video/ogg</code></dt> <dd>An ogg file containing video (and possibly also audio).</dd> <dt><code>application/ogg</code></dt> <dd>An Ogg file with unspecified content. Using one of the other two MIME types is preferred, but you can use this if you don't know what the contents of the file are.</dd>
</dl>
<h2>See also</h2>
<ul> <li><a class="internal" href="/En/Using_audio_and_video_in_Firefox" title="En/Using audio and video in Firefox">Using audio and video in Firefox</a></li> <li><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/#media-elements" title="http://www.whatwg.org/specs/web-apps/current-work/#media-elements">Media elements</a> (HTML 5 specification)</li> <li><code><a class="internal" href="/En/HTML/Element/Video" title="En/HTML/Element/Video">video</a></code></li> <li><a class="internal" href="/En/HTML/Element/Audio" title="En/HTML/Element/Audio"><code>audio</code></a></li>
</ul>
Revert to this revision