Skip to content

Instantly share code, notes, and snippets.

@johan149
Last active February 1, 2023 05:04
Show Gist options
  • Save johan149/e5f25c8e1681dc3804a175948d767151 to your computer and use it in GitHub Desktop.
Save johan149/e5f25c8e1681dc3804a175948d767151 to your computer and use it in GitHub Desktop.
# 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 150000000;
connect_timeout 4000;
peerlatency 240;
recvlatency 240;
latency 240;
tsbpdmode off;
tlpktdrop off;
sendbuf 2000000;
recvbuf 2000000;
}
# @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://fox16-api-dev.kubes.meetmo.io/api/v1.6/meetmo/device/stream/webhook/;
on_unpublish https://fox16-api-dev.kubes.meetmo.io/api/v1.6/meetmo/device/stream/webhook/;
on_play https://fox16-api-dev.kubes.meetmo.io/api/v1.6/meetmo/device/stream/webhook/;
on_stop https://fox16-api-dev.kubes.meetmo.io/api/v1.6/meetmo/device/stream/webhook/;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
hls {
enabled on;
hls_path ./objs/nginx/html;
hls_fragment 10;
hls_window 60;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment