Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2016-04-22 10:18:13 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
892591f9a6200f7de5e0a67235cb774c18246f79
892591f9
1 parent
2e75c9f4
merge from @mbeacom
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
59 行增加
和
64 行删除
trunk/conf/full.conf
trunk/conf/full.conf
查看文件 @
892591f
...
...
@@ -7,9 +7,6 @@
# for example, 192.168.1.100:1935 10.10.10.100:1935
# where the ip is optional, default to 0.0.0.0, that is 1935 equals to 0.0.0.0:1935
listen
1935
;
# change to this dir as the cwd.
# ignore if empty or not configed.
work_dir
/
usr
/
local
/
srs
;
# the pid file
# to ensure only one process can use a pid file
# and provides the current running process id, for script,
...
...
@@ -18,12 +15,12 @@ work_dir /usr/local/srs;
pid
./
objs
/
srs
.
pid
;
# the default chunk size is 128, max is 65536,
# some client does not support chunk size change,
# however, most clients support
s it and it can improve
# however, most clients support
it and it can improve
# performance about 10%.
# default: 60000
chunk_size
60000
;
# the logs dir.
# if enabled ffmpeg, each
stra
coding stream will create a log file.
# if enabled ffmpeg, each
trans
coding stream will create a log file.
# /dev/null to disable the log.
# default: ./objs
ff_log_dir
./
objs
;
...
...
@@ -43,8 +40,8 @@ srs_log_file ./objs/srs.log;
# if exceed the max connections, server will drop the new connection.
# default: 1000
max_connections
1000
;
# whether start as deamon
# @remark: donot support reload.
# whether start as daemon
# @remark: do not support reload.
# default: on
daemon
on
;
# whether use utc_time to generate the time struct,
...
...
@@ -65,7 +62,7 @@ pithy_print_ms 10000;
# @remark, the ip report to server, is retrieve from system stat,
# which need the config item stats.network.
heartbeat
{
# whether heartbeat is ena
lb
ed.
# whether heartbeat is ena
bl
ed.
# default: off
enabled
off
;
# the interval seconds for heartbeat,
...
...
@@ -80,7 +77,7 @@ heartbeat {
# }
# default: http://127.0.0.1:8085/api/v1/servers
url
http
://
127
.
0
.
0
.
1
:
8085
/
api
/
v1
/
servers
;
# the id of devi
d
e.
# the id of devi
c
e.
device_id
"my-srs-device"
;
# whether report with summaries
# if on, put /api/v1/summaries to the request data:
...
...
@@ -104,7 +101,7 @@ stats {
# default: 0
network
0
;
# the device name to stat the disk iops.
# ignore the device of /proc/diskstats if not configed.
# ignore the device of /proc/diskstats if not config
ur
ed.
disk
sda
sdb
xvda
xvdb
;
}
...
...
@@ -145,15 +142,15 @@ http_api {
allow_update
off
;
}
}
# embeded http server in srs.
# embed
d
ed http server in srs.
# the http streaming config, for HLS/HDS/DASH/HTTPProgressive
# global config for http streaming, user must config the http section for each vhost.
# the embed http server used to substitute nginx in ./objs/nginx,
# for example, srs runing in arm, can provides RTMP and HTTP service, only with srs installed.
# for example, srs run
n
ing in arm, can provides RTMP and HTTP service, only with srs installed.
# user can access the http server pages, generally:
# curl http://192.168.1.170:80/srs.html
# which will show srs version and welcome to srs.
# @remark, the http embeded stream need to config the vhost, for instance, the __defaultVhost__
# @remark, the http embed
d
ed stream need to config the vhost, for instance, the __defaultVhost__
# need to open the feature http of vhost.
http_server
{
# whether http streaming service is enabled.
...
...
@@ -269,7 +266,7 @@ vhost scope.vhost.srs.com {
enabled
off
;
# whether enable min delay mode for vhost.
# for min latenc
e
mode:
# for min latenc
y
mode:
# 1. disable the publish.mr for vhost.
# 2. use timeout for cond wait for consumer queue.
# @see https://github.com/ossrs/srs/issues/257
...
...
@@ -410,7 +407,7 @@ vhost play.srs.com {
# 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 st
t
ream start at zero, ignore timestamp jitter.
# 2. zero, only ensure stream start at zero, ignore timestamp jitter.
# 3. off, disable the time jitter algorithm, like atc.
# default: full
time_jitter
full
;
...
...
@@ -496,11 +493,11 @@ vhost mrw.srs.com {
# @see publish.srs.com
publish
{
mr
on
;
mr_latenc
t
350
;
mr_latenc
y
350
;
}
}
# the vhost for min delay, donot cache any stream.
# the vhost for min delay, do
not cache any stream.
vhost
min
.
delay
.
com
{
# @see scope.vhost.srs.com
min_latency
on
;
...
...
@@ -564,9 +561,9 @@ vhost publish.srs.com {
# memory(buffer) = latency * kbps / 8
# for example, latency=500ms, kbps=3000kbps, each publish connection will consume
# memory = 500 * 3000 / 8 = 187500B = 183KB
# when there are 2500 publisher, the total memory of SRS atleast:
# when there are 2500 publisher, the total memory of SRS at
least:
# 183KB * 2500 = 446MB
# the
value recomment
is [300, 2000]
# the
recommended value
is [300, 2000]
# default: 350
mr_latency
350
;
...
...
@@ -584,7 +581,7 @@ vhost publish.srs.com {
}
}
# the vhost for antisuck.
# the vhost for anti
-
suck.
vhost
refer
.
anti_suck
.
com
{
# refer hotlink-denial.
refer
{
...
...
@@ -597,12 +594,12 @@ vhost refer.anti_suck.com {
# default: not specified.
all
github
.
com
github
.
io
;
# refer for publish clients specified.
# the common refer is not overrid
ed
by this.
# the common refer is not overrid
den
by this.
# if not specified this field, allow all.
# default: not specified.
publish
github
.
com
github
.
io
;
# refer for play clients specified.
# the common refer is not overrid
ed
by this.
# the common refer is not overrid
den
by this.
# if not specified this field, allow all.
# default: not specified.
play
github
.
com
github
.
io
;
...
...
@@ -624,7 +621,7 @@ vhost bandcheck.srs.com {
# 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.
# server do
not allow new test request.
# default: 30
interval
30
;
# the max available check bandwidth in kbps.
...
...
@@ -710,7 +707,7 @@ vhost http.remux.srs.com {
# @remark 0 to disable fast cache for http audio stream.
# default: 0
fast_cache
30
;
# the stream mout for rtmp to remux to live streaming.
# the stream mou
n
t for rtmp to remux to live streaming.
# typical mount to [vhost]/[app]/[stream].flv
# the variables:
# [vhost] current vhost for http live stream.
...
...
@@ -748,7 +745,7 @@ vhost http.remux.srs.com {
# the http hook callback vhost, srs will invoke the hooks for specified events.
vhost
hooks
.
callback
.
srs
.
com
{
http_hooks
{
# whether the http hooks ena
lb
e.
# whether the http hooks ena
bl
e.
# default off.
enabled
on
;
# when client connect to vhost/app, call the hook,
...
...
@@ -760,7 +757,7 @@ vhost hooks.callback.srs.com {
# "tcUrl": "rtmp://video.test.com/live?key=d2fa801d08e3f90ed1e1670e6e52651a",
# "pageUrl": "http://www.test.com/live.html"
# }
# if valid, the hook must return HTTP code 200(Sta
ut
s OK) and response
# if valid, the hook must return HTTP code 200(Sta
tu
s OK) and response
# an int value specifies the error code(0 corresponding to success):
# 0
# support multiple api hooks, format:
...
...
@@ -774,7 +771,7 @@ vhost hooks.callback.srs.com {
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
# "send_bytes": 10240, "recv_bytes": 10240
# }
# if valid, the hook must return HTTP code 200(Sta
ut
s OK) and response
# if valid, the hook must return HTTP code 200(Sta
tu
s OK) and response
# an int value specifies the error code(0 corresponding to success):
# 0
# support multiple api hooks, format:
...
...
@@ -788,7 +785,7 @@ vhost hooks.callback.srs.com {
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
# "stream": "livestream"
# }
# if valid, the hook must return HTTP code 200(Sta
ut
s OK) and response
# if valid, the hook must return HTTP code 200(Sta
tu
s OK) and response
# an int value specifies the error code(0 corresponding to success):
# 0
# support multiple api hooks, format:
...
...
@@ -802,7 +799,7 @@ vhost hooks.callback.srs.com {
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
# "stream": "livestream"
# }
# if valid, the hook must return HTTP code 200(Sta
ut
s OK) and response
# if valid, the hook must return HTTP code 200(Sta
tu
s OK) and response
# an int value specifies the error code(0 corresponding to success):
# 0
# support multiple api hooks, format:
...
...
@@ -817,7 +814,7 @@ vhost hooks.callback.srs.com {
# "stream": "livestream",
# "pageUrl": "http://www.test.com/live.html"
# }
# if valid, the hook must return HTTP code 200(Sta
ut
s OK) and response
# if valid, the hook must return HTTP code 200(Sta
tu
s OK) and response
# an int value specifies the error code(0 corresponding to success):
# 0
# support multiple api hooks, format:
...
...
@@ -831,7 +828,7 @@ vhost hooks.callback.srs.com {
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
# "stream": "livestream"
# }
# if valid, the hook must return HTTP code 200(Sta
ut
s OK) and response
# if valid, the hook must return HTTP code 200(Sta
tu
s OK) and response
# an int value specifies the error code(0 corresponding to success):
# 0
# support multiple api hooks, format:
...
...
@@ -847,7 +844,7 @@ vhost hooks.callback.srs.com {
# "cwd": "/usr/local/srs",
# "file": "./objs/nginx/html/live/livestream.1420254068776.flv"
# }
# if valid, the hook must return HTTP code 200(Sta
ut
s OK) and response
# if valid, the hook must return HTTP code 200(Sta
tu
s OK) and response
# an int value specifies the error code(0 corresponding to success):
# 0
on_dvr
http
://
127
.
0
.
0
.
1
:
8085
/
api
/
v1
/
dvrs
http
://
localhost
:
8085
/
api
/
v1
/
dvrs
;
...
...
@@ -866,7 +863,7 @@ vhost hooks.callback.srs.com {
# "m3u8_url": "live/livestream/live.m3u8",
# "seq_no": 100
# }
# if valid, the hook must return HTTP code 200(Sta
ut
s OK) and response
# if valid, the hook must return HTTP code 200(Sta
tu
s OK) and response
# an int value specifies the error code(0 corresponding to success):
# 0
on_hls
http
://
127
.
0
.
0
.
1
:
8085
/
api
/
v1
/
hls
http
://
localhost
:
8085
/
api
/
v1
/
hls
;
...
...
@@ -891,10 +888,10 @@ vhost exec.srs.com {
enabled
off
;
# when publish stream, exec the process with variables:
# [vhost] the input stream vhost.
# [port] the in
t
put stream port.
# [port] the input stream port.
# [app] the input stream app.
# [stream] the input stream name.
# [engine] the tanscode engine name.
# [engine] the t
r
anscode engine name.
# other variables for exec only:
# [url] the rtmp url which trigger the publish.
# [tcUrl] the client request tcUrl.
...
...
@@ -909,7 +906,7 @@ vhost exec.srs.com {
vhost
with
-
hls
.
srs
.
com
{
hls
{
# whether the hls is enabled.
# if off, donot write hls(ts and m3u8) when publish.
# if off, do
not write hls(ts and m3u8) when publish.
# default: off
enabled
on
;
# the hls fragment in seconds, the duration of a piece of ts.
...
...
@@ -923,14 +920,14 @@ vhost with-hls.srs.com {
hls_td_ratio
1
.
5
;
# the audio overflow ratio.
# for pure audio, the duration to reap the segment.
# for example, the hls_fragment is 10s, hsl_aof_ratio is 2.0,
# the segemnt will reap to 20s for pure audio.
# for example, the hls_fragment is 10s, hls_aof_ratio is 2.0,
# the segment will reap to 20s for pure audio.
# default: 2.0
hls_aof_ratio
2
.
0
;
# the hls window in seconds, the number of ts in m3u8.
# default: 60
hls_window
60
;
# the error strategy. canbe:
# the error strategy. can
be:
# ignore, disable the hls.
# disconnect, require encoder republish.
# continue, ignore failed try to continue output hls.
...
...
@@ -939,14 +936,14 @@ vhost with-hls.srs.com {
hls_on_error
continue
;
# the hls storage: disk, ram or both.
# disk, to write hls m3u8/ts to disk.
# ram, serve m3u8/ts in memory, which use embeded http server to delivery.
# ram, serve m3u8/ts in memory, which use embed
d
ed http server to delivery.
# both, disk and ram.
# default: disk
hls_storage
disk
;
# the hls output path.
# the m3u8 file is configed by hls_path/hls_m3u8_file, the default is:
# the m3u8 file is config
ur
ed by hls_path/hls_m3u8_file, the default is:
# ./objs/nginx/html/[app]/[stream].m3u8
# the ts file is configed by hls_path/hls_ts_file, the default is:
# the ts file is config
ur
ed by hls_path/hls_ts_file, the default is:
# ./objs/nginx/html/[app]/[stream]-[seq].ts
# @remark the hls_path is compatible with srs v1 config.
# default: ./objs/nginx/html
...
...
@@ -956,7 +953,6 @@ vhost with-hls.srs.com {
# [vhost], the vhost of stream.
# [app], the app of stream.
# [stream], the stream name of stream.
# recommend: [vhost]/[app]/[stream].m3u8
# default: [app]/[stream].m3u8
hls_m3u8_file
[
app
]/[
stream
].
m3u8
;
# the hls ts file name.
...
...
@@ -968,24 +964,23 @@ vhost with-hls.srs.com {
# [01], replace this const to current month.
# [02], replace this const to current date.
# [15], replace this const to current hour.
# [04], repleace this const to current minute.
# [05], repleace this const to current second.
# [999], repleace this const to current millisecond.
# [04], replace this const to current minute.
# [05], replace this const to current second.
# [999], replace this const to current millisecond.
# [timestamp],replace this const to current UNIX timestamp in ms.
# [seq], the sequence number of ts.
# @see https://github.com/ossrs/srs/wiki/v2_CN_DVR#custom-path
# @see https://github.com/ossrs/srs/wiki/v2_CN_DeliveryHLS#hls-config
# recommend: [vhost]/[app]/[stream]-[seq].ts
# default: [app]/[stream]-[seq].ts
hls_ts_file
[
app
]/[
stream
]-[
seq
].
ts
;
# whether use floor for the hls_ts_file path generation.
# if on, use floor(timestamp/hls_fragment) as the variable [timestamp],
# and use en
a
hanced algorithm to calc deviation for segment.
# and use enhanced algorithm to calc deviation for segment.
# @remark when floor on, recommend the hls_segment>=2*gop.
# default: off
hls_ts_floor
off
;
# the hls entry prefix, which is base url of ts url.
# for ex
ma
ple, the prefix is:
# for ex
am
ple, the prefix is:
# http://your-server/
# then, the ts path in m3u8 will be like:
# http://your-server/live/livestream-0.ts
...
...
@@ -994,7 +989,7 @@ vhost with-hls.srs.com {
# optional, default to empty string.
hls_entry_prefix
http
://
your
-
server
;
# the hls mount for hls_storage ram,
# which use srs embeded http server to delivery HLS,
# which use srs embed
d
ed http server to delivery HLS,
# where the mount specifies the HTTP url to mount.
# @see the mount of http_remux.
# @remark the hls_mount must endswith .m3u8.
...
...
@@ -1054,7 +1049,7 @@ vhost with-hls.srs.com {
vhost
no
-
hls
.
srs
.
com
{
hls
{
# whether the hls is enabled.
# if off, donot write hls(ts and m3u8) when publish.
# if off, do
not write hls(ts and m3u8) when publish.
# default: off
enabled
off
;
}
...
...
@@ -1087,7 +1082,7 @@ vhost dvr.srs.com {
# whether enabled dvr features
# default: off
enabled
on
;
# the filter for dvr to ap
l
ly to.
# the filter for dvr to ap
p
ly to.
# all, dvr all streams of all apps.
# <app>/<stream>, apply to specified stream of app.
# for example, to dvr the following two streams:
...
...
@@ -1109,9 +1104,9 @@ vhost dvr.srs.com {
# [01], replace this const to current month.
# [02], replace this const to current date.
# [15], replace this const to current hour.
# [04], repleace this const to current minute.
# [05], repleace this const to current second.
# [999], repleace this const to current millisecond.
# [04], replace this const to current minute.
# [05], replace this const to current second.
# [999], replace this const to current millisecond.
# [timestamp],replace this const to current UNIX timestamp in ms.
# @remark we use golang time format "2006-01-02 15:04:05.999" as "[2006]-[01]-[02]_[15].[04].[05]_[999]"
# for example, for url rtmp://ossrs.net/live/livestream and time 2015-01-03 10:57:30.776
...
...
@@ -1136,7 +1131,7 @@ vhost dvr.srs.com {
# segment,session apply it.
# default: ./objs/nginx/html/[app]/[stream].[timestamp].flv
dvr_path
./
objs
/
nginx
/
html
/[
app
]/[
stream
].[
timestamp
].
flv
;
# the duration for dvr file, reap if exeed, in seconds.
# the duration for dvr file, reap if ex
c
eed, in seconds.
# segment apply it.
# session,append ignore.
# default: 30
...
...
@@ -1156,7 +1151,7 @@ vhost dvr.srs.com {
# 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 st
t
ream start at zero, ignore timestamp jitter.
# 2. zero, only ensure stream start at zero, ignore timestamp jitter.
# 3. off, disable the time jitter algorithm, like atc.
# apply for all dvr plan.
# default: full
...
...
@@ -1184,8 +1179,8 @@ vhost ingest.srs.com {
input
{
# the type of input.
# can be file/stream/device, that is,
# file: ingest file specifies by url.
# stream: ingest stream specifeis by url.
# file: ingest file specified by url.
# stream: ingest stream specified by url.
# device: not support yet.
# default: file
type
file
;
...
...
@@ -1209,7 +1204,7 @@ vhost ingest.srs.com {
}
}
# the vhost for in
t
est with transcode engine.
# the vhost for in
g
est with transcode engine.
vhost
transcode
.
ingest
.
srs
.
com
{
ingest
livestream
{
enabled
on
;
...
...
@@ -1369,10 +1364,10 @@ vhost example.transcode.srs.com {
oformat
flv
;
# output stream, "ffmpeg -y", variables:
# [vhost] the input stream vhost.
# [port] the in
t
put stream port.
# [port] the input stream port.
# [app] the input stream app.
# [stream] the input stream name.
# [engine] the tanscode engine name.
# [engine] the t
r
anscode engine name.
output
rtmp
://
127
.
0
.
0
.
1
:[
port
]/[
app
]?
vhost
=[
vhost
]/[
stream
]
_
[
engine
];
}
}
...
...
@@ -1472,7 +1467,7 @@ vhost logo.transcode.srs.com {
}
}
# audio transcode only.
# for example, FMLE publish audio codec in mp3, and donot support HLS output,
# for example, FMLE publish audio codec in mp3, and do
not support HLS output,
# we can transcode the audio to aac and copy video to the new stream with HLS.
vhost
audio
.
transcode
.
srs
.
com
{
transcode
{
...
...
@@ -1656,7 +1651,7 @@ vhost all.transcode.srs.com {
}
}
}
# transcode all stream using the empty ffmpeg demo, donothing.
# transcode all stream using the empty ffmpeg demo, do
nothing.
vhost
ffempty
.
transcode
.
srs
.
com
{
transcode
{
enabled
on
;
...
...
请
注册
或
登录
后发表评论