srs-s3-upload/conf/mysrs.conf
2023-07-13 12:20:17 +02:00

57 lines
1.5 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_path ./hls;
hls_fragment 2;
hls_window 30;
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;
}
dvr {
# DVR currently saves multiple times, we need to figure out how to save only once
# or sync the file with S3 more efficiently
enabled on;
dvr_path ./archive/[stream]_[2006]-[01]-[02]T[15][04][05].mp4;
dvr_wait_keyframe on;
}
http_hooks {
enabled on;
on_hls http://127.0.0.1:3000/api/v1/hls;
on_dvr http://127.0.0.1:3000/api/v1/dvrs;
}
}