Skip to content

rtmp转webrtc

简介

目前mms-server支持rtmp推送h264的视频流,转封装为webrtc的h264和opus的流

配置

  1. 首先需要在mms.yaml中开启webrtc服务
yaml
webrtc:
  enabled: true
  udp_port: 8878                # webrtc的udp端口(3348端口用于stun,默认开启)
  ip: 192.168.108.211           # 监听的ip
  internal_ip: 192.168.108.211  # 用于像阿里云那种隔离状态下的情况
  1. 接着,还需要在推流域名配置中,使能rtmp到webrtc的转换
yaml
type: publish
name: test.publish.com
apps:
  - name: app                     #接入点名称
    bridge:                       #转协议配置
      no_players_timeout_ms: 10s  #多少时间无人播放,转协议结束
      rtmp:
        to_webrtc: on                #使能rtmp转webrtc

说明

  • 协议转换目前只支持按需转换(还未支持一直转换的配置),即有人播放了,才启动转换,减少服务器消耗

播放

你可以使用我们提供的单机控制台来进行播放: 控制台播放

Released under the MIT License.