mime type html5 video
Hello,
I've been having a problem with HTML5 video playing in firefox when hosted on GoDaddy. I'm almost positive that this is a server side issue but GoDaddy doesn't have the technical support to give me any more solutions than what they have repeatedly suggested. Here is the link to the index page I am having problems with:
http://gerardtonti.com/CV/index.html There is a video that plays above my name. You can see this in other browsers. The HTML for the video is this:
<video width="220px" height="227px" autoplay> <source type="video/mp4" src="http://www.gerardtonti.com/CV/img/Sneeze.mp4"> <source type="video/ogv" src="http://www.gerardtonti.com/CV/img/Sneeze.ogv"> <source type="video/webm" src="http://www.gerardtonti.com/CV/img/Sneeze.webm"> </video>
GoDaddy has suggested creating an htaccess file that contains the following code:
AddType video/mp4 .mp4 .m4v AddType video/ogg .ogv AddType video/webm .webm
I have uploaded the htaccess file with this code and nothing happened. I've placed the file in the root and in the folder that contains the videos. Still nothing. I have had this problem with another client who hosts on GoDaddy as well. Is there a solution to this problem?
Thanks!
Gerard
Изменено
Выбранное решение
Hi Gerard, hosts that provide correct content types for their media work perfectly fine. But I can't move mountains at GoDaddy, sorry.
Прочитайте этот ответ в контексте 👍 1Все ответы (20)
Firefox does have some known HTML5 compatibility issue. These issue are being addressed.
To see what Firefox can do, please view the HTML5 Test.
Sorry for any inconvenience.
It looks that only the mp4 file is present on the server.
The other two give a 404 error.
There is also a problem with the MIME types (video/ogv instead ofvideo/ogg).
Warning: HTTP "Content-Type" of "video/mpeg" is not supported. Load of media resource http://www.gerardtonti.com/CV/img/Sneeze.mp4 failed. Warning: Specified "type" attribute of "video/ogv" is not supported. Load of media resource http://www.gerardtonti.com/CV/img/Sneeze.ogv failed. Warning: HTTP load failed with status 404. Load of media resource http://www.gerardtonti.com/CV/img/Sneeze.webm failed. Warning: All candidate resources failed to load. Media load paused.
Thanks cor-el,
The files are all on the server. All of the video formats work fine locally. The webm and ogv files even work in firefox locally. The webm file doesn't seem to work at all when tested from the server. I am using Miro Video Converter for webm, mp4 and ogv/ogg files. Maybe that's the problem? Also should my code for the ogv look like this?
<source type="video/ogv" src="http://www.gerardtonti.com/CV/img/Sneeze.ogv">
or this?
<source type="video/ogg" src="http://www.gerardtonti.com/CV/img/Sneeze.ogg">
or this?
<source type="video/ogv" src="http://www.gerardtonti.com/CV/img/Sneeze.ogg">
Thanks for the help!
I assume that you need to use video/ogg and make sure that the server sends this MIME type.
How do I make sure that the server sends the MIME type? Sorry I'm not familiar with MIME types or how to create an .htaccess file to do that. I've tried making a .htaccess file with the AddTypes but is there anything else that needs to be in the .htaccess file? This seems really complicated to get a video to play.
Изменено
You should be able to place the directives directly in the .htaccess file (a leading dot means a hidden file).
See this tutorial:
If GoDaddy says that it supports .htaccess files, then it should work.
As a different way to test whether it's being read and processed, you could add this to your .htaccess file:
Redirect 301 /mycv http://gerardtonti.com/CV/index.html
Then try to access it using:
http://gerardtonti.com/mycv
Note: These links were intentionally broken for purposes of this post by italicizing the . before com to avoid having them followed by search bots.
Yeah,
I'm just not sure what the issue is. I'm frustrated and have to get this thing out by Friday. I've tried placing the .htaccess file on the server after GoDaddy said to do that. GoDaddy is no help. Placed this in the file:
AddType video/mp4 .mp4 AddType video/ogg .ogv AddType video/webm .webm
No dice. I can't seem to delete the .htaccess file from the server. It's saying that it cannot find the file but fire FTP is showing it there on the server. Anyhoo, think I'm better off just forgetting about including the animations or just going with good ol' flash that just won't be visible on iPads. I wish the world were ready for HTML5, it seems to have a serious lack of standards.
Изменено
You can try to use another FTP program if FireFTP isn't able to remove this file.
The file may have been created incorrectly in the first place and that has been causing it not to work.
- FileZilla: http://filezilla.sourceforge.net/
Изменено
I made the file in text edit. Saved it as htaccess on my desktop and uploaded it to the server. Once on the server I changed it to .htaccess. The only code in the file is what was listed above. Do I need any other code in the file?
To get your Flash fallback working in Firefox, try adding the type and data attributes to the tag (Firefox uses DATA instead of the MOVIE param):
<object type="application/x-shockwave-flash" data="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" height="227" width="220">
Not sure I got the right URL in there now that I look at it, but it should work.
Tried that, no dice yet again. Ugh. Any other recommendations or support forums? Maybe put a "best viewed in Safari, Chrome and Internet Explorer" disclaimer? Host the videos on YouTube? I'm not the only developer that seems to be having these problems with FF. Is FF looking into it's HTML5 video support?
Изменено
Actually I think YouTube will solve my problem. Score! I just solved the problem on my own :) It's not perfect but it will work.
Изменено
Выбранное решение
Hi Gerard, hosts that provide correct content types for their media work perfectly fine. But I can't move mountains at GoDaddy, sorry.
Actually I ended up spending a bit of time with GoDaddy on the phone. Turns out they needed to upgrade me to a different server. Should be fine in 72 hours. Fingers crossed. Thanks!
Please let me know what the solution was. I'm having the same problem with iPage hosting.
Hi comfortably_numb, do you want to post the address of your page to have volunteers confirm that they see the same issue?
Things can be complicated because using the video and audio tags to play media files with the built-in HTML5 media player only works if the server sends the file with the correct content (MIME) type and Firefox must support this MIME type.
Recent changes allow to play H.264 encoded .mp4 files in addition to .ogg and .ogv files.
WebM is still the safest way to play media files by including it as ne of the source alternatives.
If the server doesn't send the files with the correct MIME type and can't be modified easily then use the object tag as that allows to specify the content type to specify which plugin to use.
I have the same problem, and my hosting is on GoDaddy - which is NOT the issue.
A simple test video using virtually the same code will play on all browsers on a W7 machine, but will only play on Chrome on an XP platform.
The test is at http://www.imillard.com/h5vid/
If Chrome can play the video (with no add-ons or 3rd party support) then the problem must be with Firefox.
So you can either downgrade to Flash, or put a message on your site telling people to get Chrome.
Изменено
Your video plays on Chrome, but not on Firefox. Pretty much as expected.
And I don't even like Chrome - but at least it works.
Изменено