极简web集成 rtsp/rtmp免插件播放,web/rtmp/rtsp推流方案

一直有客户要求在Web上集成rtsp/rtmp播放和web推流功能,测试对比各种流服务平台和播放器后,发现在github的ovsyunlive不管是延时,便捷和集成易用性都是非常好,还是看效果吧,直接下载测试如下:

github 搜ovsyunlive下载解压启动

1、修改ovsyunmedia.ini里面的exthost为你安装机子上的IP(内网可以不用调整,也可以用内网IP,公网一定要配公网IP)
2、双击运行:start.bat 停止:stop.bat
3、Web播放,Web推流配地址(支持rtmp,rtsp,webrtc,ovplayw)
Webrtc/rtmp/rtsp推流(注意:摄像头打开权限需要https网址):
https://IP:7702/pub/index.html
Webrtc/rtmp/rtsp/ovplayw播放:
http://IP:7701/play/index.html
链接播放rtsp/rtmp:
http://IP:7701/play/play.html?rtsp://admin:xxx@192.168.1.105/live0.264
代码集成测试(www/play/目录):
http://IP:7701/play/demo.html

内网测试延时仅0.2秒,通常0.1-0.3/秒左右

二行代码集成播放rtsp,详见目录demo

//初始播放器服务地址 直接使用H5的video控制页面集成
this.ovplayer = new OvPlayer("video", window.location.protocol+"//"+window.location.hostname+port);
//rtsp视频地址播放
ovplayer.connect("rtsp://196.21.92.82/axis-media/media.amp");

公网演示:

m.ovmeet.com:7701/play/index.html

posted @ 2023-11-07 09:24  ovmeet  阅读(494)  评论(0编辑  收藏  举报