Skip to main content

HTML5 supported video formats.

HTML5 Video Formats
===================

## Media formats

  ------------------- ++ --------------------- ++ ---------------
  |   File Extension  ||  Video + Audio Codec  ||     MIME      |
  | ----------------- ++ --------------------- ++ ------------- |
  |  .mp4             ||  H.264 + AAC          ||   video/mp4   |
  |  .ogg/.ogv        ||  Theora + Vorbis      ||   video/ogg   |
  |  .webm            ||  VP8 + Vorbis         ||   video/webm  |
  ---------------------------------------------------------------

## The Markup

**.mp4**

  <video poster="poster.png" controls>
    <source src="video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
    I'm sorry; your browser doesn't support HTML5 video in WebM with VP8 or MP4 with H.264.
    <!-- You can embed a Flash player here, to play your mp4 video in older browsers -->
  </video>

**.webm**

  <video poster="poster.png" controls>
    <source src="video.webm" type='video/webm; codecs="vp8, vorbis"' />
  </video>

**.ogv**

  <video poster="poster.png" controls>
    <source src="video.ogv" type='video/ogg; codecs="theora, vorbis"' />
  </video>

**Reference**

[Media formats supported by the HTML audio and video elements](https://developer.mozilla.org/en-US/docs/HTML/Supported_media_formats)