From 38c3d9f1a7ebd382dd1bbfe28c879bf8cd26af16 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 2 Sep 2022 22:11:41 +0800 Subject: [PATCH] Config: Refine config file, nothing changed. --- trunk/conf/full.conf | 739 ++++++++++++++++++++++--------------------- 1 file changed, 374 insertions(+), 365 deletions(-) diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 7f02b7e2b..56afd5c27 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -1,28 +1,19 @@ -# all config for srs +# All configurations for SRS, you can find whatever you want about configuration of SRS. +# Note that please never use this file as configuration of SRS, because it's just a full set of configurations. +############################################################################################# +# Global sections +############################################################################################# # The id of server, for stat and api identification. # Note that SRS will generate a random id if not configured. # Overwrite by env SRS_SERVER_ID server_id srs-ie193id; -############################################################################################# -# RTMP sections -############################################################################################# -# the rtmp listen ports, split by space, each listen entry is <[ip:]port> -# 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; # The pid file to write the pid, for managing the SRS process and avoiding duplicated processes. # If need to run multiple processes, please change this pid file to another one. # Note: Do not support reloading, for SRS5+ # 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 support it and it can improve -# performance about 10%. -# default: 60000 -chunk_size 60000; # the log dir for FFMPEG. # if enabled ffmpeg, each transcoding stream will create a log file. # /dev/null to disable the log. @@ -76,7 +67,7 @@ pithy_print_ms 10000; # default: ./ work_dir ./; # whether quit when parent process changed, -# used for supervisor mode(not daemon), srs should always quit when +# used for supervisor mode(not daemon), srs should always quit when # supervisor process exited. # @remark conflict with daemon, error when both daemon and asprocess are on. # @reamrk do not support reload. @@ -119,6 +110,374 @@ inotify_auto_reload off; # default: on auto_reload_for_docker on; +############################################################################################# +# RTMP sections +############################################################################################# +# the rtmp listen ports, split by space, each listen entry is <[ip:]port> +# 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; +# the default chunk size is 128, max is 65536, +# some client does not support chunk size change, +# however, most clients support it and it can improve +# performance about 10%. +# default: 60000 +chunk_size 60000; + +############################################################################################# +# HTTP sections +############################################################################################# +# api of srs. +# the http api config, export for external program to manage srs. +# user can access http api of srs in browser directly, for instance, to access by: +# curl http://192.168.1.170:1985/api/v1/reload +# which will reload srs, like cmd killall -1 srs, but the js can also invoke the http api, +# where the cli can only be used in shell/terminate. +http_api { + # whether http api is enabled. + # default: off + enabled on; + # The http api 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. + # Note that you're able to use a dedicated port for HTTP API, such as 1985, to be different with HTTP server. In + # this situation, you you must also set another HTTPS API port. + # Default: 1985 + listen 8080; + # whether enable crossdomain request. + # default: on + crossdomain on; + # the HTTP RAW API is more powerful api to change srs state and reload. + raw_api { + # whether enable the HTTP RAW API. + # default: off + enabled off; + # whether enable rpc reload. + # default: off + allow_reload off; + # whether enable rpc query. + # Always off by https://github.com/ossrs/srs/issues/2653 + #allow_query off; + # whether enable rpc update. + # Always off by https://github.com/ossrs/srs/issues/2653 + #allow_update off; + } + # For https_api or HTTPS API. + https { + # Whether enable HTTPS API. + # default: off + enabled on; + # The listen endpoint for HTTPS API. + # Note that you're able to use a dedicated port for HTTPS API, such as 1990, and the HTTP API should not be + # the same of HTTP server(8080) neither. + # Default: 1990 + listen 8088; + # The SSL private key file, generated by: + # openssl genrsa -out server.key 2048 + # 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" + # default: ./conf/server.crt + cert ./conf/server.crt; + } +} +# 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 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 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. + # 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. + # default: 8080 + listen 8080; + # the default dir for http root. + # default: ./objs/nginx/html + dir ./objs/nginx/html; + # whether enable crossdomain request. + # for both http static and stream server and apply on all vhosts. + # default: on + crossdomain on; + # For https_server or HTTPS Streaming. + https { + # Whether enable HTTPS Streaming. + # default: off + enabled on; + # The listen endpoint for HTTPS Streaming. + # default: 8088 + listen 8088; + # The SSL private key file, generated by: + # openssl genrsa -out server.key 2048 + # 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" + # default: ./conf/server.crt + cert ./conf/server.crt; + } +} + +############################################################################################# +# SRT server section +############################################################################################# +# @doc https://github.com/ossrs/srs/issues/1147#usage +srt_server { + # whether SRT server is enabled. + # default: off + enabled on; + # The UDP listen port for SRT. + listen 10080; + # For detail parameters, please read wiki: + # @see https://ossrs.net/lts/zh-cn/docs/v5/doc/srt-params + # @see https://ossrs.io/lts/en-us/docs/v5/doc/srt-params + # The maxbw is the max bandwidth of the sender side. + # -1: Means the biggest bandwidth is infinity. + # 0: Means the bandwidth is determined by SRTO_INPUTBW. + # >0: Means the bandwidth is the configuration value. + # default: -1 + maxbw 1000000000; + # The timeout time of the SRT connection on the sender side in ms. When SRT connects to a peer costs time + # more than this config, it will be close. + # default: 3000 + connect_timeout 4000; + # The timeout time of SRT connection on the receiver side in ms. When the SRT connection is idle + # more than this config, it will be close. + # default: 10000 + peer_idle_timeout 8000; + # Default app for vmix, see https://github.com/ossrs/srs/pull/1615 + # default: live + default_app live; + # The peerlatency is set by the sender side and will notify the receiver side. + # default: 0 + peerlatency 0; + # The recvlatency means latency from sender to receiver. + # default: 120 + recvlatency 0; + # This latency configuration configures both recvlatency and peerlatency to the same value. + # default: 120 + latency 0; + # The tsbpd mode means timestamp based packet delivery. + # SRT sender side will pack timestamp in each packet. If this config is true, + # the receiver will read the packet according to the timestamp in the head of the packet. + # default: on + tsbpdmode off; + # The tlpkdrop means too-late Packet Drop + # SRT sender side will pack timestamp in each packet, When the network is congested, + # the packet will drop if latency is bigger than the configuration in both sender side and receiver side. + # And on the sender side, it also will be dropped because latency is bigger than configuration. + # default: on + tlpktdrop off; + # The send buffer size of SRT. + # default: 8192 * (1500-28) + sendbuf 2000000; + # The recv buffer size of SRT. + # default: 8192 * (1500-28) + recvbuf 2000000; +} + +vhost srt.vhost.srs.com { + srt { + enabled on; + srt_to_rtmp on; + } +} + +############################################################################################# +# WebRTC server section +############################################################################################# +rtc_server { + # Whether enable WebRTC server. + # default: off + enabled on; + # The udp listen port, we will reuse it for connections. + # default: 8000 + listen 8000; + # 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 + # default: * + candidate *; + # If candidate is * or 0.0.0.0, means SRS could detect IP automatically, filtered by ip_family. + # You can config this to off to disable the detecting, then SRS will try to parse the API hostname. + # Note that browser might fail if no CANDIDATE specified. + # Default: on + use_auto_detect_network_ip on; + # The IP family filter for auto discover candidate, it can be: + # ipv4 Filter IP v4 candidates. + # ipv6 Filter IP v6 candidates. + # all Filter all IP v4 or v6 candidates. + # For example, if set to ipv4, we only use the IPv4 address as candidate. + # default: ipv4 + ip_family ipv4; + # If api_as_candidates is on, SRS would try to use the IP of api server, specified by srs.sdk.js request: + # api:string "http://r.ossrs.net:1985/rtc/v1/play/" + # in this case, the r.ossrs.net and 39.107.238.185 will be added as candidates. + # Default: on + api_as_candidates on; + # If use api as CANDIDATE, whether resolve the api hostname. + # Note that use original domain name as CANDIDATE, which might make Firefox failed, see https://bugzilla.mozilla.org/show_bug.cgi?id=1239006 + # Note that if hostname is IPv4 address, always directly use it. + # Default: on + resolve_api_domain on; + # If use api as CANDIDATE, whether keep original api domain name as CANDIDATE. + # Note that use original domain name as CANDIDATE, which might make Firefox failed, see https://bugzilla.mozilla.org/show_bug.cgi?id=1239006 + # Default: off + keep_api_domain off; + # Whether use ECDSA certificate. + # If not, use RSA certificate. + # default: on + ecdsa on; + # Whether encrypt RTP packet by SRTP. + # @remark Should always turn it on, or Chrome will fail. + # default: on + encrypt on; + # We listen multiple times at the same port, by REUSEPORT, to increase the UDP queue. + # Note that you can set to 1 and increase the system UDP buffer size by net.core.rmem_max + # and net.core.rmem_default or just increase this to get larger UDP recv and send buffer. + # default: 1 + reuseport 1; + # Whether merge multiple NALUs into one. + # @see https://github.com/ossrs/srs/issues/307#issuecomment-612806318 + # default: off + merge_nalus off; + # The black-hole to copy packet to, for debugging. + # For example, when debugging Chrome publish stream, the received packets are encrypted cipher, + # we can set the publisher black-hole, SRS will copy the plaintext packets to black-hole, and + # we are able to capture the plaintext packets by wireshark. + black_hole { + # Whether enable the black-hole. + # default: off + enabled off; + # The black-hole address for session. + addr 127.0.0.1:10000; + } +} + +vhost rtc.vhost.srs.com { + rtc { + # Whether enable WebRTC server. + # default: off + enabled on; + # Whether support NACK. + # default: on + nack on; + # Whether directly use the packet, avoid copy. + # default: on + nack_no_copy on; + # Whether support TWCC. + # default: on + twcc on; + # The timeout in seconds for session timeout. + # Client will send ping(STUN binding request) to server, we use it as heartbeat. + # default: 30 + stun_timeout 30; + # The strict check when process stun. + # default: off + stun_strict_check on; + # The role of dtls when peer is actpass: passive or active + # default: passive + dtls_role passive; + # The version of dtls, support dtls1.0, dtls1.2, and auto + # default: auto + dtls_version auto; + # Drop the packet with the pt(payload type), 0 never drop. + # default: 0 + drop_for_pt 0; + ############################################################### + # Whether enable transmuxing RTMP to RTC. + # If enabled, transcode aac to opus. + # default: off + rtmp_to_rtc off; + # Whether keep B-frame, which is normal feature in live streaming, + # but usually disabled in RTC. + # default: off + keep_bframe off; + ############################################################### + # Whether enable transmuxing RTC to RTMP. + # Default: off + rtc_to_rtmp off; + # The PLI interval in seconds, for RTC to RTMP. + # Note the available range is [0.5, 30] + # Default: 6.0 + pli_for_rtmp 6.0; + } + ############################################################### + # For transmuxing RTMP to RTC, it will impact the default values if RTC is on. + # Whether enable min delay mode for vhost. + # default: on, for RTC. + min_latency on; + play { + # set the MW(merged-write) latency in ms. + # @remark For WebRTC, we enable pass-by-timestamp mode, so we ignore this config. + # default: 0 (For WebRTC) + mw_latency 0; + # Set the MW(merged-write) min messages. + # default: 0 (For Real-Time, that is min_latency on) + # default: 1 (For WebRTC, that is min_latency off) + mw_msgs 0; + } +} + +############################################################################################# +# Streamer sections +############################################################################################# +# the streamer cast stream from other protocol to SRS over RTMP. +# @see https://github.com/ossrs/srs/tree/develop#stream-architecture + +# MPEGTS over UDP +stream_caster { + # whether stream caster is enabled. + # default: off + enabled on; + # the caster type of stream, the casters: + # mpegts_over_udp, MPEG-TS over UDP caster. + caster mpegts_over_udp; + # the output rtmp url. + # for mpegts_over_udp caster, the typically output url: + # rtmp://127.0.0.1/live/livestream + output rtmp://127.0.0.1/live/livestream; + # the listen port for stream caster. + # for mpegts_over_udp caster, listen at udp port. for example, 8935. + listen 8935; +} + +# FLV +stream_caster { + # whether stream caster is enabled. + # default: off + enabled on; + # the caster type of stream, the casters: + # flv, FLV over HTTP by POST. + caster flv; + # the output rtmp url. + # for flv caster, the typically output url: + # rtmp://127.0.0.1/[app]/[stream] + # for example, POST to url: + # http://127.0.0.1:8936/live/livestream.flv + # where the [app] is "live" and [stream] is "livestream", output is: + # rtmp://127.0.0.1/live/livestream + output rtmp://127.0.0.1/[app]/[stream]; + # the listen port for stream caster. + # for flv caster, listen at tcp port. for example, 8936. + listen 8936; +} + +############################################################################################# +# other global sections +############################################################################################# # For tcmalloc, the release rate. # @see https://gperftools.github.io/gperftools/tcmalloc.html # @remark Should run configure --with-gperf @@ -278,356 +637,6 @@ stats { disk sda sdb xvda xvdb; } -############################################################################################# -# HTTP sections -############################################################################################# -# api of srs. -# the http api config, export for external program to manage srs. -# user can access http api of srs in browser directly, for instance, to access by: -# curl http://192.168.1.170:1985/api/v1/reload -# which will reload srs, like cmd killall -1 srs, but the js can also invoke the http api, -# where the cli can only be used in shell/terminate. -http_api { - # whether http api is enabled. - # default: off - enabled on; - # The http api 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. - # Note that you're able to use a dedicated port for HTTP API, such as 1985, to be different with HTTP server. In - # this situation, you you must also set another HTTPS API port. - # Default: 1985 - listen 8080; - # whether enable crossdomain request. - # default: on - crossdomain on; - # the HTTP RAW API is more powerful api to change srs state and reload. - raw_api { - # whether enable the HTTP RAW API. - # default: off - enabled off; - # whether enable rpc reload. - # default: off - allow_reload off; - # whether enable rpc query. - # Always off by https://github.com/ossrs/srs/issues/2653 - #allow_query off; - # whether enable rpc update. - # Always off by https://github.com/ossrs/srs/issues/2653 - #allow_update off; - } - # For https_api or HTTPS API. - https { - # Whether enable HTTPS API. - # default: off - enabled on; - # The listen endpoint for HTTPS API. - # Note that you're able to use a dedicated port for HTTPS API, such as 1990, and the HTTP API should not be - # the same of HTTP server(8080) neither. - # Default: 1990 - listen 8088; - # The SSL private key file, generated by: - # openssl genrsa -out server.key 2048 - # 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" - # default: ./conf/server.crt - cert ./conf/server.crt; - } -} -# 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 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 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. - # 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. - # default: 8080 - listen 8080; - # the default dir for http root. - # default: ./objs/nginx/html - dir ./objs/nginx/html; - # whether enable crossdomain request. - # for both http static and stream server and apply on all vhosts. - # default: on - crossdomain on; - # For https_server or HTTPS Streaming. - https { - # Whether enable HTTPS Streaming. - # default: off - enabled on; - # The listen endpoint for HTTPS Streaming. - # default: 8088 - listen 8088; - # The SSL private key file, generated by: - # openssl genrsa -out server.key 2048 - # 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" - # default: ./conf/server.crt - cert ./conf/server.crt; - } -} - -############################################################################################# -# Streamer sections -############################################################################################# -# the streamer cast stream from other protocol to SRS over RTMP. -# @see https://github.com/ossrs/srs/tree/develop#stream-architecture - -# MPEGTS over UDP -stream_caster { - # whether stream caster is enabled. - # default: off - enabled on; - # the caster type of stream, the casters: - # mpegts_over_udp, MPEG-TS over UDP caster. - caster mpegts_over_udp; - # the output rtmp url. - # for mpegts_over_udp caster, the typically output url: - # rtmp://127.0.0.1/live/livestream - output rtmp://127.0.0.1/live/livestream; - # the listen port for stream caster. - # for mpegts_over_udp caster, listen at udp port. for example, 8935. - listen 8935; -} - -# FLV -stream_caster { - # whether stream caster is enabled. - # default: off - enabled on; - # the caster type of stream, the casters: - # flv, FLV over HTTP by POST. - caster flv; - # the output rtmp url. - # for flv caster, the typically output url: - # rtmp://127.0.0.1/[app]/[stream] - # for example, POST to url: - # http://127.0.0.1:8936/live/livestream.flv - # where the [app] is "live" and [stream] is "livestream", output is: - # rtmp://127.0.0.1/live/livestream - output rtmp://127.0.0.1/[app]/[stream]; - # the listen port for stream caster. - # for flv caster, listen at tcp port. for example, 8936. - listen 8936; -} - -############################################################################################# -# SRT server section -############################################################################################# -# @doc https://github.com/ossrs/srs/issues/1147#usage -srt_server { - # whether SRT server is enabled. - # default: off - enabled on; - # The UDP listen port for SRT. - listen 10080; - # For detail parameters, please read wiki: - # @see https://ossrs.net/lts/zh-cn/docs/v5/doc/srt-params - # @see https://ossrs.io/lts/en-us/docs/v5/doc/srt-params - # The maxbw is the max bandwidth of the sender side. - # -1: Means the biggest bandwidth is infinity. - # 0: Means the bandwidth is determined by SRTO_INPUTBW. - # >0: Means the bandwidth is the configuration value. - # default: -1 - maxbw 1000000000; - # The timeout time of the SRT connection on the sender side in ms. When SRT connects to a peer costs time - # more than this config, it will be close. - # default: 3000 - connect_timeout 4000; - # The timeout time of SRT connection on the receiver side in ms. When the SRT connection is idle - # more than this config, it will be close. - # default: 10000 - peer_idle_timeout 8000; - # Default app for vmix, see https://github.com/ossrs/srs/pull/1615 - # default: live - default_app live; - # The peerlatency is set by the sender side and will notify the receiver side. - # default: 0 - peerlatency 0; - # The recvlatency means latency from sender to receiver. - # default: 120 - recvlatency 0; - # This latency configuration configures both recvlatency and peerlatency to the same value. - # default: 120 - latency 0; - # The tsbpd mode means timestamp based packet delivery. - # SRT sender side will pack timestamp in each packet. If this config is true, - # the receiver will read the packet according to the timestamp in the head of the packet. - # default: on - tsbpdmode off; - # The tlpkdrop means too-late Packet Drop - # SRT sender side will pack timestamp in each packet, When the network is congested, - # the packet will drop if latency is bigger than the configuration in both sender side and receiver side. - # And on the sender side, it also will be dropped because latency is bigger than configuration. - # default: on - tlpktdrop off; - # The send buffer size of SRT. - # default: 8192 * (1500-28) - sendbuf 2000000; - # The recv buffer size of SRT. - # default: 8192 * (1500-28) - recvbuf 2000000; -} - -vhost srt.vhost.srs.com { - srt { - enabled on; - srt_to_rtmp on; - } -} - -############################################################################################# -# WebRTC server section -############################################################################################# -rtc_server { - # Whether enable WebRTC server. - # default: off - enabled on; - # The udp listen port, we will reuse it for connections. - # default: 8000 - listen 8000; - # 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 - # default: * - candidate *; - # If api_as_candidates is on, SRS would try to use the IP of api server, specified by srs.sdk.js request: - # api:string "http://r.ossrs.net:1985/rtc/v1/play/" - # in this case, the r.ossrs.net and 39.107.238.185 will be added as candidates. - # Default: on - api_as_candidates on; - # If use api as CANDIDATE, whether resolve the api hostname. - # Note that use original domain name as CANDIDATE, which might make Firefox failed, see https://bugzilla.mozilla.org/show_bug.cgi?id=1239006 - # Note that if hostname is IPv4 address, always directly use it. - # Default: on - resolve_api_domain on; - # If use api as CANDIDATE, whether keep original api domain name as CANDIDATE. - # Note that use original domain name as CANDIDATE, which might make Firefox failed, see https://bugzilla.mozilla.org/show_bug.cgi?id=1239006 - # Default: off - keep_api_domain off; - # Whether use network interface IP which is detected automatically, filtered by ip_family. - # Note that browser might fail if no CANDIDATE specified. - # Default: on - use_auto_detect_network_ip on; - # The IP family filter for auto discover candidate, it can be: - # ipv4 Filter IP v4 candidates. - # ipv6 Filter IP v6 candidates. - # all Filter all IP v4 or v6 candidates. - # For example, if set to ipv4, we only use the IPv4 address as candidate. - # default: ipv4 - ip_family ipv4; - # Whether use ECDSA certificate. - # If not, use RSA certificate. - # default: on - ecdsa on; - # Whether encrypt RTP packet by SRTP. - # @remark Should always turn it on, or Chrome will fail. - # default: on - encrypt on; - # We listen multiple times at the same port, by REUSEPORT, to increase the UDP queue. - # Note that you can set to 1 and increase the system UDP buffer size by net.core.rmem_max - # and net.core.rmem_default or just increase this to get larger UDP recv and send buffer. - # default: 1 - reuseport 1; - # Whether merge multiple NALUs into one. - # @see https://github.com/ossrs/srs/issues/307#issuecomment-612806318 - # default: off - merge_nalus off; - # The black-hole to copy packet to, for debugging. - # For example, when debugging Chrome publish stream, the received packets are encrypted cipher, - # we can set the publisher black-hole, SRS will copy the plaintext packets to black-hole, and - # we are able to capture the plaintext packets by wireshark. - black_hole { - # Whether enable the black-hole. - # default: off - enabled off; - # The black-hole address for session. - addr 127.0.0.1:10000; - } -} - -vhost rtc.vhost.srs.com { - rtc { - # Whether enable WebRTC server. - # default: off - enabled on; - # Whether support NACK. - # default: on - nack on; - # Whether directly use the packet, avoid copy. - # default: on - nack_no_copy on; - # Whether support TWCC. - # default: on - twcc on; - # The timeout in seconds for session timeout. - # Client will send ping(STUN binding request) to server, we use it as heartbeat. - # default: 30 - stun_timeout 30; - # The strict check when process stun. - # default: off - stun_strict_check on; - # The role of dtls when peer is actpass: passive or active - # default: passive - dtls_role passive; - # The version of dtls, support dtls1.0, dtls1.2, and auto - # default: auto - dtls_version auto; - # Drop the packet with the pt(payload type), 0 never drop. - # default: 0 - drop_for_pt 0; - ############################################################### - # Whether enable transmuxing RTMP to RTC. - # If enabled, transcode aac to opus. - # default: off - rtmp_to_rtc off; - # Whether keep B-frame, which is normal feature in live streaming, - # but usually disabled in RTC. - # default: off - keep_bframe off; - ############################################################### - # Whether enable transmuxing RTC to RTMP. - # Default: off - rtc_to_rtmp off; - # The PLI interval in seconds, for RTC to RTMP. - # Note the available range is [0.5, 30] - # Default: 6.0 - pli_for_rtmp 6.0; - } - ############################################################### - # For transmuxing RTMP to RTC, it will impact the default values if RTC is on. - # Whether enable min delay mode for vhost. - # default: on, for RTC. - min_latency on; - play { - # set the MW(merged-write) latency in ms. - # @remark For WebRTC, we enable pass-by-timestamp mode, so we ignore this config. - # default: 0 (For WebRTC) - mw_latency 0; - # Set the MW(merged-write) min messages. - # default: 0 (For Real-Time, that is min_latency on) - # default: 1 (For WebRTC, that is min_latency off) - mw_msgs 0; - } -} - ############################################################################################# # RTMP/HTTP VHOST sections #############################################################################################