播放前html5视频Safari浏览器已全部下载 [英] html5 video safari downloads full before playing

查看:240
本文介绍了播放前html5视频Safari浏览器已全部下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道为什么我的mp4 html5视频没有流式传输",而是一直等到完全下载后才开始在野生动物园中播放.

Im wondering why my mp4 html5 video is not "streaming" and instead waits till it is fully downloaded before it starts playing in safari.

www.pija.se

www.pija.se

我尝试过QTIndexSwapper,但是它说索引位置正确.

I have tried QTIndexSwapper but it says the index is in the right position.

任何帮助表示赞赏.

推荐答案

看起来MOOV原子不在文件的开头. 我使用ffmpeg重新定位(没有其他编码),然后进行二进制比较(使用 HexFiend )和快速测试似乎表明Safari会更快地播放视频

looks like the MOOV atom isn't at the beginning of the file. I used ffmpeg to just relocate that (no other encoding) and then a binary compare (using HexFiend) and a quick test seemed to show that Safari was playing the video sooner

./ffmpeg -i top.mp4 -codec copy -movflags faststart top-fs.mp4

(原因是,即使我清除了浏览器缓存,我也没有做诸如弹跳测试服务器或对时间计时太准确的事情)

(caveat being that even though I cleared browser cache I didn't do things like bounce my test server or time things too accurately)

FWIW我发现ffmpeg是一个很好的解决方案,尤其是对于背景视频,您需要

FWIW I find ffmpeg to be a good solution, and especially for background video you'll want to play around with parameters to optimize for your use-case

这篇关于播放前html5视频Safari浏览器已全部下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆