gpt4 book ai didi

apache - Flowplayer 从 apache 流式传输 mp4

转载 作者:行者123 更新时间:2023-12-02 05:48:46 25 4
gpt4 key购买 nike

我在使其正常工作时遇到一些问题。我认为我已经根据http://flowplayer.org/forum/5/14664#post-14830做对了)。剪辑开始播放正常,但是当我跳到剪辑中尚未加载的部分时,它只会返回到文件/视频的开头

遗憾的是,大部分使用的浏览器都是 IE6 :(

在 Redhat 上运行的 Apache 2

我用 ffmpeg 创建了一个 mp4 文件。运行qt-faststart 1.mp4 1.qt.mp4

已安装 mod_flvx.c

添加:

LoadModule flvx_module modules/mod_flvx.so
AddHandler flv-stream .flv

到 Apache httpd.conf

使用示例页面:

<script type="text/javascript">
flowplayer("player", "flash/flowplayer-3.0.3.swf", {
clip: {
url: 'http://servername/player/media/1.qt.mp4',
// default provider: 'h264streaming'
provider: flashembed.isSupported([9, 115]) ? 'h264streaming' : 'lighttpd',
scaling: 'fit',
autoBuffering: true,
autoplay: false,
bufferLength: 3
},
log: {
level: 'debug'
},
plugins: {
h264streaming: {
url: 'flash/flowplayer.h264streaming-3.0.5.swf'
},
controls: {
url: 'flash/flowplayer.controls-3.0.3.swf',

// which buttons are visible and which not ?
play:false,
fullscreen:true,

// scrubber is a well known nickname to the timeline/playhead combination
scrubber: true
}
}
});
</script>

大家有什么建议吗?

谢谢

最佳答案

首先,您需要查看您的 apache 是否配置为正确查找视频的某些部分。您可以通过传递像 my_vide_path.mp4?start=10 这样的 get 参数来让它在 10 秒内启动。如果它在 10 秒内成功启动,那么 apache 已正确设置,您需要让 flowplayer 工作。如果 apache 设置不正确,那么即使正确的 flowplayer 配置也无济于事。

我怀疑你的 apache 设置是否正确。您告诉 apache 处理 .flv 文件,但您正在使用 mp4。

我已经成功地让它与 http://h264.code-shop.com/trac/wiki 中的 apache 模块一起使用。 .

您需要将模块添加并加载到 apache 中,并告诉 apache 用它来处理 .mp4 文件。

下一步是使用 get 参数 ?start=10 进行测试,看看它是否正确查找。

之后,您需要做的就是:

<script type="text/javascript">
flowplayer("player", "flash/flowplayer-3.0.3.swf", {
clip: {
url: 'http://servername/player/media/1.qt.mp4',
default provider: 'h264streaming'

},
plugins: {
h264streaming: {
url: 'flash/flowplayer.h264streaming-3.0.5.swf'
}
}
});
</script>

我使用了更新的 flowplayer swf,而不是 h264 的 swf,而是用于 psuedostreaming 的 flowplayer 插件,因为它可以与较新版本的 flowplayer 配合使用,而显然 h264 则不能。

关于apache - Flowplayer 从 apache 流式传输 mp4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5168550/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com