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

39,261

Solution 1

.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.

Solution 2

In general Google has pledged to remove H264 support in Chrome so, it's not really to be trusted.

Anyway... That test page doesn't work in my Chrome Version 24.0.1312.57 m on Windows 7 - it only plays the audio and a blank video stream.

I did a quick survey and of the 22 people in this team that tested, 7 could not play the video and 15 could. Same versions of Chrome mostly, some on development channel with version 26, same Windows patch level and even some using the same video cards and drivers getting different results.

The videos tested are mp4 containers with one video stream in H264 format (not mpeg-4).

I've been unable to identify the cause but it's starting to become a frustrating issue as for all those that had problems with playback, no popular HTML5 fallback solution works. Even the homepage example video for things like ME.js, videojs, jwplayer and so one fails to play back video in Chrome.

Either Chrome has some issues with H264 support, or there's an unknown bug in some other software we all use... I'm going to do testing outside of the company network to see if there's a content filter messing things up.

Share:
39,261
pierrotlefou
Author by

pierrotlefou

Software Developer

Updated on July 09, 2022

Comments

  • pierrotlefou
    pierrotlefou almost 2 years

    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?

  • Jeff Voss
    Jeff Voss over 9 years
    any updates on this? Did Chrome indeed drop h.264 support? Updating video.js seemed to fix the black screen issue for me, buy why?
  • user1120998
    user1120998 almost 8 years
    yes. correct. I am also facing this issue. If the video is downloaded from server alone it could not be player. Before uploading to server i can play that file in chrome. And also less than 2 Mb files is played (downloading from server). I am also very confused on this issue