Key Value Description
vhost.id {{vhost.id}} Vhost statistic.
vhost.id {{vhost.id}} No clients.
vhost.enabled {{vhost.enabled| sc_filter_enabled}} Whether vhost is enabled. Default is {{true| sc_filter_enabled}}
vhost.name {{vhost.name}} The name of vhost.
vhost.chunk_size {{vhost.chunk_size}} The size of RTMP chunk. Default to global chunk size.
vhost.min_latency {{vhost.min_latency| sc_filter_enabled}} Whether low latency enabled. Default is {{false| sc_filter_enabled}}
vhost.tcp_nodelay {{vhost.tcp_nodelay| sc_filter_enabled}} Whether enable TCP_NODELAY. Default is {{false| sc_filter_enabled}}
Key Value Description
vhost.cluster.mode {{vhost.cluster.mode}} The type of cluster, local is origin server, remote is edge. Default is local
vhost.cluster.origin {{vhost.cluster.origin}} For edge, the upstream server address.
vhost.cluster.token_traverse {{vhost.cluster.token_traverse| sc_filter_enabled}} For RTMP edge, traverse token to upstream to verify. Default is {{false| sc_filter_enabled}}
vhost.cluster.vhost {{vhost.cluster.vhost}} For edge, the transform vhost to connect to upstream.
vhost.cluster.debug_srs_upnode {{vhost.cluster.debug_srs_upnode| sc_filter_enabled}} For edge, local information to connect to upstream. Default is {{true| sc_filter_enabled}}
Key Value Description
vhost.forward.enabled {{vhost.forward.enabled| sc_filter_enabled}} Whether enable forward. Default is {{false| sc_filter_enabled}}
vhost.forward.destination {{vhost.forward.destination}} The server list to forward to.
Key Value Description
vhost.play.gop_cache {{vhost.play.gop_cache| sc_filter_enabled}} Whether gop cache is enabled. Default is {{true| sc_filter_enabled}}
vhost.play.queue_length {{vhost.play.queue_length}} The max queue length in seconds. Default is 30
vhost.play.time_jitter {{vhost.play.time_jitter}} The time jitter algorithm, can be full, zero or off. Default is full
vhost.play.mix_correct {{vhost.play.mix_correct| sc_filter_enabled}} Whether mix correct is enabled. Default is {{false| sc_filter_enabled}}
vhost.play.atc {{vhost.play.atc| sc_filter_enabled}} Whether atc is enabled. Default is {{false| sc_filter_enabled}}
vhost.play.atc_auto {{vhost.play.atc_auto| sc_filter_enabled}} Whether auto enable atc by metadata. Default is {{false| sc_filter_enabled}}
vhost.play.mw_latency {{vhost.play.mw_latency}} Merge latency in ms. Default is 350
vhost.play.send_min_interval {{vhost.play.send_min_interval}} Send interval in ms for each packet, 0 to disable it. Default is 0
vhost.play.reduce_sequence_header {{vhost.play.reduce_sequence_header| sc_filter_enabled}} Whether reduce the sequence header. Default is {{false| sc_filter_enabled}}
Key Value Description
vhost.publish.mr {{vhost.publish.mr| sc_filter_enabled}} Whether merged read is enabled. Default is {{false| sc_filter_enabled}}
vhost.publish.mr_latency {{vhost.publish.mr_latency}} Merged read latency in ms. Default is 350
vhost.publish.firstpkt_timeout {{vhost.publish.firstpkt_timeout}} The first packet timeout in ms for publisher. Default is 20000
vhost.publish.normal_timeout {{vhost.publish.normal_timeout}} The read timeout in ms for publisher. Default is 5000
Key Value Description
vhost.refer.enabled {{vhost.refer.enabled| sc_filter_enabled}} Whether referer DRM is enabled. Default is {{false| sc_filter_enabled}}
vhost.refer.all {{vhost.refer.all}} The referer for both publisher player.
vhost.refer.play {{vhost.refer.play}} The referer for player only.
vhost.refer.publish {{vhost.refer.publish}} The referer for publisher only.
vhost.cluster.token_traverse {{vhost.cluster.token_traverse| sc_filter_enabled}} The RTMP edge token tranverse, to verify token by upstream server. Default is {{false| sc_filter_enabled}}
Key Value Description
vhost.bandcheck.enabled {{vhost.bandcheck.enabled| sc_filter_enabled}} Whether bandwidth test is enabled. Default is {{false| sc_filter_enabled}}
vhost.bandcheck.key {{vhost.bandcheck.key}} The key for bandwidth test.
vhost.bandcheck.interval {{vhost.bandcheck.interval}} The minimal interval in seconds. Default is 30
vhost.bandcheck.limit_kbps {{vhost.bandcheck.limit_kbps}} The limit speed in Kbps. Default is 1000
Key Value Description
vhost.security.enabled {{vhost.security.enabled| sc_filter_enabled}} Whether security is enabled. Default is {{false| sc_filter_enabled}}
vhost.security.{{allow.action}} {{allow.action}} {{allow.method}} {{allow.entry}} {{allow| sc_filter_security}}
vhost.security.{{deny.action}} {{deny.action}} {{deny.method}} {{deny.entry}} {{deny| sc_filter_security}}
Key Value Description
vhost.http_static.enabled {{vhost.http_static.enabled| sc_filter_enabled}} Whether enable HTTP server. Default is {{false| sc_filter_enabled}}
vhost.http_static.mount {{vhost.http_static.mount}} The HTTP mount for vhost. Default is [vhost]/
vhost.http_static.dir {{vhost.http_static.dir}} The HTTP root directory for vhost.
Key Value Description
vhost.http_remux.enabled {{vhost.http_remux.enabled| sc_filter_enabled}} Whether HTTP streaming is enabled. Default is {{false| sc_filter_enabled}}
vhost.http_remux.fast_cache {{vhost.http_remux.fast_cache}} The pre cache for HTTP audio streaming, i.e. aac or mp3. Default is 30
vhost.http_remux.mount {{vhost.http_remux.mount}} The mount point for HTTP streaming. Default is [vhost]/[app]/[stream].flv
Key Value Description
vhost.http_hooks.enabled {{vhost.http_hooks.enabled| sc_filter_enabled}} Whether HTTP callback is enabled. Default is {{false| sc_filter_enabled}}。
vhost.http_hooks.on_connect hooks The callback for on_connect.
vhost.http_hooks.on_close hooks The callback for on_close.
vhost.http_hooks.on_publish hooks The callback for on_publisher.
vhost.http_hooks.on_unpublish hooks The callback for on_unpublish.
vhost.http_hooks.on_play hooks The callback for on_play.
vhost.http_hooks.on_stop hooks The callback for on_stop.
vhost.http_hooks.on_dvr hooks The callback for on_dvr.
vhost.http_hooks.on_hls hooks The callback for on_hls.
vhost.http_hooks.on_hls_notify hooks The callback for on_hls_notify.
Key Value Description
vhost.exec.enabled {{vhost.exec.enabled| sc_filter_enabled}} Whether exec is enabled. Default is {{false| sc_filter_enabled}}
vhost.exec.publish EXEC The exec config.
Key Value Description
vhost.hls.enabled {{vhost.hls.enabled| sc_filter_enabled}} Whether HLS is enabled. Default is {{false| sc_filter_enabled}}
vhost.hls.hls_fragment {{vhost.hls.hls_fragment}} The ts segment length in seconds. Default is 10
vhost.hls.hls_td_ratio {{vhost.hls.hls_td_ratio}} The target duration, times hls_fragment. Default is 1.5
vhost.hls.hls_aof_ratio {{vhost.hls.hls_aof_ratio}} The pure audio overflow ratio. Default is 2.0
vhost.hls.hls_window {{vhost.hls.hls_window}} The ts segment window in seconds. Default is 60
vhost.hls.hls_on_error {{vhost.hls.hls_on_error}} When error, SRS will ignore, disconnect or continue. Default is ignore
vhost.hls.hls_path {{vhost.hls.hls_path}} The ts segment root directory. Default is ./objs/nginx/html
vhost.hls.hls_m3u8_file {{vhost.hls.hls_m3u8_file}} The m3u8 file path template. Default is [app]/[stream].m3u8
vhost.hls.hls_ts_file {{vhost.hls.hls_ts_file}} The ts segment file path template. Default is [app]/[stream]-[seq].ts
vhost.hls.hls_ts_floor {{vhost.hls.hls_ts_floor| sc_filter_enabled}} Whether enable ts_floor algorithm. Default is {{false| sc_filter_enabled}}
vhost.hls.hls_entry_prefix {{vhost.hls.hls_entry_prefix}} The ts segment prefix.
vhost.hls.hls_acodec {{vhost.hls.hls_acodec}} The default audio codec. Default is aac
vhost.hls.hls_vcodec {{vhost.hls.hls_vcodec}} The default video codec. Default is h264
vhost.hls.hls_cleanup {{vhost.hls.hls_cleanup| sc_filter_enabled}} Whether cleanup ts segments not in window. Default is {{true| sc_filter_enabled}}
vhost.hls.hls_dispose {{vhost.hls.hls_dispose}} The max timeout in seconds to dispose ts segments when no stream, 0 means never dispose. Default is 0
vhost.hls.hls_nb_notify {{vhost.hls.hls_nb_notify}} The max reading size for on_hls_notify. Default is 64
vhost.hls.hls_wait_keyframe {{vhost.hls.hls_wait_keyframe| sc_filter_enabled}} Whether wait keyframe when closing segment. Default is {{true| sc_filter_enabled}}
vhost.http_hooks.on_hls hooks The HTTP callback for on_hls.
vhost.http_hooks.on_hls_notify hooks The HTTP callback for on_hls_notify, to pre cache HLS.
Key Value Description
vhost.hds.enabled {{vhost.hds.enabled| sc_filter_enabled}} Whether HDS is enabled. Default is {{false| sc_filter_enabled}}
vhost.hds.hds_fragment {{vhost.hds.hds_fragment}} The f4v segment length in seconds. Default is 10
vhost.hds.hds_window {{vhost.hds.hds_window}} The f4v segment window in seconds. Default is 60
vhost.hds.hds_path {{vhost.hds.hds_path}} The HDS root directory. Default is ./objs/nginx/html
Key Value Description
vhost.dvr.enabled {{vhost.dvr.enabled| sc_filter_enabled}} Whether DVR is enabled. Default is {{false| sc_filter_enabled}}
vhost.dvr.dvr_plan {{vhost.dvr.dvr_plan}} The record plan, can be session, segment or append. Default is session
vhost.dvr.dvr_apply Filters The DVR plan apply to, all or app/stream. Default is all
vhost.dvr.dvr_path PATH The DVR file path template. Default is ./objs/nginx/html/[app]/[stream].[timestamp].flv
vhost.dvr.dvr_duration {{vhost.dvr.dvr_duration}} The record segment duration in seconds. Default is 30
vhost.dvr.dvr_wait_keyframe {{vhost.dvr.dvr_wait_keyframe| sc_filter_enabled}} Whether wait for keyframe when closing record file. Default is {{true| sc_filter_enabled}}
vhost.dvr.time_jitter {{vhost.dvr.time_jitter}} The time jitter algorithm for DVR, can be full, zero or off. Default is full
vhost.http_hooks.on_dvr hooks The HTTP callback for on_dvr.
Key Value Description
ingest.enabled {{ingest.enabled| sc_filter_enabled}} Whether ingest is enabled. Default is {{false| sc_filter_enabled}}
ingest.input.type {{ingest.input.type}} The ingest type, can be file or stream. Default is file
ingest.input.url URL The url of ingest file or stream.
Key Value Description
engine.enabled {{engine.enabled| sc_filter_enabled}} Whether transcode is enabled. Default is {{false| sc_filter_enabled}}
engine.iformat {{engine.iformat}} The input format, ffmpeg params "-i v". Default is flv
engine.vfilter

-{{fk}} {{fv}}

The video param, ffmpeg params between "-i" and "-vcodec".
engine.vcodec {{engine.vcodec}} The video codec, ffmpeg params "-vcodec v", can be libx264, copy or vn.
engine.vbitrate {{engine.vbitrate}} The video bitrate in Kbps, ffmpeg params "-v:b v", 0 to follow source. Default is 0
engine.vfps {{engine.vfps}} The video fps, ffmpeg params "-r v", 0 to follow source. Default is 0
engine.vwidth {{engine.vwidth}} The video width in px, ffmpeg params "-s v", 0 to follow source. Default is 0
engine.vheight {{engine.vheight}} The video height in px, ffmpeg params "-s v", 0 to follow source. Default is 0
engine.vthreads {{engine.vthreads}} The encode threads, ffmpeg params "-thread v". Default is 1
engine.vprofile {{engine.vprofile}} The video profile, ffmpeg params "-profile:v v", can be high, main or baseline.
engine.vpreset {{engine.vpreset}} The video preset, ffmpeg params "-preset v", can be medium, slow, slower, veryslow or placebo
engine.vparams

-{{fk}} {{fv}}

The video transcode params, between ffmpeg params "-vpreset" and "-acodec".
engine.acodec {{engine.acodec}} The audio encoder, ffmpeg params "-acodec v", can be libfdk_aac, copy or an
engine.abitrate {{engine.abitrate}} The audio bitrate in Kbps, ffmepg params "-b:a v", 0 to follow source. Default is 0
engine.asample_rate {{engine.asample_rate}} The audio sample rate, ffmpeg params "-ar v", 0 to follow source. Default is 0
engine.achannels {{engine.achannels}} The audio channel count, ffmpeg params "-ac v", 0 to follow source. Default is 0
engine.aparams

-{{fk}} {{fv}}

The audio transcode params, between ffmpeg params "-ac" and "-f"/"-y"
engine.oformat {{engine.oformat}} The output format. Default is flv
engine.output URL The output url, which may include variables [vhost], [port], [app], [stream], [engine]
Key Value Description
transcode.enabled {{transcode.enabled| sc_filter_enabled}} Whether transcode is enabled. Default is {{false| sc_filter_enabled}}
transcode.ffmpeg {{transcode.ffmpeg}} The binary path of encoder.
Key Value Description
engine.enabled {{engine.enabled| sc_filter_enabled}} Whether transcode is enabled. Default is {{false| sc_filter_enabled}}
engine.iformat {{engine.iformat}} The input format, ffmpeg params "-i v". Default is flv
engine.vfilter

-{{fk}} {{fv}}

The video param, ffmpeg params between "-i" and "-vcodec".
engine.vcodec {{engine.vcodec}} The video codec, ffmpeg params "-vcodec v", can be libx264, copy or vn.
engine.vbitrate {{engine.vbitrate}} The video bitrate in Kbps, ffmpeg params "-v:b v", 0 to follow source. Default is 0
engine.vfps {{engine.vfps}} The video fps, ffmpeg params "-r v", 0 to follow source. Default is 0
engine.vwidth {{engine.vwidth}} The video width in px, ffmpeg params "-s v", 0 to follow source. Default is 0
engine.vheight {{engine.vheight}} The video height in px, ffmpeg params "-s v", 0 to follow source. Default is 0
engine.vthreads {{engine.vthreads}} The encode threads, ffmpeg params "-thread v". Default is 1
engine.vprofile {{engine.vprofile}} The video profile, ffmpeg params "-profile:v v", can be high, main or baseline.
engine.vpreset {{engine.vpreset}} The video preset, ffmpeg params "-preset v", can be medium, slow, slower, veryslow or placebo
engine.vparams

-{{fk}} {{fv}}

The video transcode params, between ffmpeg params "-vpreset" and "-acodec".
engine.acodec {{engine.acodec}} The audio encoder, ffmpeg params "-acodec v", can be libfdk_aac, copy or an
engine.abitrate {{engine.abitrate}} The audio bitrate in Kbps, ffmepg params "-b:a v", 0 to follow source. Default is 0
engine.asample_rate {{engine.asample_rate}} The audio sample rate, ffmpeg params "-ar v", 0 to follow source. Default is 0
engine.achannels {{engine.achannels}} The audio channel count, ffmpeg params "-ac v", 0 to follow source. Default is 0
engine.aparams

-{{fk}} {{fv}}

The audio transcode params, between ffmpeg params "-ac" and "-f"/"-y"
engine.oformat {{engine.oformat}} The output format. Default is flv
engine.output URL The output url, which may include variables [vhost], [port], [app], [stream], [engine]