Safari - Videos load far too slowly

前端 未结 2 1309
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 00:23

I am having a bit of trouble implementing a video into my site.

I use this block of code:

相关标签:
2条回答
  • 2020-12-04 00:28

    There could be a problem with video encoder. Just run this program to re-encode your video. Link Hope this helps.

    0 讨论(0)
  • 2020-12-04 00:35

    My assumption would be that the video has default encoding - usually with an mp4 video the final step is to write the MOOV atom that contains the metadata and information about the frame locations etc at the end. This means until the file has been completely read the browser doesn't have all the information available to it.

    You can fix this using FFMPEG (open source, free, downloads available for most platforms) and doing a second pass on the video to move the MOOV atom to the front:

    ./ffmpeg -y -i source.mp4 -movflags faststart dest.mp4
    
    0 讨论(0)
提交回复
热议问题