diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 1670ff08e..f52c27ba3 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -7,23 +7,20 @@ # 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, +# and provides the current running process id, for script, # for example, init.d script to manage the server. # default: ./objs/srs.pid pid ./objs/srs.pid; # the default chunk size is 128, max is 65536, # some client does not support chunk size change, -# however, most clients supports 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 stracoding stream will create a log file. +# if enabled ffmpeg, each transcoding 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 enalbed. + # whether heartbeat is enabled. # 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 devide. + # the id of device. 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 configured. disk sda sdb xvda xvdb; } @@ -145,15 +142,15 @@ http_api { allow_update off; } } -# embeded http server in srs. +# embedded 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 running 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 embedded 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. @@ -267,20 +264,20 @@ vhost scope.vhost.srs.com { # if off, all request access denied. # default: on enabled off; - + # whether enable min delay mode for vhost. - # for min latence mode: + # for min latency 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 # default: off min_latency off; - + # whether enable the TCP_NODELAY # if on, set the nodelay of fd by setsockopt # default: off tcp_nodelay off; - + # 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. @@ -314,7 +311,7 @@ vhost cluster.srs.com { # @remark user can specifies multiple origin for error backup, by space, # for example, 192.168.1.100:1935 192.168.1.101:1935 192.168.1.102:1935 origin 127.0.0.1:1935 localhost:1935; - + # for edge, whether open the token traverse mode, # if token traverse on, all connections of edge will forward to origin to check(auth), # it's very important for the edge to do the token auth. @@ -322,16 +319,16 @@ vhost cluster.srs.com { # but if user prefer origin check(auth), the token_traverse if better solution. # default: off token_traverse off; - + # the vhost to transform for edge, # to fetch from the specified vhost at origin, # if not specified, use the current vhost of edge in origin, the variable [vhost]. # default: [vhost] vhost same.edge.srs.com; - + # 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, + # 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/v1_CN_SrsLog # default: on @@ -397,20 +394,20 @@ vhost play.srs.com { # default: on gop_cache off; # the max live queue length in seconds. - # if the messages in the queue exceed the max length, + # if the messages in the queue exceed the max length, # drop the old whole gop. # default: 30 queue_length 10; - + # about the stream monotonically increasing: - # 1. video timestamp is 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. + # 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; @@ -427,7 +424,7 @@ vhost play.srs.com { # 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 # @@ -439,14 +436,14 @@ 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. + + # 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; - + # 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 @@ -487,33 +484,33 @@ vhost atc.srs.com { 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; + mr_latency 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; # @see scope.vhost.srs.com tcp_nodelay on; - + # @see play.srs.com play { mw_latency 100; gop_cache off; queue_length 10; } - + # @see publish.srs.com publish { mr off; @@ -534,7 +531,7 @@ vhost stream.control.com { min_latency on; # @see scope.vhost.srs.com tcp_nodelay on; - + # @see play.srs.com play { mw_latency 100; @@ -542,7 +539,7 @@ vhost stream.control.com { send_min_interval 10.0; reduce_sequence_header on; } - + # @see publish.srs.com publish { mr off; @@ -564,12 +561,12 @@ 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; - + # the 1st packet timeout in ms for encoder. # default: 20000 firstpkt_timeout 20000; @@ -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 overrided by this. + # the common refer is not overridden 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 overrided by this. + # the common refer is not overridden 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. @@ -637,7 +634,7 @@ vhost bandcheck.srs.com { # the security to allow or deny clients. vhost security.srs.com { # security for host to allow or deny clients. - # @see https://github.com/ossrs/srs/issues/211 + # @see https://github.com/ossrs/srs/issues/211 security { # whether enable the security for vhost. # default: off @@ -670,7 +667,7 @@ vhost http.static.srs.com { # whether enabled the http static service for vhost. # default: off enabled on; - # the url to mount to, + # the url to mount to, # typical mount to [vhost]/ # the variables: # [vhost] current vhost for http server. @@ -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 mount 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 enalbe. + # whether the http hooks enable. # 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(Stauts OK) and response + # if valid, the hook must return HTTP code 200(Status 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(Stauts OK) and response + # if valid, the hook must return HTTP code 200(Status 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(Stauts OK) and response + # if valid, the hook must return HTTP code 200(Status 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(Stauts OK) and response + # if valid, the hook must return HTTP code 200(Status 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(Stauts OK) and response + # if valid, the hook must return HTTP code 200(Status 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(Stauts OK) and response + # if valid, the hook must return HTTP code 200(Status 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(Stauts OK) and response + # if valid, the hook must return HTTP code 200(Status 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(Stauts OK) and response + # if valid, the hook must return HTTP code 200(Status 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 intput stream port. + # [port] the input stream port. # [app] the input stream app. # [stream] the input stream name. - # [engine] the tanscode engine name. + # [engine] the transcode 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 embedded 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 configured 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 configured 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 enahanced 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 exmaple, the prefix is: + # for example, 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 embedded 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. @@ -1003,7 +998,7 @@ vhost with-hls.srs.com { # the default audio codec of hls. # when codec changed, write the PAT/PMT table, but maybe ok util next ts. # so user can set the default codec for mp3. - # the available audio codec: + # the available audio codec: # aac, mp3, an # default: aac hls_acodec aac; @@ -1039,7 +1034,7 @@ vhost with-hls.srs.com { # for the hls http callback, @see http_hooks.on_hls of vhost hooks.callback.srs.com # @read https://github.com/ossrs/srs/wiki/v2_CN_DeliveryHLS#http-callback # @read https://github.com/ossrs/srs/wiki/v2_EN_DeliveryHLS#http-callback - + # on_hls_notify, never config in here, should config in http_hooks. # we support the variables to generate the notify url: # [app], replace with the app. @@ -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 aplly to. + # the filter for dvr to apply to. # all, dvr all streams of all apps. # /, 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 exceed, in seconds. # segment apply it. # session,append ignore. # default: 30 @@ -1149,19 +1144,19 @@ vhost dvr.srs.com { # default: on dvr_wait_keyframe on; # about the stream monotonically increasing: - # 1. video timestamp is monotonically increasing, + # 1. video timestamp is monotonically increasing, # 2. audio timestamp is monotonically increasing, # 3. video and audio timestamp is interleaved 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. + # 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 time_jitter full; - + # on_dvr, never config in here, should config in http_hooks. # for the dvr http callback, @see http_hooks.on_dvr of vhost hooks.callback.srs.com # @read https://github.com/ossrs/srs/wiki/v2_CN_DVR#http-callback @@ -1184,15 +1179,15 @@ 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; # the url of file/stream. url ./doc/source.200kbps.768x320.flv; } - # the ffmpeg + # the ffmpeg ffmpeg ./objs/ffmpeg/bin/ffmpeg; # the transcode engine, @see all.transcode.srs.com # @remark, the output is specified following. @@ -1209,7 +1204,7 @@ vhost ingest.srs.com { } } -# the vhost for intest with transcode engine. +# the vhost for ingest with transcode engine. vhost transcode.ingest.srs.com { ingest livestream { enabled on; @@ -1262,7 +1257,7 @@ vhost example.transcode.srs.com { # if off, donot transcode. # default: off. enabled on; - # the ffmpeg + # the ffmpeg ffmpeg ./objs/ffmpeg/bin/ffmpeg; # the transcode engine for matched stream. # all matched stream will transcoded to the following stream. @@ -1317,7 +1312,7 @@ vhost example.transcode.srs.com { # high,main,baseline vprofile main; # x264 preset, "ffmpeg -preset" - # @see x264 -help, can be: + # @see x264 -help, can be: # ultrafast,superfast,veryfast,faster,fast # medium,slow,slower,veryslow,placebo vpreset medium; @@ -1369,10 +1364,10 @@ vhost example.transcode.srs.com { oformat flv; # output stream, "ffmpeg -y", variables: # [vhost] the input stream vhost. - # [port] the intput stream port. + # [port] the input stream port. # [app] the input stream app. # [stream] the input stream name. - # [engine] the tanscode engine name. + # [engine] the transcode 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;