IE9 HTML5 video support

后端 未结 7 1356
盖世英雄少女心
盖世英雄少女心 2020-12-02 00:19

I\'m having some trouble displaying HTML5 video in IE9, I added the different types to my htaccess

AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType vide         


        
7条回答
  •  悲&欢浪女
    2020-12-02 00:32

    Internet Explorer 9 support MPEG4 using H.264 codec. But it also required that the file can start to play as soon as it starts downloading.

    Here are the very basic steps on how to make a MPEG file that works in IE9 (using avconv on Ubuntu). I spent many hours to figure that out, so I hope that it can help someone else.

    1. Convert the video to MPEG4 using H.264 codec. You don't need anything fancy, just let avconv do the job for you:

      avconv -i video.mp4 -vcodec libx264 pre_out.mp4
      
    2. This video will works on all browsers that support MPEG4, except IE9. To add support for IE9, you have to move the file info to the file header, so the browser can start playing it as soon as it starts to download it. THIS IS THE KEY FOR IE9!!!

      qt-faststart pre_out.mp4 out.mp4
      

    qt-faststart is a Quicktime utilities that also support H.264/ACC file format. It is part of libav-tools package.

提交回复
热议问题