The specified "type" attribute for "video / mp4" is not supported

I use mediaelement js .. on my .htacces I have these ..

AddType video/mp4 mp4 m4v AddType audio/mp4 m4a AddType video/ogg ogv AddType audio/ogg ogg oga AddType video/webm webm 

and on my index.html I have this on my <head>

 <script src="/js/jquery.js"></script> <script src="/js/mediaelement-and-player.min.js"></script> <link rel="stylesheet" href="/js/mediaelementplayer.css" /> 

and code

 <video width="600" height="450" preload="none" autoplay preload="auto" > <!-- MP4 for Safari, IE9, iPhone, iPad, Android, and Windows Phone 7 --> <source type="video/mp4" src="videos/Sequence1.mp4"/> <!-- WebM/VP8 for Firefox4, Opera, and Chrome --> <source type="video/webm" src="videos/Sequence1.webm" /> <!-- Ogg/Vorbis for older Firefox and Opera versions --> <source type="video/ogg" src="videos/Sequence1.ogv" /> <!-- Flash fallback for non-HTML5 browsers without JavaScript --> <object width="320" height="240" type="application/x-shockwave-flash" data="flashmediaelement.swf"> <param name="movie" value="flashmediaelement.swf" /> <param name="flashvars" value="controls=&file=videos/Sequence1.mp4" /> </object> </video> 

unfortunately .. it does not play on the Mozilla browser .. it continues to load, but does not play .. and using ctrl + shift + k on mozilla .. I found these errors.

- [18: 47: 12.942] The specified attribute of type "video / mp4" is not supported. Loading video resources media resources / Sequence1.mp4 failed. @ http://thesuperheroblueprint.com/

Please help me .. I really need to fix this so badly. Here is the site. .

+6
source share
2 answers

MP4 type is not supported in Firefox! It is only supported on Safari 3.0+, Google Chrome 5.0, and IE 9.0+! For Firefox, you will need a .ogg or .webm file as sources! Here is an image containing all supported video formats in HTML 5: table displaying video formats supported by various browsers

And for audio support see this picture:

table displaying audio formats supported by various browsers

UPDATE:

Firefox now supports MP4 H.264 (AAC or MP3) https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats

Note. MP4 encoded with a high profile will not work on the lower end such as low-level phones with Firefox.

+24
source

Firefox gives an error because it does not support video/mp4 , there is nothing to worry about, something else causes a problem. You can start by removing one of the two preload attributes, although I don't think the main problem is either.

If you upload webm video directly to Firefox, it takes about 30 seconds, and after it loads, the playback point is right at the end of the video. If you upload the ogv file directly , it seems to play fine. Therefore, I came to the conclusion that something is wrong with the encoding of your webm file, I would try to encode it again with some different parameters.

As a side note, if you cannot understand what is happening with the encoding, there is nothing in the video that requires it to be a video. This is mostly a slideshow video, you might be better off implementing it that way , this will certainly reduce the required bandwidth.

+3
source

All Articles