IE9 doesn't display mp4 video?

IE9 makes me CRAZY support it for HTML5 video, as I understand it, it supports the H.264 codec, so any files with the extension .mp4 at the end.

The problem is that it does not play video files with the extension .mp4.,.

This is even more unusual if I test it locally, IE9 will play mp4 video, it just does not play it on the server, it also has nothing to do with MIME types, I added the following MIME type for the server:

.mp4 - video.mp4

And on the network panel in the IE developer tools, listing it as "video / mp4", the only unusual thing is that the Network panel shows that IE is requesting it 3 times (I have no idea why this might be)

I am at the end of my cable, so I actually wrote the code below to try to fix it (I really hate using this on a live site, this is terrible):

<!--[if !IE 9]><!--> <video controls="controls"> <!--<![endif]--> <!-- This is a horrible way to do this, but I cannot figure out for the life of me why IE9 won't play this video :( --> <!--[if !IE 9]><!--> <source src="video.ogv" type='video/ogg; codecs="theora, vorbis"'/> <source src="video.mp4" type="video/mp4"> <!--<![endif]--> <!-- If HTML5 video is not supported, the following Flash video will play --> <p>flash video stuff is here</p> <!--[if !IE 9]><!--> </video> <!--<![endif]--> 

This fixes this by causing IE9 to use flash video for browsers that do not support HTML video (instead, by default, IE9 just seems like an empty field, no error message, nothing). Unfortunately, this decision is so terrible that I am almost ashamed to write it.

Does anyone know what could be causing this? Or how can I fix this?

EDIT: Not sure if this makes any difference, but I used http://www.freemake.com/free_video_converter/ to convert the files to the correct formats

+4
source share
3 answers

I still absolutely do not know what caused this, I dug and dug for hours, and in the end I asked someone to try in my version of IE9, for some reason it worked on my computer, and not on mine.

I'm not quite sure why, I just put it in a particular version of IE9 (which is disappointing given how much time I spent trying to figure it out!)

+1
source

I ran into the same problem. IE9 will play the video when you run the HTML file locally, but this thing stops working when you put it on the server. The problem should have something to do with the video file. You think that this cannot be, given that it works locally. But this is similar to the case. When I uploaded a sample video file on the VideoJS website ( http://vjs.zencdn.net/v/oceans.mp4 ) and put it in my own setting, IE9 plays it just fine, So IE9 is somehow more picky when it plays the deleted file.

I will update this answer when I find out what magic parameters are needed to make IE9 happy.

UPDATE: Well, I think I get it. I spent some time comparing an MP4 file that works with one that doesn't work. The first random access index ("stss" atom) is near the beginning of the file. In the latter, it is at the end of the file. Both places are legal, but it seems IE9 is too stupid to look for it at the end of the file when downloading the file from the Internet.

The solution is to move the random access index to the beginning of the MP4 file using the tool that comes with ffmpeg: qt-faststart .

Note. I tried another tool: QTIndexSwapper. The file seems to be corrupt.

+4
source

There is an answer to stackoverflow.

Perhaps this is useful for you:

HTML5 - mp4 video not playing in IE9

Hope this helps ...

0
source

Source: https://habr.com/ru/post/1432721/


All Articles