IE9 HTML5 video support

后端 未结 7 1344
盖世英雄少女心
盖世英雄少女心 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:46

    As others have mentioned, IE9 doesn't support OGV, only MP4 and WebM (with plugin). I encountered a lot of trouble even with the MP4, which should play natively, before finding out that one thing to consider when serving MP4 files for IE9 is the file meta information called moov atom embedded in the MP4 file itself. If it's located at the end of the file, where some encoders including ffmpeg places it, IE9 will not start playing the video unless the whole video file downloaded. Relocating the moov atom metadata to the beginning of the file enables progressive download of the MP4 file, and IE9 handles the video nicely.

    There's a tool called qt-faststart to perform this operation. Worked wonders for me, compiling and using the Linux command-line version distributed with ffmpeg.

    make tools/qt-faststart
    sudo cp tools/qt-faststart /usr/local/bin/
    qt-faststart original_file.mp4 modified_file.mp4
    

提交回复
热议问题