From 5259283cf7f0a70688e438e40de8a786eeb3c368 Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期六, 02 九月 2023 14:59:46 +0800
Subject: [PATCH] 优化

---
 lib/mediamtx/mediamtx.yml |   49 ++++++++++++++++++++++++++++++++-----------------
 1 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/lib/mediamtx/mediamtx.yml b/lib/mediamtx/mediamtx.yml
index c26403a..9598640 100644
--- a/lib/mediamtx/mediamtx.yml
+++ b/lib/mediamtx/mediamtx.yml
@@ -64,8 +64,8 @@
 ###############################################
 # RTSP parameters
 
-# Disable support for the RTSP protocol.
-rtspDisable: no
+# Enable support for the RTSP protocol.
+rtsp: yes
 # List of enabled RTSP transport protocols.
 # UDP is the most performant, but doesn't work when there's a NAT/firewall between
 # server and clients, and doesn't support encryption.
@@ -104,8 +104,8 @@
 ###############################################
 # RTMP parameters
 
-# Disable support for the RTMP protocol.
-rtmpDisable: no
+# Enable support for the RTMP protocol.
+rtmp: yes
 # Address of the RTMP listener. This is needed only when encryption is "no" or "optional".
 rtmpAddress: :1935
 # Encrypt connections with TLS (RTMPS).
@@ -124,8 +124,8 @@
 ###############################################
 # HLS parameters
 
-# Disable support for the HLS protocol.
-hlsDisable: yes
+# Enable support for the HLS protocol.
+hls: no
 # Address of the HLS listener.
 hlsAddress: :8888
 # Enable TLS/HTTPS on the HLS server.
@@ -180,8 +180,8 @@
 ###############################################
 # WebRTC parameters
 
-# Disable support for the WebRTC protocol.
-webrtcDisable: no
+# Enable support for the WebRTC protocol.
+webrtc: yes
 # Address of the WebRTC listener.
 webrtcAddress: :8889
 # Enable TLS/HTTPS on the WebRTC server.
@@ -206,7 +206,7 @@
   # STUN servers are used to obtain the public IP of server and clients. They are
   # needed when server and clients are on different LANs.
   # TURN/TURNS servers are needed when a direct connection between server and
-  # clients is not possible. All traffic is routed through them.
+  # clients is not possible. All traffic is routed through them. stun:stun.l.google.com:19302
 - url: stun:stun.l.google.com:19302
   # if user is "AUTH_SECRET", then authentication is secret based.
   # the secret must be inserted into the password field.
@@ -227,25 +227,36 @@
 webrtcICETCPMuxAddress:
 
 ###############################################
+# SRT parameters
+
+# Enables support for the SRT protocol.
+srt: yes
+# Address of the SRT listener.
+srtAddress: :8890
+
+###############################################
 # Path parameters
 
 # These settings are path-dependent, and the map key is the name of the path.
-# It's possible to use regular expressions by using a tilde as prefix.
-# For example, "~^(test1|test2)$" will match both "test1" and "test2".
-# For example, "~^prefix" will match all paths that start with "prefix".
-# The settings under the path "all" are applied to all paths that do not match
+# It's possible to use regular expressions by using a tilde as prefix,
+# for example "~^(test1|test2)$" will match both "test1" and "test2",
+# for example "~^prefix" will match all paths that start with "prefix".
+# Settings under the path "all" are applied to all paths that do not match
 # another entry.
 paths:
   all:
     # Source of the stream. This can be:
-    # * publisher -> the stream is published by a RTSP or RTMP client
+    # * publisher -> the stream is published by a RTSP, RTMP, WebRTC or SRT client
     # * rtsp://existing-url -> the stream is pulled from another RTSP server / camera
     # * rtsps://existing-url -> the stream is pulled from another RTSP server / camera with RTSPS
     # * rtmp://existing-url -> the stream is pulled from another RTMP server / camera
     # * rtmps://existing-url -> the stream is pulled from another RTMP server / camera with RTMPS
     # * http://existing-url/stream.m3u8 -> the stream is pulled from another HLS server
     # * https://existing-url/stream.m3u8 -> the stream is pulled from another HLS server with HTTPS
-    # * udp://ip:port -> the stream is pulled from UDP, by listening on the specified IP and port
+    # * udp://ip:port -> the stream is pulled with UDP, by listening on the specified IP and port
+    # * srt://existing-url -> the stream is pulled from another SRT server
+    # * whep://existing-url -> the stream is pulled from another WebRTC server
+    # * wheps://existing-url -> the stream is pulled from another WebRTC server with HTTPS
     # * redirect -> the stream is provided by another path or server
     # * rpiCamera -> the stream is provided by a Raspberry Pi Camera
     source: publisher
@@ -268,6 +279,8 @@
     # If sourceOnDemand is "yes", the source will be closed when there are no
     # readers connected and this amount of time has passed.
     sourceOnDemandCloseAfter: 10s
+    # Maximum number of readers. Zero means no limit.
+    maxReaders: 0
 
     ###############################################
     # Authentication path parameters
@@ -293,8 +306,8 @@
     ###############################################
     # Publisher path parameters (when source is "publisher")
 
-    # do not allow another client to disconnect the current publisher and publish in its place.
-    disablePublisherOverride: no
+    # allow another client to disconnect the current publisher and publish in its place.
+    overridePublisher: yes
     # if no one is publishing, redirect readers to this path.
     # It can be can be a relative path  (i.e. /otherstream) or an absolute RTSP URL.
     fallback:
@@ -366,6 +379,8 @@
     rpiCameraEV: 0
     # Region of interest, in format x,y,width,height
     rpiCameraROI:
+    # whether to enable HDR on Raspberry Camera 3.
+    rpiCameraHDR: false
     # tuning file
     rpiCameraTuningFile:
     # sensor mode, in format [width]:[height]:[bit-depth]:[packing]

--
Gitblit v1.9.3