Max Gunter
Max Gunter

Reputation: 213

HTML5 - AVC/MP3 video playable?

i have a video file (avi with avc+mp3). Is it possible to play this via the HTML5 video-tag?

i have tested it in Internet Explorer 9 but it will not work! Is it because the audio codec mp3 is not supported or is it the "video Codec-Profile "HighL3.0"?

Videoinformations

Upvotes: 1

Views: 1645

Answers (2)

BernzSed
BernzSed

Reputation: 1139

Edited to fix misunderstanding

I suggest you do some reading about the ongoing codec wars, or look at this table. Basically, some browsers accept only videos with a MP4 container, H.264-encoded video, and AAC-encoded audio (low-complexity profile); some browsers accept only videos with a WebM container, VP8-encoded video, and ogg-vorbis-encoded audio.

MP4/H.264 seems to be winning the war, but at the moment you'll need both for complete browser support.

Upvotes: 1

Vukašin Manojlović
Vukašin Manojlović

Reputation: 2733

Modern browsers which support <video> use WebM, MP4/H.264 and OGG video format. So you can't use AVI for HTML5 video. There is no unique format which is supported by all browsers. The only solution is to convert file to supported formats and use <video> like this:

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">   <!-- IE, Chrome, Safari, Android -->
  <source src="movie.ogg" type="video/ogg">   <!-- Firefox, Chrome, Opera -->
  <source src="movie.webm" type="video/webm"> <!-- Firefox, Chrome, Opera, Android -->
  Your browser does not support the video tag.
</video>

Upvotes: 0

Related Questions