官网教程链接https://ossrs.net/lts/zh-cn/docs/v4/doc/getting-started
github 网址https://github.com/ossrs/srs/wiki/migrate_v4_CN_introduction
个人博客 http://www.coderyj.com
idea 注册方法 http://idea.coderyj.com
技术交流qq群729987144
git clone -b 4.0release https://gitee.com/ossrs/srs.git
cd srs/trunk
./configure
make
webrtc
因为webrtc
延迟在100ms-300msCANDIDATE="192.168.1.10"
./objs/srs -c conf/rtmp2rtc.conf
http://localhost:8080/
,或者执行命令:# 查看SRS的状态
./etc/init.d/srs status
# 或者看SRS的日志
tail -n 30 -f ./objs/srs.log
MB0:trunk $ ./etc/init.d/srs status
SRS(pid 90408) is running. [ OK ]
MB0:trunk $ tail -n 30 -f ./objs/srs.log
[2021-08-13 10:30:36.634][Trace][90408][12c97232] Hybrid cpu=0.00%,0MB, cid=1,1, timer=61,0,0, clock=0,22,25,0,0,0,0,1,0
ffmpeg -i "rtsp://admin:a12345678@172.16.1.211:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif" -vcodec copy -acodec copy -f flv "rtmp://172.16.1.65:1935/live/livestream"
- 需要先安装 ffmpeg
rtsp://admin:a12345678@172.16.1.211:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
这个是我摄像机的rtsp地址, 更改为你的地址即可