Last active
February 12, 2024 16:16
-
-
Save johan149/8dcdef41b7aa9431894cf34010f1df1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SRT config. | |
listen 1935; | |
max_connections 1000; | |
daemon off; | |
srs_log_tank console; | |
http_api { | |
enabled on; | |
listen 1985; | |
} | |
http_server { | |
enabled on; | |
listen 8080; | |
dir ./objs/nginx/html; | |
} | |
srt_server { | |
enabled on; | |
listen 10080; | |
maxbw 0; | |
mss 1500; | |
connect_timeout 4000; | |
peer_idle_timeout 8000; | |
peerlatency 0; | |
recvlatency 0; | |
latency 0; | |
tsbpdmode off; | |
tlpktdrop off; | |
sendbuf 2000000; | |
recvbuf 2000000; | |
} | |
rtc_server { | |
enabled on; | |
listen 8000; | |
tcp { | |
enabled off; | |
listen 8000; | |
} | |
protocol udp; | |
candidate $CANDIDATE; | |
} | |
# @doc https://github.com/ossrs/srs/issues/1147#issuecomment-577607026 | |
vhost __defaultVhost__ { | |
srt { | |
enabled on; | |
srt_to_rtmp on; | |
} | |
http_hooks { | |
enabled on; | |
on_publish https://mo-dev.kubes.meetmo.io/api/v1.6/meetmo/device/stream/webhook/; | |
on_unpublish https://mo-dev.kubes.meetmo.io/api/v1.6/meetmo/device/stream/webhook/; | |
on_play https://mo-dev.kubes.meetmo.io/api/v1.6/meetmo/device/stream/webhook/; | |
on_stop https://mo-dev.kubes.meetmo.io/api/v1.6/meetmo/device/stream/webhook/; | |
} | |
http_remux { | |
enabled on; | |
mount [vhost]/[app]/[stream].flv; | |
} | |
hls { | |
enabled off; | |
hls_path ./objs/nginx/html; | |
hls_fragment 2; | |
hls_window 10; | |
} | |
rtc { | |
enabled on; | |
nack on; | |
twcc on; | |
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc | |
rtmp_to_rtc off; | |
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp | |
rtc_to_rtmp on; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment