【Red5流媒体服务器搭建】

1.下载red5-server

https://github.com/Red5/red5-server/releases

windows环境:  启动red5.bat,网页输入127.0.0.1:5080测试是否正确启动 (注意先要有jdk环境)

 

2.red5 demo演示

demo在最新版red5-server的webapp中自带了,不需要再下载。

在red5-server/conf/red5.property中可修改IP与端口

未修改的话,http://127.0.0.1:5080/demos/publisher.html   进入直播demo

直播——观看演示程序,

步骤:1.connect 2.开启摄像头、语音 3.Publish 4.View

 

3.red5 注意事项

Red5修改IP地址注意事项:https://blog.csdn.net/Shangdyu/article/details/7010231

其他设备推流注意:  防火墙可能阻止连接。

延时问题解决:https://blog.csdn.net/mengzhengjie/article/details/49234275

JW Player 使用 RTMP 流  : https://blog.csdn.net/defonds/article/details/17591195

上面的链接还是解决不了,因为缓冲主要在客户端。这里用jwplayer设置缓冲长度为0.1(低延时)

  jwplayer('mediaspace').setup({
    flashplayer: 'player.swf',
    file: 'hello',
    streamer: 'rtmp://localhost/live/',
    rtmp:{ 
        bufferlength: 0.1
    }
  });

------------------------------------------------------------------------------------------------------------------------------------------------

另外,也有jwplayer版本的原因。之前red5安装自带的jwplayer.js版本是5.x.x,使用这个方式更改依旧无效。

于是更新了新的jwplyer6.6版本,可以实现低延时了。

  jwplayer('mediaspace').setup({
    flashplayer: 'player.swf',
    file: 'rtmp://localhost/live/hello.flv',
    rtmp:{ 
        bufferlength: 0.1
    }
  });

 

猜你喜欢

转载自blog.csdn.net/weixin_42165585/article/details/83060168