3 Star 6 Fork 4

winlinvip / srs.wiki

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
v2_CN_SpecialControl.md 3.88 KB
一键复制 编辑 原始数据 按行查看 历史
winlinvip 提交于 2022-01-06 11:57 . Update

HOME > CN > Special Control

SpecialControl

SRS提供了一些特殊的配置,主要用来和各种系统对接的设置。

Send Minimal Interval

vhost __defaultVhost__ {
    # 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
    # delivery packets in constant interval(not cbr).
    # @remark 0 to disable the minimal interval.
    # @remark >0 to make the srs to send message one by one.
    # @remark user can get the right packets interval in ms by srs_rtmp_dump.
    # default: 0
    send_min_interval       10.0;
}

Reduce Sequence Header

vhost __defaultVhost__ {
    # whether reduce the sequence header,
    # for some client which cannot got duplicated sequence header,
    # while the sequence header is not changed yet.
    # default: off
    reduce_sequence_header  on;
}

Publish 1st Packet Timeout

vhost __defaultVhost__ {
    # the 1st packet timeout in ms for encoder.
    # default: 20000
    publish_1stpkt_timeout  20000;
}

Publish Normal Timeout

vhost __defaultVhost__ {
    # the normal packet timeout in ms for encoder.
    # default: 5000
    publish_normal_timeout  7000;
}

Debug SRS Upnode

vhost __defaultVhost__ {
    # 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, 
    # for example, the id, source id, pid.
    # please see: https://github.com/ossrs/srs/wiki/v2_CN_SrsLog
    # default: on
    debug_srs_upnode    on;
}

UTC Time

# whether use utc_time to generate the time struct,
# if off, use localtime() to generate it,
# if on, use gmtime() instead, which use UTC time.
# default: off
utc_time            off;

HLS TS Floor

vhost __defaultVhost__ {
    hls {
        # 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.
        # @remark when floor on, recommend the hls_segment>=2*gop.
        # default: off
        hls_ts_floor    off;
    }
}

HLS Wait Keyframe

vhost __defaultVhost__ {
    hls {
        # whether wait keyframe to reap segment,
        # if off, reap segment when duration exceed the fragment,
        # if on, reap segment when duration exceed and got keyframe.
        # default: on
        hls_wait_keyframe       on;
    }
}

HttpHooks On HLS Notify

vhost __defaultVhost__ {
    http_hooks {
        # when srs reap a ts file of hls, call this hook,
        # used to push file to cdn network, by get the ts file from cdn network.
        # so we use HTTP GET and use the variable following:
        #       [app], replace with the app.
        #       [stream], replace with the stream.
        #       [ts_url], replace with the ts url.
        # ignore any return data of server.
        # @remark random select a url to report, not report all.
        on_hls_notify   http://127.0.0.1:8085/api/v1/hls/[app]/[stream][ts_url];
    }
}

TCP NoDelay

vhost __defaultVhost__ {
    # whether enable the TCP_NODELAY
    # if on, set the nodelay of fd by setsockopt
    # default: off
    tcp_nodelay     on;
}

ATC Auto

vhost __defaultVhost__ {
    # 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;
}

Winlin 2015.8
1
https://gitee.com/winlinvip/srs-wiki.git
git@gitee.com:winlinvip/srs-wiki.git
winlinvip
srs-wiki
srs.wiki
master

搜索帮助