SRS Config 一 基础配置

Config

srs 流媒体服务配置官方文档已经很详细了,本文仅记录部分配置过程

srs.conf同级目录下 新建 self.conf

仿照srs.conf 添加基础配置

1 rtmp 

RTMP是直播的事实标准,这么多年以来一直是使用最广泛的直播协议。

然而Adobe公司没有一直更新RTMP协议,也没有提交给标准组织比如RFC,因此很多新功能都没有支持,比如HEVC或Opus。 直到2023.03,终于Enhanced RTMP项目建立,开始支持了HEVC和AV1, SRS和OBS已经支持了基于Enhanced RTMP的HEVC编码。

在流的制作方面,最近几年,SRT、WebRTC和SRT增长迅速,很多设备都支持了SRT和RIST协议。你也可以用WebRTC做直播。

在流的分发上,HLS是使用最广泛的协议,所有CDN和设备都支持,比如PC,iOS,Android或平板电脑。当然HLS延迟比较大(3~5s+), 你可以选择HTTP-FLV,HTTP-TS或者WebRTC,如果需要降低延迟。

至今为止,在内容制作领域,RTMP还是使用最广泛的协议。比如你可以用OBS推流到B站、视频号或快手。如果要对接一个广播设备, 或者推流到某个平台,那么RTMP是最好的选择,几乎都会支持。


full config

vhost __defaultVhost__ {
    # whether enable min delay mode for vhost.
    # 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 (for RTMP/HTTP-FLV)
    # default: on (for WebRTC)
    min_latency off;

    # whether enable the TCP_NODELAY
    # if on, set the nodelay of fd by setsockopt
    # Overwrite by env SRS_VHOST_TCP_NODELAY for all vhosts.
    # 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.
    # Overwrite by env SRS_VHOST_CHUNK_SIZE for all vhosts.
    # default: global chunk size.
    chunk_size 128;
    
    # The input ack size, 0 to not set.
    # Generally, it's set by the message from peer,
    # but for some peer(encoder), it never send message but use a different ack size.
    # We can chnage the default ack size in server-side, to send acknowledge message,
    # or the encoder maybe blocked after publishing for some time.
    # Overwrite by env SRS_VHOST_IN_ACK_SIZE for all vhosts.
    # Default: 0
    in_ack_size 0;
    
    # The output ack size, 0 to not set.
    # This is used to notify the peer(player) to send acknowledge to server.
    # Overwrite by env SRS_VHOST_OUT_ACK_SIZE for all vhosts.
    # Default: 2500000
    out_ack_size 2500000;
    
    # the config for FMLE/Flash publisher, which push RTMP to SRS.
    publish {
        # about MR, read https://github.com/ossrs/srs/issues/241
        # when enabled the mr, SRS will read as large as possible.
        # Overwrite by env SRS_VHOST_PUBLISH_MR for all vhosts.
        # default: off
        mr off;
        # the latency in ms for MR(merged-read),
        # the performance+ when latency+, and memory+,
        #       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 at least:
        #       183KB * 2500 = 446MB
        # the recommended value is [300, 2000]
        # Overwrite by env SRS_VHOST_PUBLISH_MR_LATENCY for all vhosts.
        # default: 350
        mr_latency 350;

        # the 1st packet timeout in ms for encoder.
        # Overwrite by env SRS_VHOST_PUBLISH_FIRSTPKT_TIMEOUT for all vhosts.
        # default: 20000
        firstpkt_timeout 20000;
        # the normal packet timeout in ms for encoder.
        # Overwrite by env SRS_VHOST_PUBLISH_NORMAL_TIMEOUT for all vhosts.
        # default: 5000
        normal_timeout 7000;
        # whether parse the sps when publish stream.
        # we can got the resolution of video for stat api.
        # but we may failed to cause publish failed.
        # @remark If disabled, HLS might never update the sps/pps, it depends on this.
        # Overwrite by env SRS_VHOST_PUBLISH_PARSE_SPS for all vhosts.
        # default: on
        parse_sps on;
        # When parsing SPS/PPS, whether try ANNEXB first. If not, try IBMF first, then ANNEXB.
        # Overwrite by env SRS_VHOST_PUBLISH_TRY_ANNEXB_FIRST for all vhosts.
        # default: on
        try_annexb_first on;
        # The timeout in seconds to disconnect publisher when idle, which means no players.
        # Note that 0 means no timeout or this feature is disabled.
        # Note that this feature conflicts with forward, because it disconnect the publisher stream.
        # Overwrite by env SRS_VHOST_PUBLISH_KICKOFF_FOR_IDLE for all vhosts.
        # default: 0
        kickoff_for_idle 0;
    }
    
    # for play client, both RTMP and other stream clients,
    # for instance, the HTTP FLV stream clients.
    play {
        # whether cache the last gop.
        # if on, cache the last gop and dispatch to client,
        #   to enabled fast startup for client, client play immediately.
        # if off, send the latest media data to client,
        #   client need to wait for the next Iframe to decode and show the video.
        # set to off if requires min delay;
        # set to on if requires client fast startup.
        # Overwrite by env SRS_VHOST_PLAY_GOP_CACHE for all vhosts.
        # default: on
        gop_cache off;

        # Limit the max frames in gop cache. It might cause OOM if video stream has no IDR frame, so we limit to N
        # frames by default. Note that it's the size of gop cache, including videos, audios and other messages.
        # Overwrite by env SRS_VHOST_PLAY_GOP_CACHE_MAX_FRAMES for all vhosts.
        # default: 2500
        gop_cache_max_frames 2500;

        # the max live queue length in seconds.
        # if the messages in the queue exceed the max length,
        # drop the old whole gop.
        # Overwrite by env SRS_VHOST_PLAY_QUEUE_LENGTH for all vhosts.
        # default: 30
        queue_length 10;

        # about the stream 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 stream start at zero, ignore timestamp jitter.
        #   3. off, disable the time jitter algorithm, like atc.
        # @remark for full, correct timestamp only when |delta| > 250ms.
        # @remark disabled when atc is on.
        # Overwrite by env SRS_VHOST_PLAY_TIME_JITTER for all vhosts.
        # default: full
        time_jitter full;
        # vhost for atc for hls/hds/rtmp backup.
        # generally, atc default to off, server delivery rtmp stream to client(flash) timestamp from 0.
        # when atc is on, server delivery rtmp stream by absolute time.
        # atc is used, for instance, encoder will copy stream to master and slave server,
        # 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
        #
        # @remark when atc is on, auto off the time_jitter
        # Overwrite by env SRS_VHOST_PLAY_ATC for all vhosts.
        # default: off
        atc off;
        # whether use the interleaved/mixed algorithm to correct the timestamp.
        # if on, always ensure the timestamp of audio+video is interleaved/mixed monotonically increase.
        # if off, use time_jitter to correct the timestamp if required.
        # @remark to use mix_correct, atc should on(or time_jitter should off).
        # Overwrite by env SRS_VHOST_PLAY_MIX_CORRECT for all vhosts.
        # default: off
        mix_correct off;

        # 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.
        # Overwrite by env SRS_VHOST_PLAY_ATC_AUTO for all vhosts.
        # default: off
        atc_auto off;

        # 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]
        # @remark For WebRTC, we enable pass-by-timestamp mode, so we ignore this config.
        # default: 350 (For RTMP/HTTP-FLV)
        # Overwrite by env SRS_VHOST_PLAY_MW_LATENCY for all vhosts.
        # default: 0 (For WebRTC)
        mw_latency 350;

        # Set the MW(merged-write) min messages.
        # default: 0 (For Real-Time, min_latency on)
        # default: 1 (For WebRTC, min_latency off)
        # default: 8 (For RTMP/HTTP-FLV, min_latency off).
        # Overwrite by env SRS_VHOST_PLAY_MW_MSGS for all vhosts.
        mw_msgs 8;

        # 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.
        # Overwrite by env SRS_VHOST_PLAY_SEND_MIN_INTERVAL for all vhosts.
        # default: 0
        send_min_interval 10.0;
        # whether reduce the sequence header,
        # for some client which cannot got duplicated sequence header,
        # while the sequence header is not changed yet.
        # Overwrite by env SRS_VHOST_PLAY_REDUCE_SEQUENCE_HEADER for all vhosts.
        # default: off
        reduce_sequence_header on;
    }
}

listen              1935;
max_connections     1000;
#srs_log_tank        file;
#srs_log_file        ./objs/srs.log;
daemon              on;

2 http-server

SRS内嵌了一个web服务器,支持api和简单的文件分发。

部署和使用SRS的内嵌http服务器,参考:Usage: HTTP

SRS的内置HTTP服务器已经参考GO的HTTP模块重写,满足商用要求,可以当作web服务器使用。参考:#277

备注:SRS只支持源站HTTP分发,边缘还是需要用Web服务器比如NGINX、SQUID或ATS等。

Use Scenario

它的定位很简单:智能手机上的摄像头。

Nginx/Apache/lighthttpd等众多HTTP server大佬就是专业的单反,老长老长镜头了。 难道有了单反智能手机上就不能有摄像头?不会吧!而且必须有。所以不是要和nginx拼个你死我活, 定位不一样,就像fms内嵌apache一样(不过fms嵌得很烂),真的有必要而且方便。

为何srs不内嵌一个nginx呢?智能手机上能内嵌一个单反长镜头么?我去,那是怪物吧。 nginx14万行代码,巨大无比,srs才2万行,如何能内嵌呢?最核心的原因是:srs需要提供http的api, 方便外部管理和调用;这点往往都毫无异议,但是提到srs要内嵌web服务器,就都炸开锅啦。 OK,其实就是http的api稍微扩展点,支持读文件后发送给客户端。

srs会一如既往的保持最简单,http的代码不会有多少行,功能不会有几个,就支持简单的文件分发就足够了。可以:

  • 只需要部署一个服务器就可以分发RTMP和HLS。
  • SRS对于HLS/HDS/DASH的支持会更完善。
  • SRS可以支持点播,动态转封装等。
  • SRS依然可以用nginx作为反向代理,或者禁用这个选项,使用nginx分发。

实际上,RTMP协议本身比HTTP复杂很多,所以st来做http分发,没有任何不可以的地方,更何况只是做部分。所以,淡定~

full  config

# embeded 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.
# 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.
# @remeark, the http embeded 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.
    # Overwrite by env SRS_HTTP_SERVER_ENABLED
    # default: off
    enabled on;
    # the http streaming listen entry is <[ip:]port>
    # for example, 192.168.1.100:8080
    # where the ip is optional, default to 0.0.0.0, that is 8080 equals to 0.0.0.0:8080
    # @remark, if use lower port, for instance 80, user must start srs by root.
    # Overwrite by env SRS_HTTP_SERVER_LISTEN
    # default: 8080
    listen 8080;
    # the default dir for http root.
    # Overwrite by env SRS_HTTP_SERVER_DIR
    # default: ./objs/nginx/html
    dir ./objs/nginx/html;
    # whether enable crossdomain request.
    # for both http static and stream server and apply on all vhosts.
    # Overwrite by env SRS_HTTP_SERVER_CROSSDOMAIN
    # default: on
    crossdomain on;
    # For https_server or HTTPS Streaming.
    https {
        # Whether enable HTTPS Streaming.
        # Overwrite by env SRS_HTTP_SERVER_HTTPS_ENABLED
        # default: off
        enabled on;
        # The listen endpoint for HTTPS Streaming.
        # Overwrite by env SRS_HTTP_SERVER_HTTPS_LISTEN
        # default: 8088
        listen 8088;
        # The SSL private key file, generated by:
        #       openssl genrsa -out server.key 2048
        # Overwrite by env SRS_HTTP_SERVER_HTTPS_KEY
        # default: ./conf/server.key
        key ./conf/server.key;
        # The SSL public cert file, generated by:
        #       openssl req -new -x509 -key server.key -out server.crt -days 3650 -subj "/C=CN/ST=Beijing/L=Beijing/O=Me/OU=Me/CN=ossrs.net"
        # Overwrite by env SRS_HTTP_SERVER_HTTPS_CERT
        # default: ./conf/server.crt
        cert ./conf/server.crt;
    }

这里只引入部分 

http_api {enabled         on;listen          1985;
}
http_server {enabled         on;listen          8080;dir             ./objs/nginx/html;
}

3 webrtc

如果需要支持webrtc 需要配置 否则不需要加入rtc部分

full 配置

rtc_server {# Whether enable WebRTC server.# Overwrite by env SRS_RTC_SERVER_ENABLED# default: offenabled on;# The udp listen port, we will reuse it for connections.# Overwrite by env SRS_RTC_SERVER_LISTEN# default: 8000listen 8000;# For WebRTC over TCP directly, not TURN, see https://github.com/ossrs/srs/issues/2852# Some network does not support UDP, or not very well, so we use TCP like HTTP/80 port for firewall traversing.tcp {# Whether enable WebRTC over TCP.# Overwrite by env SRS_RTC_SERVER_TCP_ENABLED# Default: offenabled off;# The TCP listen port for WebRTC. Highly recommend is some normally used ports, such as TCP/80, TCP/443,# TCP/8000, TCP/8080 etc. However SRS default to TCP/8000 corresponding to UDP/8000.# Overwrite by env SRS_RTC_SERVER_TCP_LISTEN# Default: 8000listen 8000;}# The protocol for candidate to use, it can be:#       udp         Generate UDP candidates. Note that UDP server is always enabled for WebRTC.#       tcp         Generate TCP candidates. Fail if rtc_server.tcp(WebRTC over TCP) is disabled.#       all         Generate UDP+TCP candidates. Ignore if rtc_server.tcp(WebRTC over TCP) is disabled.# Note that if both are connected, we will use the first connected(DTLS done) one.# Overwrite by env SRS_RTC_SERVER_PROTOCOL# Default: udpprotocol udp;# The exposed candidate IPs, response in SDP candidate line. It can be:#       *           Retrieve server IP automatically, from all network interfaces.#       $CANDIDATE  Read the IP from ENV variable, use * if not set.#       x.x.x.x     A specified IP address or DNS name, use * if 0.0.0.0.# @remark For Firefox, the candidate MUST be IP, MUST NOT be DNS name, see https://bugzilla.mozilla.org/show_bug.cgi?id=1239006# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate# Overwrite by env SRS_RTC_SERVER_CANDIDATE# default: *candidate *;
}vhost rtc.vhost.srs.com {rtc {# Whether enable WebRTC server.# Overwrite by env SRS_VHOST_RTC_ENABLED for all vhosts.# default: offenabled on;# Whether support NACK.# default: onnack on;# Whether support TWCC.# default: ontwcc on;# The timeout in seconds for session timeout.# Client will send ping(STUN binding request) to server, we use it as heartbeat.# default: 30stun_timeout 30;# The role of dtls when peer is actpass: passive or active# default: passivedtls_role passive;# Whether enable transmuxing RTMP to RTC.# If enabled, transcode aac to opus.# Overwrite by env SRS_VHOST_RTC_RTMP_TO_RTC for all vhosts.# default: offrtmp_to_rtc off;# Whether enable transmuxing RTC to RTMP.# Overwrite by env SRS_VHOST_RTC_RTC_TO_RTMP for all vhosts.# Default: offrtc_to_rtmp off;}
}

这里只引入部分

rtc_server {enabled on;listen 8000; # UDP port# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate# candidate $CANDIDATE;candidate 192.168.1.116;
}vhost __defaultVhost__ {...rtc {enabled     on;# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtcrtmp_to_rtc on;# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmprtc_to_rtmp off;}...
}

 关于candidate 开启rtmp_to_rtc on 不进行推流 当前candiata $CANDIDATE配置可不用更改

(webrtc localhost播放流 )

推流弹框https

配置浏览器https支持,由于webrtc需要https,本地测试配置证书又很麻烦,需要修改下浏览器配置。

在谷歌浏览器地址栏输入:chrome://flags/#unsafely-treat-insecure-origin-as-secure

 启用功能,输入框中输入你对应的地址 http://192.168.1.116:8080,多个用英文逗号隔开。在这里配置后。浏览器会在访问这个地址的时候,会以https的方式去访问http网站。

webrtc 推流

需要 配置好candidate 192.168.1.116

通过srs工具或者obs推流

obs 推流
1 设置推流地址 

2 设置采集来源

设置本地文件媒体

设置窗口来源

localhost 这里为192.168.1.116

3 开始直播

播放webrtc 流

4 rtmp->webrtc

  rtmp_to_rtc on;

rtc {enabled     on;# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtcrtmp_to_rtc on;# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmprtc_to_rtmp off;}

6 DVR

DVR的计划即决定什么时候关闭flv文件,打开新的flv文件,主要的录制计划包括:

  • session:按照session来关闭flv文件,即编码器停止推流时关闭flv,整个session录制为一个flv。
  • segment:按照时间分段录制,flv文件时长配置为dvr_duration和dvr_wait_keyframe。注意:若不按关键帧切flv(即dvr_wait_keyframe配置为off),所以会导致后面的flv启动时会花屏。
  • time_jitter: 时间戳抖动算法。full使用完全的时间戳矫正;zero只是保证从0开始;off不矫正时间戳。
  • dvr_path: 录制的路径,规则参考下一章。

参考conf/dvr.segment.confconf/dvr.session.conf配置实例。

# dvrdvr {enabled      on;dvr_path     ./objs/nginx/html/[app]/[stream].[timestamp].mp4;dvr_plan     segment;# the filter for dvr to apply to.#       all, dvr all streams of all apps.#       <app>/<stream>, apply to specified stream of app.# for example, to dvr the following two streams:#       live/stream1 live/stream2# default: alldvr_apply       all;# the dvr plan. canbe:#       session reap flv/mp4 when session end(unpublish).#       segment reap flv/mp4 when flv duration exceed the specified dvr_duration.# @remark The plan append is removed in SRS3+, for it's no use.# default: session# the duration for dvr file, reap if exceed, in seconds.#       segment apply it.#       session,append ignore.# default: 30dvr_duration    30;# whether wait keyframe to reap segment,# if off, reap segment when duration exceed the dvr_duration,# if on, reap segment when duration exceed and got keyframe.#       segment apply it.#       session,append ignore.# default: ondvr_wait_keyframe       on;# about the stream 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 stream start at zero, ignore timestamp jitter.#   3. off, disable the time jitter algorithm, like atc.# apply for all dvr plan.# default: fulltime_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# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/dvr#http-callback# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/dvr#http-callback}

这里设置 30S自动切片 等待关键帧  生成路径及命名规则

 dvr_path     ./objs/nginx/html/[app]/[stream].[timestamp].mp4; 年月日方式更直观

按流和年月日分目录,时间作为文件名: dvr_path /data/[vhost]/[app]/[stream]/[2006]/[01]/[02]/[15].[04].[05].[999].flv; => dvr_path /data/ossrs.net/live/livestream/2015/01/03/10.57.30.776.flv;

至此 self.conf

# main config for srs.
# @see full.conf for detail config.listen              1935;
max_connections     1000;
#srs_log_tank        file;
#srs_log_file        ./objs/srs.log;
daemon              on;
http_api {enabled         on;listen          1985;
}
http_server {enabled         on;listen          8080;dir             ./objs/nginx/html;
}
rtc_server {enabled on;listen 8000; # UDP port# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidatecandidate 192.168.1.116;
}
vhost __defaultVhost__ {hls {enabled         on;}http_remux {enabled     on;mount       [vhost]/[app]/[stream].flv;}rtc {enabled     on;# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtcrtmp_to_rtc on;# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmprtc_to_rtmp off;}play{gop_cache_max_frames 2500;}# dvrdvr {enabled      on;dvr_path     ./objs/nginx/html/[app]/[stream].[timestamp].mp4;dvr_plan     segment;# the filter for dvr to apply to.#       all, dvr all streams of all apps.#       <app>/<stream>, apply to specified stream of app.# for example, to dvr the following two streams:#       live/stream1 live/stream2# default: alldvr_apply       all;# the dvr plan. canbe:#       session reap flv/mp4 when session end(unpublish).#       segment reap flv/mp4 when flv duration exceed the specified dvr_duration.# @remark The plan append is removed in SRS3+, for it's no use.# default: session# the duration for dvr file, reap if exceed, in seconds.#       segment apply it.#       session,append ignore.# default: 30dvr_duration    30;# whether wait keyframe to reap segment,# if off, reap segment when duration exceed the dvr_duration,# if on, reap segment when duration exceed and got keyframe.#       segment apply it.#       session,append ignore.# default: ondvr_wait_keyframe       on;# about the stream 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 stream start at zero, ignore timestamp jitter.#   3. off, disable the time jitter algorithm, like atc.# apply for all dvr plan.# default: fulltime_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# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/dvr#http-callback# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/dvr#http-callback}
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/108310.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

icg模块clock gating解析

// 两种形式&#xff1a; 与门形式 或门形式 三个用途&#xff1a; 用于关断时钟&#xff0c;降低功耗用于动态时钟切换是防止毛刺的产生用于时钟分频 解析&#xff1a;与门形式 解析&#xff1a;或门形式

win11 搭建Apache webdav 设置用户名密码 加密授权访问以及多个不同目录访问

Apache webdav 的搭建应该比较简单,但是搭建后还遇到了一些问题,也就是设置了访问用户名密码,咋就不生效呢,苦苦思索两日,终于发现了问题,本文就是分两个方面来编写 一、搭建 1.下载Apache 官网下载: https://www.apachehaus.com/cgi-bin/download.plx 2.下载后解压…

Kubernetes 集群部署 Prometheus 和 Grafana

Kubernetes 集群部署 Prometheus 和 Grafana 文章目录 Kubernetes 集群部署 Prometheus 和 Grafana一.部署 node-exporter1.node-exporter 安装2.部署 node-exporter 二.部署Prometheus1.Prometheus 安装和配置&#xff08;1&#xff09;创建 sa 账号&#xff0c;对 sa 做 rbac…

Flow深入浅出系列之更聪明的分享 Kotlin Flows

Flow深入浅出系列之在ViewModels中使用Kotlin FlowsFlow深入浅出系列之更聪明的分享 Kotlin FlowsFlow深入浅出系列之使用Kotlin Flow自动刷新Android数据的策略 Flow深入浅出系列之更聪明的分享 Kotlin Flows 使生命周期对上游流有效&#xff0c;以跳过不必要的工作。这是一…

mmlab 做实验

首先 下载项目完整代码&#xff0c;在pycharm中打开 1. comfig 中有各种网络模型&#xff0c;可以直接使用训练好的预训练模型&#xff0c;尽量不要改动网络模型的结构 2. 18表示网络机构18层&#xff0c;8是每个卡的batch&#xff0c;cifar10 是数据集 3.配置文件解析 4. …

解决github打开慢的问题

1&#xff0c;修改hosts&#xff08;可以从这个链接 https://raw.hellogithub.com/hosts 获取对应的host配置&#xff09;。 140.82.112.3 github.com 151.101.1.194 github.global.ssl.fastly.net 2&#xff0c;刷新dns缓存。 # 打开CMD运行如下命令 ipconfig /flushdns 之…

【unity】【VR】白马VR课堂系列-VR开发核心基础04-主体设置-XR Rig的引入和设置

接下来我们开始引入并构建XR Rig。 你可以将XR Rig理解为玩家在VR世界中的替身。 我们先删除Main Camera&#xff0c;在Hierarchy右键点击删除。 然后再在场景层右键选择XR下的XR Origin。这时一个XR Origin对象就被添加到了Hierarchy。 重设XR Origin的Position和Rotation…

windows内网渗透正向代理

内网渗透正向代理 文章目录 内网渗透正向代理1 正向代理图2 环境准备2.1 正向代理需求&#xff1a; 3 网卡配置3.1 【redream】主机3.2 【base】主机双网卡3.3 【yvkong】网卡设置 4 启动4.1【redream】网卡配置&#xff1a;4.2【base】网卡配置&#xff1a;4.3【yvkong】网卡地…

配置VScode开发环境-CUDA编程

如果觉得本篇文章对您的学习起到帮助作用&#xff0c;请 点赞 关注 评论 &#xff0c;留下您的足迹&#x1f4aa;&#x1f4aa;&#x1f4aa; 本文主要介绍VScode下的CUDA编程配置&#xff0c;因此记录以备日后查看&#xff0c;同时&#xff0c;如果能够帮助到更多人&#xf…

KVM/qemu安装UOS 直接让输入用户密码

错误信息 安装后出现&#xff1a; 1、点击刚刚建立的虚拟机最上角感叹号&#xff08;设备管理器&#xff09; ----新建硬件---输入----类型&#xff1a;【通用 USB Mouse】。 ----新建硬件---输入----类型&#xff1a;【通用 USB keyboard】。 2、在设备管理器中----新建硬…

Compose Canvas基础(2) 图形转换

Compose Canvas基础&#xff08;2&#xff09;图形转换 前言平移 translate缩放 scale旋转 rotate自定义绘图区域及绘制内边距inset组合转换 withTransform完整代码总结 上一篇文章 Compose Canvas基础&#xff08;1&#xff09; drawxxx方法 前言 阅读本文需要一定compose基…

腾讯云我的世界mc服务器配置怎么选择?

使用腾讯云服务器开Minecraft我的世界服务器配置怎么选择&#xff1f;10人以内玩2核4G就够用了&#xff0c;开我的世界服务器选择轻量应用服务器就够了&#xff0c;腾讯云轻量CPU采用至强白金处理器&#xff0c;大型整合包一般1.12版本的&#xff0c;轻量2核4G配置都差不多的&a…

uni-app编程checkbox-group获取选中的每个checkbox的value值

uni-app编程checkbox-group获取选中的每个checkbox的value值_uniappcheckboxvalue-CSDN博客

防火墙管理工具增强网络防火墙防御

防火墙在网络安全中起着至关重要的作用。现代企业具有多个防火墙&#xff0c;如&#xff1a;电路级防火墙、应用级防火墙和高级下一代防火墙&#xff08;NGFW&#xff09;的复杂网络架构需要自动化防火墙管理和集中式防火墙监控工具来确保边界级别的安全。 网络防火墙安全和日…

短视频矩阵系统源码开发

短视频剪辑矩阵系统开发源码----源头搭建 一、源码技术构建源码部署搭建交付之---- 1.需要协助系统完成部署、接口全部正常接入、系统正常运行多久&#xff1f;7个工作日 2.需要准备好服务器以及备案域名 3.短视频SEO模块一年项目带宽&#xff0c;带宽最低要求10M&#xff0c;…

【LeetCode高频SQL50题-基础版】打卡第9天:第46~50题

文章目录 【LeetCode高频SQL50题-基础版】打卡第9天&#xff1a;第46~50题⛅前言患某种疾病的患者&#x1f512;题目&#x1f511;题解 第二高的薪水&#x1f512;题目&#x1f511;题解 按日期分组销售产品&#x1f512;题目&#x1f511;题解 列出指定时间段内所有的下单产品…

内网和热点同时连接使用配置

解决如标题问题 查看当前永久路由信息 route print截图保存(重要) 截图保存(重要)查出来的永久路由&#xff0c;以防配置不成功时回退&#xff0c;回退方法就是下面的“添加永久路由” 删除当前的路由 0.0.0.0 是上面查出的网络地址 route delete 0.0.0.0内网IP信息 添加永久…

使用WebDriver采样器将JMeter与Selenium集成

目录 第一步&#xff1a;在JMeter中添加Selenium / WebDriver插件 第二步&#xff1a;创建一条测试计划--添加线程组 第三步&#xff1a;下载 chromedriver.exe 第四步&#xff1a;在Web Driver 采样器中添加测试脚本 第五步&#xff1a;运行并且验证 注意&#xff1a; 第…

汽车数据安全事件频发,用户如何保护隐私信息?

面对日益增多的汽车数据安全事件&#xff0c;对于广大用户来说&#xff0c;有没有既廉价又安全的解决方案&#xff1f; 频发的汽车数据安全事件 随着汽车“新四化”大潮的来临&#xff0c;汽车用户从电动化、网联化、智能化、共享化中切实体验到了越来越多的便利&#xff0c;各…

云HIS-医院信息化的核心

基于云计算技术的 B/S 架构的 HIS 系统&#xff0c;为基层医疗机构提供标准化的、信息化的、可共享的医疗信息管理系统&#xff0c;实现医患事务管理和临床诊疗管理等标准医疗管理信息系统的功能。系统利用云计算平台的技术优势&#xff0c;建立统一的健康档案存储平台&#xf…