MediaElement.js - Flash Video Wont Play Until Fully Loaded

前端 未结 4 1910
攒了一身酷
攒了一身酷 2020-12-16 22:02

I\'m having an issue will MediaElement.js (my flash video player) not playing my .m4V video files (encoded using ffmpeg) until the video is fully loaded.

4条回答
  •  自闭症患者
    2020-12-16 22:49

    As you are encoding your own videos and using FFmpeg, I suggest using 'qt-faststart'.

    This is a useful tool included with FFmpeg that rearranges a file with H.264 video, "such that the moov atom is in front of the data, thus facilitating network streaming". Basically, it allows web movies to start playing before they are completely downloaded.

    Enable it with the following the ffmpeg directory:

    cd ~/ffmpeg
    make tools/qt-faststart
    

    Usage (after your ffmpeg encoding):

    qt-faststart input.foo output.foo
    

    This should allow your player to play the video while it is still downloading.

提交回复
热议问题