global:
loglevel: debug
plugins:
- name: rtmp # 强制加载 RTMP 插件(必须添加)
enable: true
RTMP 模块核心配置(含鉴权)
rtmp:
enable: true # 启用 RTMP 协议
listenaddr: ":1935" # 监听 1935 端口(与 Docker 映射一致)
publish:
# 推流鉴权规则:仅允许携带 ?secret=myrtmp123 的推流
auth:
^live/(.+)$: # 仅对 live 路径下的推流生效(如 rtmp://IP:1935/live/test)
type: query
key: secret # 鉴权参数名
value: "myrtmp123" # 正确的鉴权值
global:
loglevel: debug
plugins:
- name: rtmp # 强制加载 RTMP 插件(必须添加)
enable: true
RTMP 模块核心配置(含鉴权)
rtmp:
enable: true # 启用 RTMP 协议
listenaddr: ":1935" # 监听 1935 端口(与 Docker 映射一致)
publish:
# 推流鉴权规则:仅允许携带 ?secret=myrtmp123 的推流
auth:
^live/(.+)$: # 仅对 live 路径下的推流生效(如 rtmp://IP:1935/live/test)
type: query
key: secret # 鉴权参数名
value: "myrtmp123" # 正确的鉴权值