Specified "type" attribute of "video/mp4" is not supported

markyeoj picture markyeoj · Jan 26, 2013 · Viewed 24.9k times · Source

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

Answer

Brijesh Gajjar picture Brijesh Gajjar · Jan 26, 2013

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: table displaying video formats supported by various browsers

And for audio support see this pic:

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: MP4s encoded with a high profile will not run on lower end hardware, such as low end Firefox OS phones.