# docker config for srs. # @see full.conf for detail config explanation. ############################################################################################# # Last modified: 2025-05-10 Jason Yang # Contributor: SRS Team, Jason Yang, Jasper, HyperKNF, Hayden, NPL ITP Team ############################################################################################# ############################################################################################# # Global sections ############################################################################################# ff_log_dir ./objs; ff_log_level info; srs_log_tank all; srs_log_file ./objs/srs.log; # TRACE, DEBUG, INFO, WARN, ERROR srs_log_level_v2 info; max_connections 1000; daemon off; utc_time off; ############################################################################################# # RTMP sections ############################################################################################# listen 1935; chunk_size 60000; ############################################################################################# # HTTP sections ############################################################################################# http_api { enabled on; listen 1985; crossdomain on; auth { enabled on; username python_stats; password wMePq3ahpoLRzgsVg7BY9eE82uuJHT0YukD2ZE1JfMY2RjP4e6QnUaKg3V9x5s9M; } https { enabled off; listen 1990; key ./conf/server.key; cert ./conf/server.crt; } } http_server { enabled on; listen 8080; dir ./objs/nginx/html; crossdomain on; https { enabled off; listen 8088; key ./conf/server.key; cert ./conf/server.crt; } } ############################################################################################# # SRT server section ############################################################################################# srt_server { # whether SRT server is enabled. enabled off; listen 10080; maxbw 1000000000; mss 1500; connect_timeout 4000; peer_idle_timeout 8000; default_app live; peerlatency 0; recvlatency 0; latency 0; tsbpdmode off; tlpktdrop off; sendbuf 2000000; recvbuf 2000000; } ############################################################################################# # WebRTC server section ############################################################################################# rtc_server { enabled on; listen 8000; protocol udp; tcp { enabled off; listen 8000; } candidate $CANDIDATE; ip_family ipv4; api_as_candidates on; resolve_api_domain on; ecdsa on; encrypt on; } ############################################################################################# # PYTHON_ADDONS sections ############################################################################################# python_addons { # Enable or disable Python addon management enabled off; # Python addon definitions # Each addon block defines a Python script to run addon { script "./python/httpbackend_server.py"; } } ############################################################################################# # VHOST sections ############################################################################################# vhost __defaultVhost__ { enabled on; hls { enabled on; } srt { # Whether enable SRT on this vhost. enabled on; srt_to_rtmp on; } http_remux { enabled on; mount [vhost]/[app]/[stream].flv; } rtc { enabled on; # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc rtmp_to_rtc on; keep_bframe on; # opus_bitrate 48000; # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp rtc_to_rtmp on; pli_for_rtmp 6.0; aac_bitrate 48000; } chunk_size 128; tcp_nodelay on; min_latency on; play { gop_cache off; queue_length 10; mw_latency 100; mw_msgs 0; time_jitter full; } publish { mr off; mr_latency 300; firstpkt_timeout 20000; normal_timeout 5000; } security { enabled off; allow play all; allow publish all; } dvr { enabled on; dvr_path ./DVR_Record/[stream]/[2006].[01].[02].[15].[04].[05].mp4; dvr_plan segment; dvr_duration 30; dvr_apply /^live\/.*/; dvr_wait_keyframe on; time_jitter full; } }