55 lines
1.3 KiB
Plaintext
55 lines
1.3 KiB
Plaintext
# main config for srs.
|
|
# @see full.conf for detail config.
|
|
|
|
listen 1935;
|
|
max_connections 100;
|
|
#srs_log_tank file;
|
|
#srs_log_file ./objs/srs.log;
|
|
#daemon off;
|
|
http_api {
|
|
enabled on;
|
|
listen 1985;
|
|
}
|
|
http_server {
|
|
enabled off;
|
|
listen 8080;
|
|
dir ./objs/nginx/html;
|
|
}
|
|
rtc_server {
|
|
enabled on;
|
|
listen 8000; # UDP port
|
|
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate
|
|
candidate $CANDIDATE;
|
|
}
|
|
vhost __defaultVhost__ {
|
|
|
|
hls {
|
|
enabled on;
|
|
hls_fragment 2;
|
|
hls_window 30;
|
|
#hls_td_ratio 1.2; # 1.5 is needed, 1.2 did not work
|
|
hls_ts_file [stream]/[seq].ts;
|
|
hls_m3u8_file [stream]/stream.m3u8;
|
|
}
|
|
http_remux {
|
|
enabled off;
|
|
mount [vhost]/[app]/[stream].flv;
|
|
}
|
|
rtc {
|
|
enabled off;
|
|
# @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 off;
|
|
}
|
|
|
|
play{
|
|
gop_cache_max_frames 2500;
|
|
}
|
|
http_hooks {
|
|
enabled on;
|
|
on_hls http://127.0.0.1:3000/api/v1/hls;
|
|
}
|
|
|
|
}
|