Key Value Description
vhost.id {{vhost.id}} Vhost的统计信息,必须有访问时才会有数据.
vhost.id {{vhost.id}} 该Vhost没有任何访问客户端,无统计信息.
vhost.enabled {{vhost.enabled| sc_filter_enabled}} Vhost是否启用。默认: {{true| sc_filter_enabled}}
vhost.name {{vhost.name}} Vhost的名称,即客户的服务域名,或者虚拟主机名,服务器上不能重名。
vhost.chunk_size {{vhost.chunk_size}} RTMP Chunk大小,即分包大小。默认: 全局的chunk_size
vhost.min_latency {{vhost.min_latency| sc_filter_enabled}} 是否开启最小延迟配置,将设置vhost.publish.mr=off。默认: {{false| sc_filter_enabled}}
vhost.tcp_nodelay {{vhost.tcp_nodelay| sc_filter_enabled}} 是否设置TCP_NODELAY,将包及时发送到客户端,但严重影响性能。默认: {{false| sc_filter_enabled}}
Key Value Description
vhost.cluster.mode {{vhost.cluster.mode}} RTMP/FLV流集群模式的类型,local为源站,remote为边缘。默认: local
vhost.cluster.origin {{vhost.cluster.origin}} 边缘模式时,回源的源站服务器地址。
vhost.cluster.token_traverse {{vhost.cluster.token_traverse| sc_filter_enabled}} RTMP Edge防盗链,将连接信息传递给Origin源站验证。默认: {{false| sc_filter_enabled}}
vhost.cluster.vhost {{vhost.cluster.vhost}} 边缘模式时,回源的vhost,可以改变vhost回源。
vhost.cluster.debug_srs_upnode {{vhost.cluster.debug_srs_upnode| sc_filter_enabled}} 连接上层节点时发送本节点信息,影响所有连接服务器的地方如回源。默认: {{true| sc_filter_enabled}}
Key Value Description
vhost.forward.enabled {{vhost.forward.enabled| sc_filter_enabled}} 是否开启Forward。默认: {{false| sc_filter_enabled}}
vhost.forward.destination {{vhost.forward.destination}} 转发的服务器列表,同时转发给这些服务器。
Key Value Description
vhost.play.gop_cache {{vhost.play.gop_cache| sc_filter_enabled}} 是否开启GopCache,可快速启动播放。默认: {{true| sc_filter_enabled}}
vhost.play.queue_length {{vhost.play.queue_length}} 秒。队列的最大长度,超过后清空队列。默认: 30
vhost.play.time_jitter {{vhost.play.time_jitter}} 时间戳校正算法。full: 完全校正;zero: 零校正;off: 关闭。默认: full
vhost.play.mix_correct {{vhost.play.mix_correct| sc_filter_enabled}} 是否开启MixCorrect,混合单增校正算法。默认: {{false| sc_filter_enabled}}
vhost.play.atc {{vhost.play.atc| sc_filter_enabled}} 是否开启ATC,绝对时间戳。启用后将设置vhost.play.time_jitter为off。默认: {{false| sc_filter_enabled}}
vhost.play.atc_auto {{vhost.play.atc_auto| sc_filter_enabled}} 是否开启自动ATC。metadata中bravo_atc="true"时自动开启ATC。默认: {{false| sc_filter_enabled}}
vhost.play.mw_latency {{vhost.play.mw_latency}} 毫秒。合并写入延迟,同时将多少毫秒的包一次写入,writev高性能的关键配置。默认: 350
vhost.play.send_min_interval {{vhost.play.send_min_interval}} 毫秒。每个包发送的间隔。能控制发包间隔,但严重影响性能;0表示关闭。默认: 0
vhost.play.reduce_sequence_header {{vhost.play.reduce_sequence_header| sc_filter_enabled}} 是否去掉重复的SequenceHeader,有些编码器不能接收重复的sps/pps。默认: {{false| sc_filter_enabled}}
Key Value Description
vhost.publish.mr {{vhost.publish.mr| sc_filter_enabled}} 是否开启合并读,推流客户端较多时能提高性能。默认: {{false| sc_filter_enabled}}
vhost.publish.mr_latency {{vhost.publish.mr_latency}} 毫秒。合并读的延迟,即至少等一定毫秒才读包。默认: 350
vhost.publish.firstpkt_timeout {{vhost.publish.firstpkt_timeout}} 毫秒。发布客户端首包超时的时间。默认: 20000
vhost.publish.normal_timeout {{vhost.publish.normal_timeout}} 毫秒。发布客户端非首包超时的时间。默认: 5000
Key Value Description
vhost.refer.enabled {{vhost.refer.enabled| sc_filter_enabled}} 是否开启Referer防盗链机制。默认: {{false| sc_filter_enabled}}
vhost.refer.all {{vhost.refer.all}} 针对play和publish都有效的Referer设置。
vhost.refer.play {{vhost.refer.play}} 只针对play有效的Referer设置。
vhost.refer.publish {{vhost.refer.publish}} 只针对publish有效的Referer设置。
vhost.cluster.token_traverse {{vhost.cluster.token_traverse| sc_filter_enabled}} RTMP Edge防盗链,将连接信息传递给Origin源站验证。默认: {{false| sc_filter_enabled}}
Key Value Description
vhost.bandcheck.enabled {{vhost.bandcheck.enabled| sc_filter_enabled}} 是否开启测速配置。默认: {{false| sc_filter_enabled}}。
vhost.bandcheck.key {{vhost.bandcheck.key}} 带宽测速的Key,客户端必须指定合法的Key才能测速。
vhost.bandcheck.interval {{vhost.bandcheck.interval}} 秒。带宽测速的间隔,低于这个间隔不提供服务。默认: 30。
vhost.bandcheck.limit_kbps {{vhost.bandcheck.limit_kbps}} Kbps。带宽测速的上限速度。默认: 1000。
Key Value Description
vhost.security.enabled {{vhost.security.enabled| sc_filter_enabled}} 是否开启安全设置。默认: {{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}} 是否开启Vhost的HTTP静态配置。默认: {{false| sc_filter_enabled}}。
vhost.http_static.mount {{vhost.http_static.mount}} Vhost特殊的挂载信息。默认: [vhost]/。
vhost.http_static.dir {{vhost.http_static.dir}} Vhost的主目录。
Key Value Description
vhost.http_remux.enabled {{vhost.http_remux.enabled| sc_filter_enabled}} 是否开启Vhost的HTTP流服务器配置。默认: {{false| sc_filter_enabled}}。
vhost.http_remux.fast_cache {{vhost.http_remux.fast_cache}} 秒。音频流的预缓存时间,只对aac/mp3等纯音频流有效。默认: 30。
vhost.http_remux.mount {{vhost.http_remux.mount}} 挂载点,即用户的访问路径。默认: [vhost]/[app]/[stream].flv。
Key Value Description
vhost.http_hooks.enabled {{vhost.http_hooks.enabled| sc_filter_enabled}} 是否开启Vhost的HTTP回调配置。默认: {{false| sc_filter_enabled}}。
vhost.http_hooks.on_connect hooks 当RTMP客户端Connect时的回调,知道了tcUrl,但不知道Type和StreamName。
vhost.http_hooks.on_close hooks 当RTMP客户端Close时的回调,即断开连接时。
vhost.http_hooks.on_publish hooks 当RTMP客户端Publish时的回调,知道了类型和StreamName。
vhost.http_hooks.on_unpublish hooks 当RTMP客户端UnPublish时的回调,即停止推流。
vhost.http_hooks.on_play hooks 当RTMP客户端Play时的回调,知道了类型和StreamName。
vhost.http_hooks.on_stop hooks 当RTMP客户端Stop时的回调,即停止播放时。
vhost.http_hooks.on_dvr hooks 当服务器DVR关闭文件时的回调。
vhost.http_hooks.on_hls hooks 当服务器HLS关闭TS切片文件时的回调,支持多个地址,通知系统HLS切片生成了。
vhost.http_hooks.on_hls_notify hooks 当服务器HLS更新流信息(一般是关闭切片),只支持一个地址,可用来访问CDN做预取。
Key Value Description
vhost.exec.enabled {{vhost.exec.enabled| sc_filter_enabled}} 是否开启Vhost的EXEC配置。默认: {{false| sc_filter_enabled}}。
vhost.exec.publish EXEC 发布流时的EXEC配置。
Key Value Description
vhost.hls.enabled {{vhost.hls.enabled| sc_filter_enabled}} 是否支持HLS输出。默认: {{false| sc_filter_enabled}}。
vhost.hls.hls_fragment {{vhost.hls.hls_fragment}} 秒。HLS的TS切片的长度。默认: 10。
vhost.hls.hls_td_ratio {{vhost.hls.hls_td_ratio}} HLS的#EXT-X-TARGETDURATION的值,为hls_fragment的默认倍数。默认: 1.5。
vhost.hls.hls_aof_ratio {{vhost.hls.hls_aof_ratio}} 纯音频的溢出倍数,当TS切片超过溢出时长时就生成切片。默认: 2.0。
vhost.hls.hls_window {{vhost.hls.hls_window}} 秒。HLS的TS切片的窗口,即m3u8中有多少个TS切片。默认: 60。
vhost.hls.hls_on_error {{vhost.hls.hls_on_error}} 错误时,ignore: 忽略并禁用HLS;disconnect: 断开推流连接; continue: 继续再试。默认: ignore
vhost.hls.hls_path {{vhost.hls.hls_path}} HLS的存储目录。默认: ./objs/nginx/html。
vhost.hls.hls_m3u8_file {{vhost.hls.hls_m3u8_file}} m3u8文件模板。默认: [app]/[stream].m3u8
vhost.hls.hls_ts_file {{vhost.hls.hls_ts_file}} ts文件模板。默认: [app]/[stream]-[seq].ts
vhost.hls.hls_ts_floor {{vhost.hls.hls_ts_floor| sc_filter_enabled}} 是否开启TS文件名递增算法。默认: {{false| sc_filter_enabled}}
vhost.hls.hls_entry_prefix {{vhost.hls.hls_entry_prefix}} HLS的TS切片的前缀。
vhost.hls.hls_acodec {{vhost.hls.hls_acodec}} HLS默认的音频编码。默认: aac
vhost.hls.hls_vcodec {{vhost.hls.hls_vcodec}} HLS默认的视频编码。默认: h264
vhost.hls.hls_cleanup {{vhost.hls.hls_cleanup| sc_filter_enabled}} 是否清理超过窗口的TS切片。默认: {{true| sc_filter_enabled}}
vhost.hls.hls_dispose {{vhost.hls.hls_dispose}} 秒。HLS没有收到数据时清理的超时时间。0表示禁用。默认: 0
vhost.hls.hls_nb_notify {{vhost.hls.hls_nb_notify}} HLS请求on_hls_notify读取内容的最大长度。默认: 64
vhost.hls.hls_wait_keyframe {{vhost.hls.hls_wait_keyframe| sc_filter_enabled}} 关闭TS切片时是否等待关键帧。默认: {{true| sc_filter_enabled}}
vhost.http_hooks.on_hls hooks 当服务器HLS关闭TS切片文件时的回调,支持多个地址,通知系统HLS切片生成了。
vhost.http_hooks.on_hls_notify hooks 当服务器HLS更新流信息(一般是关闭切片),只支持一个地址,可用来访问CDN做预取。
Key Value Description
vhost.hds.enabled {{vhost.hds.enabled| sc_filter_enabled}} 是否分发HDS流。默认: {{false| sc_filter_enabled}}。
vhost.hds.hds_fragment {{vhost.hds.hds_fragment}} 秒。HDS的f4v切片的长度。默认: 10。
vhost.hds.hds_window {{vhost.hds.hds_window}} 秒。HDS的f4v切片的窗口,即f4m中有多少个f4v切片。默认: 60。
vhost.hds.hds_path {{vhost.hds.hds_path}} HDS的存储目录。默认: ./objs/nginx/html。
Key Value Description
vhost.dvr.enabled {{vhost.dvr.enabled| sc_filter_enabled}} 是否开启直播录制。默认: {{false| sc_filter_enabled}}。
vhost.dvr.dvr_plan {{vhost.dvr.dvr_plan}} 录制计划,session: 按Session;segment: 分段;append: 一个文件。默认: session
vhost.dvr.dvr_apply Filters 录制应用的目标,all表示所有流,app/stream指定特定的流。默认: all
vhost.dvr.dvr_path PATH 录制文件的模板。默认: ./objs/nginx/html/[app]/[stream].[timestamp].flv
vhost.dvr.dvr_duration {{vhost.dvr.dvr_duration}} 秒。segment计划时,录制文件的时长。默认: 30
vhost.dvr.dvr_wait_keyframe {{vhost.dvr.dvr_wait_keyframe| sc_filter_enabled}} segment计划时,关闭文件时是否等待关键帧。默认: {{true| sc_filter_enabled}}。
vhost.dvr.time_jitter {{vhost.dvr.time_jitter}} 时间戳校正算法。full: 完全校正;zero: 零校正;off: 关闭。默认: full
vhost.http_hooks.on_dvr hooks 当服务器DVR关闭文件时的回调。
Key Value Description
ingest.enabled {{ingest.enabled| sc_filter_enabled}} 是否开启采集。默认: {{false| sc_filter_enabled}}。
ingest.input.type {{ingest.input.type}} 采集的类型,file: 文件;stream: 流。默认: file
ingest.input.url URL 采集的地址。
Key Value Description
engine.enabled {{engine.enabled| sc_filter_enabled}} 是否开启转码引擎。默认: {{false| sc_filter_enabled}}。
engine.iformat {{engine.iformat}} 引擎的输入格式,即"-i v"。默认: flv
engine.vfilter

-{{fk}} {{fv}}

引擎的视频参数,譬如滤镜,在"-i"和"-vcodec"之间的参数。
engine.vcodec {{engine.vcodec}} 引擎的视频编码器,即"-vcodec v",可以是libx264,copy,vn
engine.vbitrate {{engine.vbitrate}} Kbps。编码器输出的视频码率,即"-v:b v"。0表示跟随源。默认: 0
engine.vfps {{engine.vfps}} fps。编码器输出的视频帧率,即"-r v"。0表示跟随源。默认: 0
engine.vwidth {{engine.vwidth}} px。编码器输出的视频宽度,即"-s v"。0表示跟随源。默认: 0
engine.vheight {{engine.vheight}} px。编码器输出的视频高度,即"-s v"。0表示跟随源。默认: 0
engine.vthreads {{engine.vthreads}} 编码器使用的最多线程数,即"-thread v"。默认: 1
engine.vprofile {{engine.vprofile}} 视频的编码profile,即"-profile:v v",可以是high,main,baseline
engine.vpreset {{engine.vpreset}} 视频的编码preset,即"-preset v",可以是medium,slow,slower,veryslow,placebo
engine.vparams

-{{fk}} {{fv}}

引擎的视频转码参数,譬如264的参数,在"-vpreset"和"-acodec"之前的参数。
engine.acodec {{engine.acodec}} 音频编码器,即"-acodec v",可以是libfdk_aac,copy,an
engine.abitrate {{engine.abitrate}} Kbps。编码器输出的音频码率,即"-b:a v"。0表示跟随源。默认: 0
engine.asample_rate {{engine.asample_rate}} 编码器输出的音频采样率,即"-ar v"。0表示跟随源。默认: 0
engine.achannels {{engine.achannels}} 编码器输出的音频声道,即"-ac v"。0表示跟随源。默认: 0
engine.aparams

-{{fk}} {{fv}}

引擎的音频转码参数,譬如aac的参数,在"-ac"和"-f"/"-y"之前的参数。
engine.oformat {{engine.oformat}} 编码器输出的格式,可选。默认: flv
engine.output URL 编码器输出的url,可以使用变量[vhost],[port],[app],[stream],[engine]
Key Value Description
transcode.enabled {{transcode.enabled| sc_filter_enabled}} 是否开启转码。默认: {{false| sc_filter_enabled}}。
transcode.ffmpeg {{transcode.ffmpeg}} 编码器的地址。
Key Value Description
engine.enabled {{engine.enabled| sc_filter_enabled}} 是否开启转码引擎。默认: {{false| sc_filter_enabled}}。
engine.iformat {{engine.iformat}} 引擎的输入格式,即"-i v"。默认: flv
engine.vfilter

-{{fk}} {{fv}}

引擎的视频参数,譬如滤镜,在"-i"和"-vcodec"之间的参数。
engine.vcodec {{engine.vcodec}} 引擎的视频编码器,即"-vcodec v",可以是libx264,copy,vn
engine.vbitrate {{engine.vbitrate}} Kbps。编码器输出的视频码率,即"-v:b v"。0表示跟随源。默认: 0
engine.vfps {{engine.vfps}} fps。编码器输出的视频帧率,即"-r v"。0表示跟随源。默认: 0
engine.vwidth {{engine.vwidth}} px。编码器输出的视频宽度,即"-s v"。0表示跟随源。默认: 0
engine.vheight {{engine.vheight}} px。编码器输出的视频高度,即"-s v"。0表示跟随源。默认: 0
engine.vthreads {{engine.vthreads}} 编码器使用的最多线程数,即"-thread v"。默认: 1
engine.vprofile {{engine.vprofile}} 视频的编码profile,即"-profile:v v",可以是high,main,baseline
engine.vpreset {{engine.vpreset}} 视频的编码preset,即"-preset v",可以是medium,slow,slower,veryslow,placebo
engine.vparams

-{{fk}} {{fv}}

引擎的视频转码参数,譬如264的参数,在"-vpreset"和"-acodec"之前的参数。
engine.acodec {{engine.acodec}} 音频编码器,即"-acodec v",可以是libfdk_aac,copy,an
engine.abitrate {{engine.abitrate}} Kbps。编码器输出的音频码率,即"-b:a v"。0表示跟随源。默认: 0
engine.asample_rate {{engine.asample_rate}} 编码器输出的音频采样率,即"-ar v"。0表示跟随源。默认: 0
engine.achannels {{engine.achannels}} 编码器输出的音频声道,即"-ac v"。0表示跟随源。默认: 0
engine.aparams

-{{fk}} {{fv}}

引擎的音频转码参数,譬如aac的参数,在"-ac"和"-f"/"-y"之前的参数。
engine.oformat {{engine.oformat}} 编码器输出的格式,可选。默认: flv
engine.output URL 编码器输出的url,可以使用变量[vhost],[port],[app],[stream],[engine]