go language version RTSPtoWebRTC
https://github.com/deepch/RTSPtoWebRTC
Start RTSPtoWebRTC
cd RTSPtoWebRTC/
go run *.go
Configure camera information
vim RTSPtoWebRTC/config.json
//写入如下内容
{
"server": {
"http_port": ":8083"
},
"streams": {
"H264_AAC1": {
"on_demand": false,
"disable_audio": true,
"url": "rtsp://username:password@ip"
}
}
}
Configure streaming media address in Vue
VUE_APP_BASE_VIDEO_STREAM = 'http://ip:8083/stream/player/H264_AAC'
Self-starting RTSPtoWebRTC under ubuntu18.04 system
Create a startup script start_go.sh with the following content:
#!/bin/bash
cd /home/nano/Desktop/python_test/rtsp2webrtc/RTSPtoWebRTC/RTSPtoWebRTC
go run *.go
edit bashrc: