1. 项目地址:
    # 服务端
    https://github.com/gwuhaolin/livego
    # 客户端
    https://github.com/bilibili/flv.js
    # 客户端 CDN
    https://cdnjs.com/libraries/flv.js/1.5.0
  2. 使用:
    1. 下载源码:
      git clone https://github.com/gwuhaolin/livego.git
    2. 编译:
      cd livego
      go build
    3. 启动服务:
      ./livego
    4. 获取 串流密钥:
      http://localhost:8090/control/get?room={roomname}
    5. 推流:
      # 推流地址:
      rtmp://localhost:1935/live/{串流密钥}
      # 参考下图 obs 的推流设置
    6. 播放:
      # 播放地址:
      RTMP: rtmp://localhost:1935/live/{roomname}
      FLV: http://127.0.0.1:7001/live/{roomname}.flv
      HLS: http://127.0.0.1:7002/live/{roomname}.m3u8
      # 参考 flv.js 提供的 demo
      https://github.com/bilibili/flv.js/blob/master/demo/index.html
文档更新时间: 2020-11-22 20:37   作者:lee