Html video player reproduces sound but not video

Im in the process of creating a webpage and I'm trying to insert a video. The video player loads fine, and you can click play, but only sound is played, not video. (When previewing in chrome) When viewing in firefox, it works correctly

My code is as follows:

<video width="600" height="400" controls> <source src="ds2.mp4" type="video/mp4"> <source src="ds2.ogv" type="video/ogv"> <source src="ds2.webm" type="video/webm"> 

Your browser does not support the video tag.

 </video> 

My Doctype <!Doctype html>

I checked the MIME type, its video / mp 4. however, one of the mime requests is in red and canceled (when checked using google dev tools)

Im using microsoft 4 web expression (if relevant)

If I neglected any important information, please let me know and update the message poorly :) Thanks in advance for your help :)

+9
html html5 google-chrome video
source share
2 answers

Your problem is with the encoding of the file. HTML5 supports very few types and, unfortunately, each browser can play only part of this narrow list.

If you convert the mp4 file to H.264 encoding, it will work on chrome and IE9 and higher, but, apparently, due to problems with patents, firefox does not support it, but will play if the OS can play it. This is really annoying and still requires the use of players to play files in unsupported browsers.

+21
source share

H.264 files are MPEG.4 files. H.264 or MPEG-4 Part 10, Advanced Video Coding (MPEG-4 AVC) is a block-based compensation-based video compression standard. Since 2014, it has been one of the most commonly used formats for recording, compressing, and distributing video content.

0
source share

All Articles