Wowza 上实时动态比特率切换的播放器代码

发布于 2024-12-21 17:24:13 字数 335 浏览 3 评论 0原文

我正在使用 http://flowplayer.org/plugins/streaming/bwcheck.html对于 VoD 上的动态比特率切换没有任何问题,但我无法让 flowplayer 或 jwplayer 处理实时流。

有没有人有任何万无一失的代码示例,供任何使用 Wowza 的玩家使用?

编辑:

我在上面的示例中添加 live: true 并将流名称更改为stream_1等,但只是得到一个流不存在错误。

谢谢。

I'm using http://flowplayer.org/plugins/streaming/bwcheck.html for dynamic bitrate switching on VoD without any problem but I can't get flowplayer or jwplayer working with live streams.

Does anyone have any foolproof code examples please for ANY player working with Wowza?

Edit:

I add live: true and change the stream names to stream_1 etc in the example above but just get a stream doesn't exist error.

Thank you.

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

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

发布评论

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

评论(1

梦亿 2024-12-28 17:24:13

在 JWplayer 中有几种方法可以做到这一点。一种是带有级别的客户端:

<div id="container">Loading the player...</div>

<script type="text/javascript">
    jwplayer("container").setup({
        flashplayer: "/jwplayer/player.swf",
            height: 270,
            width: 480,
            image: "/thumbs/video.jpg",
            levels: [
                { bitrate: 300, file: "videos/video_300k.mp4", width: 320 },
                { bitrate: 600, file: "videos/video_600k.mp4", width: 480 },
                { bitrate: 900, file: "videos/video_900k.mp4", width: 720 }
            ],
            provider: "rtmp",
            streamer: "rtmp://rtmp.example.com/application/"
    });
</script>

另一种是使用服务器端 RSS。从补丁 8 开始,Wowza V3 将基于 smil 文件(就像您用于 iOS 的自适应比特率切换一样)或 ngrp(由 Wowza V3 转码器生成)生成 RSS 文件。您将使用的网址是:

http://[wowza-ip-address]:1935/[application]/smil:[streamName].smil/jwplayer.rss - JWPlayer adaptive streaming

http://[wowza-ip-address]:1935/[application]/ngrp:[streamName]/jwplayer.rss - JWPlayer adaptive streaming

希望这有帮助。

There are a few ways of doing this in JWplayer. One is client-side with levels:

<div id="container">Loading the player...</div>

<script type="text/javascript">
    jwplayer("container").setup({
        flashplayer: "/jwplayer/player.swf",
            height: 270,
            width: 480,
            image: "/thumbs/video.jpg",
            levels: [
                { bitrate: 300, file: "videos/video_300k.mp4", width: 320 },
                { bitrate: 600, file: "videos/video_600k.mp4", width: 480 },
                { bitrate: 900, file: "videos/video_900k.mp4", width: 720 }
            ],
            provider: "rtmp",
            streamer: "rtmp://rtmp.example.com/application/"
    });
</script>

The other is using a server-side RSS. As of Patch 8, Wowza V3 will generate an RSS file based on a smil file (like you'd use for adaptive bitrate switching for iOS) or an ngrp (generated by the Wowza V3 transcoder). The URLs you'd use are:

http://[wowza-ip-address]:1935/[application]/smil:[streamName].smil/jwplayer.rss - JWPlayer adaptive streaming

http://[wowza-ip-address]:1935/[application]/ngrp:[streamName]/jwplayer.rss - JWPlayer adaptive streaming

Hope this helps.

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