ubuntu18.04配置RTSPtoWebRTC

go语言版RTSPtoWebRTC

https://github.com/deepch/RTSPtoWebRTC

启动RTSPtoWebRTC

cd RTSPtoWebRTC/
go run *.go

配置相机信息

vim RTSPtoWebRTC/config.json
//写入如下内容
{
  "server": {
    "http_port": ":8083"
  },
  "streams": {
    "H264_AAC1": {
      "on_demand": false,
      "disable_audio": true,
      "url": "rtsp://username:password@ip"
    }
  }
}

Vue中配置流媒体地址

VUE_APP_BASE_VIDEO_STREAM = 'http://ip:8083/stream/player/H264_AAC'

ubuntu18.04系统下自启动RTSPtoWebRTC

创建启动脚本start_go.sh,内容如下:

#!/bin/bash
cd /home/nano/Desktop/python_test/rtsp2webrtc/RTSPtoWebRTC/RTSPtoWebRTC
go run *.go

编辑bashrc:

猜你喜欢

转载自blog.csdn.net/weixin_43676010/article/details/126482151