Skip to content

Commit

Permalink
for #319, support query the vhost info.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Aug 29, 2015
1 parent bdfd0ae commit a79e195
Show file tree
Hide file tree
Showing 3 changed files with 707 additions and 142 deletions.
183 changes: 91 additions & 92 deletions trunk/conf/full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ daemon on;
# if on, use gmtime() instead, which use UTC time.
# default: off
utc_time off;
# config for the pithy print,
# which always print constant message specified by interval,
# whatever the clients in concurrency.
# default: 10000
pithy_print_ms 10000;

#############################################################################################
# heartbeat/stats sections
Expand Down Expand Up @@ -998,6 +1003,92 @@ vhost exec.srs.com {
}
}

# vhost for bandwidth check
# generally, the bandcheck vhost must be: bandcheck.srs.com,
# or need to modify the vhost of client.
vhost bandcheck.srs.com {
enabled on;
chunk_size 65000;
# bandwidth check config.
bandcheck {
# whether support bandwidth check,
# default: off.
enabled on;
# the key for server to valid,
# if invalid key, server disconnect and abort the bandwidth check.
key "35c9b402c12a7246868752e2878f7e0e";
# the interval in seconds for bandwidth check,
# server donot allow new test request.
# default: 30
interval 30;
# the max available check bandwidth in kbps.
# to avoid attack of bandwidth check.
# default: 1000
limit_kbps 4000;
}
}

# set the chunk size of vhost.
vhost chunksize.srs.com {
# the default chunk size is 128, max is 65536,
# some client does not support chunk size change,
# vhost chunk size will override the global value.
# default: global chunk size.
chunk_size 128;
}

# vhost for time jitter
vhost jitter.srs.com {
# about the stream monotonically increasing:
# 1. video timestamp is monotonically increasing,
# 2. audio timestamp is monotonically increasing,
# 3. video and audio timestamp is interleaved/mixed monotonically increasing.
# it's specified by RTMP specification, @see 3. Byte Order, Alignment, and Time Format
# however, some encoder cannot provides this feature, please set this to off to ignore time jitter.
# the time jitter algorithm:
# 1. full, to ensure stream start at zero, and ensure stream monotonically increasing.
# 2. zero, only ensure sttream start at zero, ignore timestamp jitter.
# 3. off, disable the time jitter algorithm, like atc.
# default: full
time_jitter full;
# whether use the interleaved/mixed algorithm to correct the timestamp.
# if on, always ensure the timestamp of audio+video is interleaved/mixed monotonically increase.
# if off, use time_jitter to correct the timestamp if required.
# default: off
mix_correct off;
}

# vhost for atc.
vhost atc.srs.com {
# vhost for atc for hls/hds/rtmp backup.
# generally, atc default to off, server delivery rtmp stream to client(flash) timestamp from 0.
# when atc is on, server delivery rtmp stream by absolute time.
# atc is used, for instance, encoder will copy stream to master and slave server,
# server use atc to delivery stream to edge/client, where stream time from master/slave server
# is always the same, client/tools can slice RTMP stream to HLS according to the same time,
# if the time not the same, the HLS stream cannot slice to support system backup.
#
# @see http://www.adobe.com/cn/devnet/adobe-media-server/articles/varnish-sample-for-failover.html
# @see http://www.baidu.com/#wd=hds%20hls%20atc
#
# default: off
atc on;
# 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: on
atc_auto on;
}

# the vhost disabled.
vhost removed.srs.com {
# whether the vhost is enabled.
# if off, all request access denied.
# default: on
enabled off;
}

# the main comments for transcode
vhost example.transcode.srs.com {
# the streaming transcode configs.
Expand Down Expand Up @@ -1441,95 +1532,3 @@ vhost stream.transcode.srs.com {
}
}
}

# vhost for bandwidth check
# generally, the bandcheck vhost must be: bandcheck.srs.com,
# or need to modify the vhost of client.
vhost bandcheck.srs.com {
enabled on;
chunk_size 65000;
# bandwidth check config.
bandcheck {
# whether support bandwidth check,
# default: off.
enabled on;
# the key for server to valid,
# if invalid key, server disconnect and abort the bandwidth check.
key "35c9b402c12a7246868752e2878f7e0e";
# the interval in seconds for bandwidth check,
# server donot allow new test request.
# default: 30
interval 30;
# the max available check bandwidth in kbps.
# to avoid attack of bandwidth check.
# default: 1000
limit_kbps 4000;
}
}

# set the chunk size of vhost.
vhost chunksize.srs.com {
# the default chunk size is 128, max is 65536,
# some client does not support chunk size change,
# vhost chunk size will override the global value.
# default: global chunk size.
chunk_size 128;
}

# vhost for time jitter
vhost jitter.srs.com {
# about the stream monotonically increasing:
# 1. video timestamp is monotonically increasing,
# 2. audio timestamp is monotonically increasing,
# 3. video and audio timestamp is interleaved/mixed monotonically increasing.
# it's specified by RTMP specification, @see 3. Byte Order, Alignment, and Time Format
# however, some encoder cannot provides this feature, please set this to off to ignore time jitter.
# the time jitter algorithm:
# 1. full, to ensure stream start at zero, and ensure stream monotonically increasing.
# 2. zero, only ensure sttream start at zero, ignore timestamp jitter.
# 3. off, disable the time jitter algorithm, like atc.
# default: full
time_jitter full;
# whether use the interleaved/mixed algorithm to correct the timestamp.
# if on, always ensure the timestamp of audio+video is interleaved/mixed monotonically increase.
# if off, use time_jitter to correct the timestamp if required.
# default: off
mix_correct off;
}

# vhost for atc.
vhost atc.srs.com {
# vhost for atc for hls/hds/rtmp backup.
# generally, atc default to off, server delivery rtmp stream to client(flash) timestamp from 0.
# when atc is on, server delivery rtmp stream by absolute time.
# atc is used, for instance, encoder will copy stream to master and slave server,
# server use atc to delivery stream to edge/client, where stream time from master/slave server
# is always the same, client/tools can slice RTMP stream to HLS according to the same time,
# if the time not the same, the HLS stream cannot slice to support system backup.
#
# @see http://www.adobe.com/cn/devnet/adobe-media-server/articles/varnish-sample-for-failover.html
# @see http://www.baidu.com/#wd=hds%20hls%20atc
#
# default: off
atc on;
# 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: on
atc_auto on;
}

# the vhost disabled.
vhost removed.srs.com {
# whether the vhost is enabled.
# if off, all request access denied.
# default: on
enabled off;
}

# config for the pithy print,
# which always print constant message specified by interval,
# whatever the clients in concurrency.
# default: 10000
pithy_print_ms 10000;
Loading

0 comments on commit a79e195

Please sign in to comment.