【问题标题】:How to play rtmp url live streaming in flowplayer如何在flowplayer中播放rtmp url直播
【发布时间】:2012-02-18 15:08:24
【问题描述】:

使用此代码..第一次播放rtmp直播。但是现在,这个播放器只加载了。没有播放

flowplayer("播放器", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", {
    夹子: {
        网址:'直播',
        提供者:'rtmp',
        直播:真
    },
    插件:{
        // RTMP流插件
        rtmp:{
            url: 'flowplayer.rtmp-3.2.3.swf',
            netConnectionUrl: 'rtmp://domain.com/hiox'
        }
    }
});

请帮帮我

【问题讨论】:

  • 请更正代码的缩进并仔细检查语法。这将帮助您获得答案
  • 如何在编码器端调用您的流?以 .flv 结尾?

标签: streaming video-streaming flowplayer rtmp live-streaming


【解决方案1】:

我遇到了同样的问题,根据 Edgecast 文档,您应该使用 subscribe 参数:

flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", {
    clip: {  
        url: 'livestream',
        provider: 'rtmp',
        live: true
    },
    plugins: {
        rtmp: {
            url: 'flowplayer.rtmp-3.2.3.swf',
            netConnectionUrl: 'rtmp://domain.com/hiox',
            subscribe: true
        }
    }
});

编辑:修正错字。

【讨论】:

    【解决方案2】:

    我认为您的 URL 有误,请检查您的流媒体服务器,在我的情况下是 red5。 现在android和ios不支持flash。所以请改用 HLS 或 Dash。

    <!doctype html>
    <html>
    <head>    
        <title>Basic RTMP with red5 : Flowplayer</title>
    
        </head>
    
    <body>
    
    <div id="wowza" style="width:644px;height:276px;margin:0 auto;text-align:center; background-color: red;">
    </div>
     <script src="http://releases.flowplayer.org/js/flowplayer-3.2.13.min.js"></script>
    <script>
    $f("wowza", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", {
    
        clip: {
            //here the url is the link on which streaming is on
            url: 'rtmp://000.00.208.207/live/141769?key=141769',
            scaling: 'fit',
            provider: 'red5'
        },
    
        plugins: { 
            red5: {
            // here red5 is the streaming server, change if your server name is other
                url: "flowplayer.rtmp-3.2.13.swf",
                 // netConnectionUrl defines where the streams are found
                netConnectionUrl: 'rtmp://000.00.208.207/live/'
            }
        },
    });
    </script>
    </body>
    </html>
    

    【讨论】:

      【解决方案3】:

      阅读RTMP docs

      我过去曾成功使用 flowplayer 进行直播。我的配置和你的不同之处在于我的 rtmp 部分有“subscribe: true”。这是使用 EdgeCast 作为我的 rtmp 服务器,但其他提供商也期望它。

      【讨论】:

        猜你喜欢
        • 2012-03-26
        • 1970-01-01
        • 1970-01-01
        • 2013-09-01
        • 2017-09-02
        • 1970-01-01
        • 2019-11-08
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多