I have an mp4 video that I want to play in IE9 using HTML5 <video>
tag. I added the MIME type to IIS 7 so if I browse http://localhost/video.mp4
it plays in both Chrome and IE9 but not in HTML5, Chrome plays the video in HTML though. Here's the code:
<html>
<body>
<video src="video.mp4" width="400" height="300" preload controls>
</video>
</body>
</html>
Any ideas?
Thanks
UPDATE:
Tried the same file in Firefox 5.0 and it didn't work either, only Chrome is able to play the mp4 video.
Internet Explorer and Edge do not support some MP4 formats that Chrome does. You can use
ffprobe
to see the exact MP4 format. In my case I have these two videos:Both play fine in Chrome, but the first one fails in IE and Edge. The problem is that IE and Edge don't support yuv444. You can convert to a shittier colourspace like this:
If it's still not working here's what may certainly be a solution: encode the mp4 with compression format H.264. If you encode it with format mpeg4 or divx or else it will not work on IE9 and may as well crash Google Chrome. To do that, I use Any Video Converter freeware. But it could be done with any good video tool out there.
I've been trying all solutions listed here and tried other workaround for days but the problem lied in the way I created my mp4. IE9 does not decode other format than H.264.
Hope this helps, Jimmy
Whithout JavaScript, the only way I could play without errors:
use both format it works fine in all browser:
I had to install IIS Media Services 4.1 from the Windows Web App Gallery.
http://www.microsoft.com/web/gallery/install.aspx?appsxml=http://www.microsoft.com/web/webpi/3.0/MediaProductList.xml&appid=MediaServices
for IE9 I found that a meta tag was required to set the mode