kunlang_video/deploy/srs/conf/live.conf
2026-05-09 10:51:10 +08:00

68 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# SRS 远控专用配置(低延迟)
listen 1935;
max_connections 2000;
daemon off;
pid ./run/srs_live.pid;
srs_log_tank file;
srs_log_file ./log/srs_live.log;
# HTTP server 用于 WebRTC 信令与调试播放
http_server {
enabled on;
listen 8080;
dir ./html;
}
# HTTP API 用于管理与监控
http_api {
enabled on;
listen 1985;
}
# 基础统计
stats {
network 0;
}
# WebRTC 服务端口UDP
rtc_server {
enabled on;
listen 8000; # UDP 端口
candidate $CANDIDATE; # 可替换为实际网卡 IP
}
# vhost for remote control live streams
vhost live {
# 开启 RTMP→WebRTC 转换,供远控端低延时查看
rtc {
enabled on;
rtmp_to_rtc on;
rtc_to_rtmp off; # 一般远控不回推音视频,可关掉
}
# 允许 RTMP 低延迟播放和转发
play {
mw_latency 100; # 最小缓存,毫秒级
queue_length 10; # 减少播放端延迟
}
# HTTP-FLV 用于调试或 Web 页面播放
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
# 关闭 DVR、HLS、转码、转推等录像逻辑
dvr {
enabled off;
}
hls {
enabled off;
}
# 关闭冗余功能保证最低延迟
forward {
enabled off;
}
}