Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chrome could play html5 mp4 video but html5test said chrome did not support mp4 video codec

According to html5test.com, chrome does not support html5 mp4 video (see following link). http://html5test.com/compare/feature/video-mpeg4.html

However, in this test page , the mp4 video could be played successfully by setting the body as following:

<!DOCTYPE html>
<html>
<body>

<video width="320" height="240" controls="controls">
  <source src="movie.mp4" type="video/mp4" />
  Your browser does not support the video tag.
</video>

</body>
</html>

How can I interpret this correctly?

like image 308
pierrotlefou Avatar asked Aug 29 '12 08:08

pierrotlefou


People also ask

Why is my MP4 video not working in HTML?

If your mp4 video does not play in the web browsers and devices, it's probably because the video is not HTML5 compatible. You can view this tutorial to convert the video file to HTML5 compatible: How to convert video to HTML5 compatible.

Does Chrome support MP4 files?

Not all browsers support MP4 video format fully. Depending on the video encoding in the source file, Chrome, for example, might not play MP4 videos. Other browsers like Firefox work fine with MP4 videos.

Is MP4 compatible with HTML5?

The minimum for HTML5 video is MP4 + WebM or Ogg (or both), using the MP4 version for Flash fallback.


1 Answers

.mp4 is just a container format (MPEG-4 Part 14), the video and audio formats under .mp4 file can be varied. For video, H-264 (MPEG-4 Part 10) and MPEG-4 Visual (MPEG-4 Part 2) are common.

On the HTML5Test, "MPEG-4 support" will test video.canPlayType("video/mp4; codecs="mp4v.20.8"), which tests whether MPEG-4 Visual is supported.

Formats supported by Chrome are H-264, VP8 (WebM video part), Theora for video and MP3, AAC, Vorbis for audio. MPEG-4 Visual is not supported (Chromium issue 54036).

So, Chrome can play .mp4 with H-264 video but not MPEG-4 Visual video.

like image 117
littlebtc Avatar answered Sep 18 '22 18:09

littlebtc