Flowplayer 从 apache 流式传输 mp4

发布于 2024-10-20 08:19:57 字数 1344 浏览 7 评论 0原文

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

不幸的是,使用的浏览器大部分是 IE6 :(

Apache 2 running在 Redhat 上,

我使用 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>

有人有任何建议吗?

谢谢

I'm having some problems getting this to work. I think I've done it right based on http://flowplayer.org/forum/5/14664#post-14830). The clip starts to play fine, but when I skip to a part of the clip which hasn't loaded yet it just goes back to the start of the file/video

Sadly the browser used is IE6 for the most part :(

Apache 2 running on Redhat

I've created an mp4 file with ffmpeg.
Run qt-faststart 1.mp4 1.qt.mp4

Installed mod_flvx.c

Added:

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

To Apache httpd.conf

Using the example page:

<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>

Anyone have any suggestions?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雨夜星沙 2024-10-27 08:19:57

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

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

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

您需要将模块添加并加载到 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 则不能。

First off, you need to see if your apache is configured to correctly seek to parts of the video. You can do that by passing a get parameter like my_vide_path.mp4?start=10 to have it start 10 seconds in. If it successfully starts 10 seconds in, then apache is set up correctly and you need to make flowplayer work. If apache isn't set up correctly, then even the correct flowplayer config won't help.

I doubt your apache is set up correctly though. You're telling apache to handle .flv files and yet you're using mp4s.

I've successfully gotten this to work with the apache module from http://h264.code-shop.com/trac/wiki.

You'll need to add and load the module into apache and tell apache to handle .mp4 files with it.

Next step would be to test with that get parameter ?start=10 to see if it is seeking correctly.

After that, all you need to do is:

<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>

I used the updated flowplayer swf and instead of h264's swf, the flowplayer plugin for psuedostreaming, as it works with the newer version of flowplayer and apparently the h264 one didnt.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文