mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #319, move mw_latency to play.
This commit is contained in:
parent
4eb1874955
commit
06ae74dd3f
6 changed files with 140 additions and 146 deletions
|
@ -373,118 +373,6 @@ vhost publish.srs.com {
|
|||
}
|
||||
}
|
||||
|
||||
# the MR(merged-read) setting for publisher.
|
||||
# the MW(merged-write) settings for player.
|
||||
vhost mrw.srs.com {
|
||||
# @see scope.vhost.srs.com
|
||||
min_latency off;
|
||||
|
||||
# set the MW(merged-write) latency in ms.
|
||||
# SRS always set mw on, so we just set the latency value.
|
||||
# the latency of stream >= mw_latency + mr_latency
|
||||
# the value recomment is [300, 1800]
|
||||
# default: 350
|
||||
mw_latency 350;
|
||||
|
||||
# @see publish.srs.com
|
||||
publish {
|
||||
mr on;
|
||||
mr_latenct 350;
|
||||
}
|
||||
}
|
||||
|
||||
# the vhost for min delay, donot cache any stream.
|
||||
vhost min.delay.com {
|
||||
# @see vhost mrw.srs.com for detail.
|
||||
min_latency on;
|
||||
# @see scope.vhost.srs.com
|
||||
mw_latency 100;
|
||||
# whether cache the last gop.
|
||||
# if on, cache the last gop and dispatch to client,
|
||||
# to enabled fast startup for client, client play immediately.
|
||||
# if off, send the latest media data to client,
|
||||
# client need to wait for the next Iframe to decode and show the video.
|
||||
# set to off if requires min delay;
|
||||
# set to on if requires client fast startup.
|
||||
# default: on
|
||||
gop_cache off;
|
||||
# the max live queue length in seconds.
|
||||
# if the messages in the queue exceed the max length,
|
||||
# drop the old whole gop.
|
||||
# default: 30
|
||||
queue_length 10;
|
||||
# @see scope.vhost.srs.com
|
||||
tcp_nodelay on;
|
||||
|
||||
# @see publish.srs.com
|
||||
publish {
|
||||
mr off;
|
||||
}
|
||||
}
|
||||
|
||||
# the vhost to control the stream delivery feature
|
||||
vhost stream.control.com {
|
||||
# @see vhost mrw.srs.com for detail.
|
||||
min_latency on;
|
||||
mw_latency 100;
|
||||
# @see vhost min.delay.com
|
||||
queue_length 10;
|
||||
tcp_nodelay on;
|
||||
# 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;
|
||||
# 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;
|
||||
|
||||
# @see publish.srs.com
|
||||
publish {
|
||||
mr off;
|
||||
firstpkt_timeout 20000;
|
||||
normal_timeout 7000;
|
||||
}
|
||||
}
|
||||
|
||||
# the vhost which forward publish streams.
|
||||
vhost same.vhost.forward.srs.com {
|
||||
# forward all publish stream to the specified server.
|
||||
# this used to split/forward the current stream for cluster active-standby,
|
||||
# active-active for cdn to build high available fault tolerance system.
|
||||
# format: {ip}:{port} {ip_N}:{port_N}
|
||||
forward 127.0.0.1:1936 127.0.0.1:1937;
|
||||
}
|
||||
|
||||
# the vhost for exec, fork process when publish stream.
|
||||
vhost exec.srs.com {
|
||||
# the exec used to fork process when got some event.
|
||||
exec {
|
||||
# whether enable the exec.
|
||||
# default: off.
|
||||
enabled off;
|
||||
# when publish stream, exec the process with variables:
|
||||
# [vhost] the input stream vhost.
|
||||
# [port] the intput stream port.
|
||||
# [app] the input stream app.
|
||||
# [stream] the input stream name.
|
||||
# [engine] the tanscode engine name.
|
||||
# other variables for exec only:
|
||||
# [url] the rtmp url which trigger the publish.
|
||||
# [tcUrl] the client request tcUrl.
|
||||
# [swfUrl] the client request swfUrl.
|
||||
# [pageUrl] the client request pageUrl.
|
||||
# @remark empty to ignore this exec.
|
||||
publish ./objs/ffmpeg/bin/ffmpeg -f flv -i [url] -c copy -y ./[stream].flv;
|
||||
}
|
||||
}
|
||||
|
||||
# the play specified configs
|
||||
vhost play.srs.com {
|
||||
# for play client, both RTMP and other stream clients,
|
||||
|
@ -527,6 +415,13 @@ vhost play.srs.com {
|
|||
# always ignore the onMetaData if atc_auto is off.
|
||||
# default: off
|
||||
atc_auto off;
|
||||
|
||||
# set the MW(merged-write) latency in ms.
|
||||
# SRS always set mw on, so we just set the latency value.
|
||||
# the latency of stream >= mw_latency + mr_latency
|
||||
# the value recomment is [300, 1800]
|
||||
# default: 350
|
||||
mw_latency 350;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -546,6 +441,126 @@ vhost atc.srs.com {
|
|||
atc_auto on;
|
||||
}
|
||||
|
||||
# the MR(merged-read) setting for publisher.
|
||||
# the MW(merged-write) settings for player.
|
||||
vhost mrw.srs.com {
|
||||
# @see scope.vhost.srs.com
|
||||
min_latency off;
|
||||
|
||||
# @see play.srs.com
|
||||
play {
|
||||
mw_latency 350;
|
||||
}
|
||||
|
||||
# @see publish.srs.com
|
||||
publish {
|
||||
mr on;
|
||||
mr_latenct 350;
|
||||
}
|
||||
}
|
||||
|
||||
# the vhost for min delay, donot cache any stream.
|
||||
vhost min.delay.com {
|
||||
# @see scope.vhost.srs.com
|
||||
min_latency on;
|
||||
# @see scope.vhost.srs.com
|
||||
tcp_nodelay on;
|
||||
|
||||
# whether cache the last gop.
|
||||
# if on, cache the last gop and dispatch to client,
|
||||
# to enabled fast startup for client, client play immediately.
|
||||
# if off, send the latest media data to client,
|
||||
# client need to wait for the next Iframe to decode and show the video.
|
||||
# set to off if requires min delay;
|
||||
# set to on if requires client fast startup.
|
||||
# default: on
|
||||
gop_cache off;
|
||||
# the max live queue length in seconds.
|
||||
# if the messages in the queue exceed the max length,
|
||||
# drop the old whole gop.
|
||||
# default: 30
|
||||
queue_length 10;
|
||||
|
||||
# @see play.srs.com
|
||||
play {
|
||||
mw_latency 100;
|
||||
}
|
||||
|
||||
# @see publish.srs.com
|
||||
publish {
|
||||
mr off;
|
||||
}
|
||||
}
|
||||
|
||||
# the vhost to control the stream delivery feature
|
||||
vhost stream.control.com {
|
||||
# @see scope.vhost.srs.com
|
||||
min_latency on;
|
||||
# @see scope.vhost.srs.com
|
||||
tcp_nodelay on;
|
||||
|
||||
# @see vhost min.delay.com
|
||||
queue_length 10;
|
||||
# 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;
|
||||
# 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;
|
||||
|
||||
# @see play.srs.com
|
||||
play {
|
||||
mw_latency 100;
|
||||
}
|
||||
|
||||
# @see publish.srs.com
|
||||
publish {
|
||||
mr off;
|
||||
firstpkt_timeout 20000;
|
||||
normal_timeout 7000;
|
||||
}
|
||||
}
|
||||
|
||||
# the vhost which forward publish streams.
|
||||
vhost same.vhost.forward.srs.com {
|
||||
# forward all publish stream to the specified server.
|
||||
# this used to split/forward the current stream for cluster active-standby,
|
||||
# active-active for cdn to build high available fault tolerance system.
|
||||
# format: {ip}:{port} {ip_N}:{port_N}
|
||||
forward 127.0.0.1:1936 127.0.0.1:1937;
|
||||
}
|
||||
|
||||
# the vhost for exec, fork process when publish stream.
|
||||
vhost exec.srs.com {
|
||||
# the exec used to fork process when got some event.
|
||||
exec {
|
||||
# whether enable the exec.
|
||||
# default: off.
|
||||
enabled off;
|
||||
# when publish stream, exec the process with variables:
|
||||
# [vhost] the input stream vhost.
|
||||
# [port] the intput stream port.
|
||||
# [app] the input stream app.
|
||||
# [stream] the input stream name.
|
||||
# [engine] the tanscode engine name.
|
||||
# other variables for exec only:
|
||||
# [url] the rtmp url which trigger the publish.
|
||||
# [tcUrl] the client request tcUrl.
|
||||
# [swfUrl] the client request swfUrl.
|
||||
# [pageUrl] the client request pageUrl.
|
||||
# @remark empty to ignore this exec.
|
||||
publish ./objs/ffmpeg/bin/ffmpeg -f flv -i [url] -c copy -y ./[stream].flv;
|
||||
}
|
||||
}
|
||||
|
||||
# the security to allow or deny clients.
|
||||
vhost security.srs.com {
|
||||
# security for host to allow or deny clients.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue