This commit is contained in:
parent
3241009bab
commit
95b83c28b2
|
|
@ -76,7 +76,7 @@ docker run -d \
|
||||||
--network $NETWORK \
|
--network $NETWORK \
|
||||||
--memory $SRS_MEMORY \
|
--memory $SRS_MEMORY \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
--env CANDIDATE=$CANDIDATE \
|
--env CANDIDATE=139.224.117.253 \
|
||||||
-p ${SRS_RTMP_PORT}:1935 \
|
-p ${SRS_RTMP_PORT}:1935 \
|
||||||
-p ${SRS_RTC_PORT}:8000/udp \
|
-p ${SRS_RTC_PORT}:8000/udp \
|
||||||
-p 1985:1985 \
|
-p 1985:1985 \
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
listen 1935;
|
listen 1935;
|
||||||
max_connections 1000;
|
max_connections 1000;
|
||||||
srs_log_tank console;
|
|
||||||
daemon off;
|
daemon off;
|
||||||
|
srs_log_tank console;
|
||||||
|
|
||||||
|
http_api {
|
||||||
|
enabled on;
|
||||||
|
listen 1985;
|
||||||
|
}
|
||||||
|
|
||||||
http_server {
|
http_server {
|
||||||
enabled on;
|
enabled on;
|
||||||
|
|
@ -9,49 +14,41 @@ http_server {
|
||||||
dir ./objs/nginx/html;
|
dir ./objs/nginx/html;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_server {
|
srt_server {
|
||||||
enabled on;
|
enabled on;
|
||||||
listen 8000;
|
listen 10080;
|
||||||
|
maxbw 1000000000;
|
||||||
|
connect_timeout 4000;
|
||||||
|
peerlatency 0;
|
||||||
|
recvlatency 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rtc_server {
|
||||||
|
enabled on;
|
||||||
|
# Listen at udp://8000
|
||||||
|
listen 8000;
|
||||||
|
#
|
||||||
|
# The $CANDIDATE means fetch from env, if not configed, use * as default.
|
||||||
|
#
|
||||||
|
# The * means retrieving server IP automatically, from all network interfaces,
|
||||||
|
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate
|
||||||
|
candidate $CANDIDATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
# @doc https://github.com/ossrs/srs/issues/1147#issuecomment-577607026
|
||||||
vhost __defaultVhost__ {
|
vhost __defaultVhost__ {
|
||||||
|
srt {
|
||||||
dvr {
|
enabled on;
|
||||||
enabled on;
|
|
||||||
#all表示录制所有视频流,也可以按频道录制
|
|
||||||
#规则为<app>/<stream>,例:live/stream1 live/stream2
|
|
||||||
#规则为<app>/<stream>,例:live/stream1 live/stream2
|
|
||||||
dvr_apply all;
|
|
||||||
#dvr计划
|
|
||||||
dvr_plan segment;
|
|
||||||
#录制的路径,详细配置规则见附录三
|
|
||||||
dvr_path ./objs/nginx/html/record/[2006][01][02]/[app][stream]/[timestamp].flv;
|
|
||||||
#segment方式录制时间设置,单位: s
|
|
||||||
dvr_duration 900;
|
|
||||||
#开启按关键帧且flv
|
|
||||||
dvr_wait_keyframe on;
|
|
||||||
#时间戳抖动算法。full使用完全的时间戳矫正;
|
|
||||||
#zero只是保证从0开始;off不矫正时间戳。
|
|
||||||
time_jitter full;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rtc {
|
rtc {
|
||||||
enabled on;
|
enabled on;
|
||||||
# 开启rtc录制
|
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc
|
||||||
rtmp_to_rtc on;
|
rtmp_to_rtc on;
|
||||||
|
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp
|
||||||
rtc_to_rtmp on;
|
rtc_to_rtmp on;
|
||||||
}
|
}
|
||||||
|
|
||||||
http_remux {
|
http_remux {
|
||||||
enabled on;
|
enabled on;
|
||||||
mount [vhost]/[app]/[stream].flv;
|
mount [vhost]/[app]/[stream].flv;
|
||||||
}
|
}
|
||||||
|
|
||||||
hls {
|
|
||||||
enabled on;
|
|
||||||
hls_path ./objs/nginx/html;
|
|
||||||
hls_fragment 10;
|
|
||||||
hls_window 60;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue