我遇到缓冲问题。
这是我的代码,我设置autoBuffering:true但是当我从服务器运行视频时看起来不喜欢缓冲。当它在本地加载视频时很好。
var player = $f("player", {
src: "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf",
version: [9, 115],
onFail: function () {
document.getElementById("info").innerHTML =
"You need the latest Flash version to see MP4 movies. " +
"Your version is " + this.getVersion();
}
}, {
clip: {
url:"http://path/Videos/04. The White Shirt.mp4
autoBuffering: true,
bufferLength : 2, autoPlay: true,
}
});
答案 0 :(得分:0)
作为陈述here,问题可能与MP4的编码类型有关:
对于MP4文件,您必须将MP4元数据(“moov atom”)从文件末尾移动到开头
编辑:我刚刚测试了qt-faststart(在Debian中用ffmpeg打包):像魅力一样工作!只需在MP4中对视频进行编码,然后运行:
qt-faststart encoded-video.mp4 encoded-for-streaming-video.mp4
尺寸完全相同,但视频会立即播放。