-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
v4_CN_SpecialControl
winlin edited this page Sep 23, 2021
·
8 revisions
HOME > CN > Special Control
Note: 如果觉得Github的Wiki访问太慢,可以访问 Gitee 镜像。
SRS提供了一些特殊的配置,主要用来和各种系统对接的设置。
vhost __defaultVhost__ {
# for play client, both RTMP and other stream clients,
# for instance, the HTTP FLV stream clients.
play {
# the minimal packets send interval in ms,
# used to control the ndiff of stream by srs_rtmp_dump,
# for example, some device can only accept some stream which
# delivery packets in constant interval(not cbr).
# @remark 0 to disable the minimal interval.
# @remark >0 to make the srs to send message one by one.
# @remark user can get the right packets interval in ms by srs_rtmp_dump.
# default: 0
send_min_interval 10.0;
}
}
vhost __defaultVhost__ {
# for play client, both RTMP and other stream clients,
# for instance, the HTTP FLV stream clients.
play {
# whether reduce the sequence header,
# for some client which cannot got duplicated sequence header,
# while the sequence header is not changed yet.
# default: off
reduce_sequence_header on;
}
}
vhost __defaultVhost__ {
# the config for FMLE/Flash publisher, which push RTMP to SRS.
publish {
# the 1st packet timeout in ms for encoder.
# default: 20000
firstpkt_timeout 20000;
}
}
vhost __defaultVhost__ {
# the config for FMLE/Flash publisher, which push RTMP to SRS.
publish {
# the normal packet timeout in ms for encoder.
# default: 5000
normal_timeout 7000;
}
}
vhost __defaultVhost__ {
# when upnode(forward to, edge push to, edge pull from) is srs,
# it's strongly recommend to open the debug_srs_upnode,
# when connect to upnode, it will take the debug info,
# for example, the id, source id, pid.
# please see: https://github.com/ossrs/srs/wiki/v4_CN_SrsLog
# default: on
debug_srs_upnode on;
}
# whether use utc_time to generate the time struct,
# if off, use localtime() to generate it,
# if on, use gmtime() instead, which use UTC time.
# default: off
utc_time off;
vhost __defaultVhost__ {
hls {
# whether use floor for the hls_ts_file path generation.
# if on, use floor(timestamp/hls_fragment) as the variable [timestamp],
# and use enahanced algorithm to calc deviation for segment.
# @remark when floor on, recommend the hls_segment>=2*gop.
# default: off
hls_ts_floor off;
}
}
vhost __defaultVhost__ {
hls {
# whether wait keyframe to reap segment,
# if off, reap segment when duration exceed the fragment,
# if on, reap segment when duration exceed and got keyframe.
# default: on
hls_wait_keyframe on;
}
}
vhost __defaultVhost__ {
http_hooks {
# when srs reap a ts file of hls, call this hook,
# used to push file to cdn network, by get the ts file from cdn network.
# so we use HTTP GET and use the variable following:
# [app], replace with the app.
# [stream], replace with the stream.
# [ts_url], replace with the ts url.
# ignore any return data of server.
# @remark random select a url to report, not report all.
on_hls_notify http://127.0.0.1:8085/api/v1/hls/[app]/[stream][ts_url];
}
}
vhost __defaultVhost__ {
# whether enable the TCP_NODELAY
# if on, set the nodelay of fd by setsockopt
# default: off
tcp_nodelay on;
}
vhost __defaultVhost__ {
# for play client, both RTMP and other stream clients,
# for instance, the HTTP FLV stream clients.
play {
# whether enable the auto atc,
# if enabled, detect the bravo_atc="true" in onMetaData packet,
# set atc to on if matched.
# always ignore the onMetaData if atc_auto is off.
# default: off
atc_auto off;
}
}
Winlin 2015.8
Welcome to SRS wiki!
Please select your language:
Please select your language:
Please select your language:
Please select your language:
Please select your language: