WebRTC 使用笔记

1. 安装go语言开发环境,下载地址 https://golang.google.cn/dl/

2. 下载RTSPwoWeb,地址 https://github.com/deepch/RTSPtoWeb

3. 解压目录,命令行运行 go env -w GO111MODULE=on 设置环境

4. 修改配置文件,config.json

{
  "server": {
    "debug": false, // 调试模式
    "http_debug": false,
    "http_demo": false,// 是否显示示例,开启后可访问localhost:8083查看
    "http_dir": "web",
    "http_login": "demo",
    "http_password": "demo",
    "http_port": ":8083",
    "https": false,
    "https_auto_tls": false,
    "https_auto_tls_name": "",
    "https_cert": "server.crt",
    "https_key": "server.key",
    "https_port": ":443",
    "ice_servers": [
      "stun:stun.l.google.com:19302"
    ],
    "log_level": "debug",
    "rtsp_port": ":5541",
    "token": {
      "backend": "http://127.0.0.1/test.php"
    },
    "defaults": {
      "audio": false
    }
  },
  "streams": {
    "27aec28e-6181-4753-9acd-0456a75f0289": {
      "channels": {
        "0": {
          "url": "", // rtsp流地址
          "debug": false,
          "audio": false // 是否转音频
        }
      },
      "name": "robot"
    }
  }
}

5. 运行命令 go run ./ ,访问 http://localhost:8083 查看结果

posted @   Bin_x  阅读(159)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示