Specified "type" attribute of "video/mp4" is not supported
Solution 1
MP4 type isn't supported on Firefox! It's only supported in Safari 3.0+, Google Chrome 5.0+ and IE 9.0+! For Firefox you'll need .ogg file or .webm video files as sources! Here is an image containing all supported video formats in HTML 5:
And for audio support see this pic:
UPDATE:
Firefox now supports MP4 H.264 (AAC or MP3) https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats
Note: MP4s encoded with a high profile will not run on lower end hardware, such as low end Firefox OS phones.
Solution 2
Firefox gives the error because it doesn't support video/mp4
, it's nothing to worry about, something else is causing the problem. You could start by removing one of your two preload
attributes although I don't think that's the main problem either.
If you load the webm
video directly in Firefox it takes about 30 seconds and after it loads up the play point is right at the end of the video. If you load the ogv
file directly it appears to play just fine. I would therefore conclude that there's something wrong with the encoding of your webm
file, I'd try encoding it again with some different options.
As a side note, if you can't work out what's up with the encoding, there's really nothing in the video that requires it to be a video. It's basically a video of a slideshow, you might be better off implementing it that way, it would certainly reduce the bandwidth required.
markyeoj
I'm a website and software developer. but new to the world of actual job. because I'm just a fresh graduate..
Updated on July 05, 2022Comments
-
markyeoj almost 2 years
I am using 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 the code is
<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.. its not playing on mozilla browser.. it keeps on loading but not playing.. and using the ctrl+shift+k on mozilla.. I found these error.
-- [18:47:12.942] Specified "type" attribute of "video/mp4" is not supported. Load of media resource videos/Sequence1.mp4 failed. @ http://thesuperheroblueprint.com/
Please help me.. I really need to fix this so bad.. Here is the website..
-
markyeoj over 11 yearsI have this..
<source type="video/webm" src="videos/Sequence1.webm" />
would you like to open the website and copy the video url. Try to read the code before giving an answer with exclamations.. -
markyeoj over 11 yearsthanks for the answer, looks like we have a different result when playing thesuperheroblueprint.com/videos/Sequence1.webm directly because at my end its playing just fine. but when I'm playing the video on the webpage. it takes 30 seconds and after that the point is right at the end of the vide.
-
Brijesh Gajjar over 11 yearstry adding source of webm file after ogg file!!
-
markyeoj over 11 yearsSorry, my mistake.. you are right I thought I am plying the webm video directly, it was the ogv video that playing fine. while the webm video is not playing..
-
markyeoj over 11 yearsI tried i sir.. but still not working.. it the mozilla loads the ogv file but didn't play.
-
markyeoj over 11 yearsstill no improvement si.. I am now very frustrated.. the html5 slides you suggested is not approved by my client. she just want me to fix the problem. What do you think?
-
robertc over 11 years@markyeoj I think there's still something wrong with the way you've encoded the WebM video
-
markyeoj over 11 yearsthanks, I appreciate that, do you have a suggestion what should i do? coz until I cant figure it out.
-
markyeoj over 11 yearsDo you think that there is a possibility that the miro video converter also caused the problem?