bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
12.44k stars 1.54k forks source link

RTMP, RTSP, and HLS all fail after several hours #3972

Open austindetzel opened 3 days ago

austindetzel commented 3 days ago

Which version are you using?

bluenviron/mediamtx:latest-ffmpeg 1.9.3

Which operating system are you using?

Linux amd64 Docker

Describe how to replicate the issue

We have 24 cameras streaming both hd and sd so a total of 48 video streams. We are feeding the video in VIA rtsp from a go2rtc instance and serving RTSP, RTMP, and HLS. After the server has been running for several hours some video feeds fail to deliver anymore, if we use the go2rtc stream it still works there. These cameras may have brief network issues as they are remote, but I feel that mediamtx should be able to recover from this. MediaMTX is not giving any specific information on why these may be "freezing" and no longer delivering the video. The cameras are h264 (except one) and the config does have some offline cameras.

Server logs

I redacted, the names, but here is the majority of what is going on on our server.

2024/11/22 07:54:40 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:40 ERR [path redacted-sd] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:41 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:41 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:41 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:42 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:42 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:42 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:42 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:42 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:42 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:42 ERR [HLS] [muxer redacted] muxer error: unable to extract DTS: too many reordered frames (23) 2024/11/22 07:54:43 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:43 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:43 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:43 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:43 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:44 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:44 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:44 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:44 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:44 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:45 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:45 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:45 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:45 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:46 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:46 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:47 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:47 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:47 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:48 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:48 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:48 ERR [path redacted-sd] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:48 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:49 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:49 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:49 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:50 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:50 ERR [HLS] [muxer redacted] the MPEG-TS variant of HLS supports H264 video only 2024/11/22 07:54:50 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:50 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:51 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:51 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:51 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:51 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:52 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:52 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:52 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:52 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:52 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found) 2024/11/22 07:54:52 INF [HLS] [muxer redacted] is converting into HLS, 2 tracks (H264, MPEG-4 Audio) 2024/11/22 07:54:52 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:52 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:53 WAR [path redacted] [RTSP source] received packet with wrong SSRC 682637193, expected 1934597805 2024/11/22 07:54:54 WAR [path redacted] [RTSP source] received packet with wrong SSRC 752134334, expected 2055028100 2024/11/22 07:54:54 WAR [path redacted] [RTSP source] received packet with wrong SSRC 1319712975, expected 2093518274 2024/11/22 07:54:54 ERR [path redacted] [RTSP source] bad status code: 404 (Not Found)

Network dump

Attached is the link to the pcap on the server the video is all sent trough Wireguard. We don't seem to have any type of networking issues going out.

https://nextcloud.814server.com/s/pSpHwjHKD3Sf9p3

austindetzel commented 3 days ago

Here is our config


# Global settings

# Settings in this section are applied anywhere.

###############################################
# Global settings -> General

# Verbosity of the program; available values are "error", "warn", "info", "debug".
logLevel: info
# Destinations of log messages; available values are "stdout", "file" and "syslog".
logDestinations: [stdout]
# If "file" is in logDestinations, this is the file which will receive the logs.
logFile: mediamtx.log

# Timeout of read operations.
readTimeout: 5s
# Timeout of write operations.
writeTimeout: 5s
#reconnect: yes
# Size of the queue of outgoing packets.
# A higher value allows to increase throughput, a lower value allows to save RAM.
writeQueueSize: 16384
# Maximum size of outgoing UDP packets.
# This can be decreased to avoid fragmentation on networks with a low UDP MTU.
udpMaxPayloadSize: 1472

# HTTP URL to perform external authentication.
# Every time a user wants to authenticate, the server calls this URL
# with the POST method and a body containing:
# {
#   "ip": "ip",
#   "user": "user",
#   "password": "password",
#   "path": "path",
#   "protocol": "rtsp|rtmp|hls|webrtc",
#   "id": "id",
#   "action": "read|publish",
#   "query": "query"
# }
# If the response code is 20x, authentication is accepted, otherwise
# it is discarded.
authMethod: http
authHTTPAddress: http://redacted:3000/external/streamAuth
authHTTPExclude:
  - protocol: hls

# Enable Prometheus-compatible metrics.
metrics: no
# Address of the metrics listener.
metricsAddress: localhost:9998

# Enable pprof-compatible endpoint to monitor performances.
pprof: no
# Address of the pprof listener.
pprofAddress: localhost:9999

# Command to run when a client connects to the server.
# This is terminated with SIGINT when a client disconnects from the server.
  # The following environment variables are available:
# * RTSP_PORT: RTSP server port
# * MTX_CONN_TYPE: connection type
# * MTX_CONN_ID: connection ID
runOnConnect:
# Restart the command if it exits.
runOnConnectRestart: no
# Command to run when a client disconnects from the server.
# Environment variables are the same of runOnConnect.
runOnDisconnect:

###############################################
# Global settings -> API

# Enable controlling the server through the API.
api: false
# Address of the API listener.
apiAddress: 165.227.127.47:9997

###############################################
# Global settings -> RTSP server

# Enable publishing and reading streams with 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.
# UDP-multicast allows to save bandwidth when clients are all in the same LAN.
# TCP is the most versatile, and does support encryption.
# The handshake is always performed with TCP.
protocols: [udp, multicast, tcp]
# Encrypt handshakes and TCP streams with TLS (RTSPS).
# Available values are "no", "strict", "optional".
encryption: "no"
# Address of the TCP/RTSP listener. This is needed only when encryption is "no" or "optional".
rtspAddress: :8554
# Address of the TCP/TLS/RTSPS listener. This is needed only when encryption is "strict" or "optional".
rtspsAddress: :8322
# Address of the UDP/RTP listener. This is needed only when "udp" is in protocols.
rtpAddress: :8000
# Address of the UDP/RTCP listener. This is needed only when "udp" is in protocols.
rtcpAddress: :8001
# IP range of all UDP-multicast listeners. This is needed only when "multicast" is in protocols.
multicastIPRange: 224.1.0.0/16
# Port of all UDP-multicast/RTP listeners. This is needed only when "multicast" is in protocols.
multicastRTPPort: 8002
# Port of all UDP-multicast/RTCP listeners. This is needed only when "multicast" is in protocols.
multicastRTCPPort: 8003
# Path to the server key. This is needed only when encryption is "strict" or "optional".
# This can be generated with:
# openssl genrsa -out server.key 2048
# openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650
serverKey: server.key
# Path to the server certificate. This is needed only when encryption is "strict" or "optional".
serverCert: server.crt
# Authentication methods. Available are "basic" and "digest".
# "digest" doesn't provide any additional security and is available for compatibility reasons only.
authMethods: [basic]

#readTimeout: 10s          # Adjust to the desired read timeout
#writeTimeout: 10s         # Adjust to the desired write timeout
#reconnect: yes            # Enable reconnection on disconnection
###############################################
# Global settings -> RTMP server

# Enable publishing and reading streams with 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).
# Available values are "no", "strict", "optional".
rtmpEncryption: "no"
# Address of the RTMPS listener. This is needed only when encryption is "strict" or "optional".
rtmpsAddress: :1936
# Path to the server key. This is needed only when encryption is "strict" or "optional".
# This can be generated with:
# openssl genrsa -out server.key 2048
# openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650
rtmpServerKey: server.key
# Path to the server certificate. This is needed only when encryption is "strict" or "optional".
rtmpServerCert: server.crt

###############################################
# Global settings -> HLS server

# Enable reading streams with the HLS protocol.
hls: yes
# Address of the HLS listener.
hlsAddress: :8888
# Enable TLS/HTTPS on the HLS server.
# This is required for Low-Latency HLS.
hlsEncryption: no
# Path to the server key. This is needed only when encryption is yes.
# This can be generated with:
# openssl genrsa -out server.key 2048
# openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650
hlsServerKey: server.key
# Path to the server certificate.
hlsServerCert: server.crt
# By default, HLS is generated only when requested by a user.
# This option allows to generate it always, avoiding the delay between request and generation.
hlsAlwaysRemux: yes
# Variant of the HLS protocol to use. Available options are:
# * mpegts - uses MPEG-TS segments, for maximum compatibility.
# * fmp4 - uses fragmented MP4 segments, more efficient.
# * lowLatency - uses Low-Latency HLS.
hlsVariant: mpegts
# Number of HLS segments to keep on the server.
# Segments allow to seek through the stream.
# Their number doesn't influence latency.
hlsSegmentCount: 30
# Minimum duration of each segment.
# A player usually puts 3 segments in a buffer before reproducing the stream.
# The final segment duration is also influenced by the interval between IDR frames,
# since the server changes the duration in order to include at least one IDR frame
# in each segment.
hlsSegmentDuration: 1s
# Minimum duration of each part.
# A player usually puts 3 parts in a buffer before reproducing the stream.
# Parts are used in Low-Latency HLS in place of segments.
# Part duration is influenced by the distance between video/audio samples
# and is adjusted in order to produce segments with a similar duration.
hlsPartDuration: 8000ms
# Maximum size of each segment.
# This prevents RAM exhaustion.
hlsSegmentMaxSize: 50M
# Value of the Access-Control-Allow-Origin header provided in every HTTP response.
# This allows to play the HLS stream from an external website.
hlsAllowOrigin: '*'
# List of IPs or CIDRs of proxies placed before the HLS server.
# If the server receives a request from one of these entries, IP in logs
# will be taken from the X-Forwarded-For header.
hlsTrustedProxies: []
# Directory in which to save segments, instead of keeping them in the RAM.
# This decreases performance, since reading from disk is less performant than
# reading from RAM, but allows to save RAM.
hlsDirectory: ''

###############################################
# Global settings -> WebRTC server

# Enable publishing and reading streams with the WebRTC protocol.
webrtc: yes
# Address of the WebRTC HTTP listener.
webrtcAddress: :8889
# Enable TLS/HTTPS on the WebRTC server.
webrtcEncryption: no
# Path to the server key.
# This can be generated with:
# openssl genrsa -out server.key 2048
# openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650
webrtcServerKey: server.key
# Path to the server certificate.
webrtcServerCert: server.crt
# Value of the Access-Control-Allow-Origin header provided in every HTTP response.
# This allows to play the WebRTC stream from an external website.
webrtcAllowOrigin: '*'
# List of IPs or CIDRs of proxies placed before the WebRTC server.
# If the server receives a request from one of these entries, IP in logs
# will be taken from the X-Forwarded-For header.
webrtcTrustedProxies: []
# Address of a local UDP listener that will receive connections.
# Use a blank string to disable.
webrtcLocalUDPAddress: :8189
# Address of a local TCP listener that will receive connections.
# This is disabled by default since TCP is less efficient than UDP and
# introduces a progressive delay when network is congested.
webrtcLocalTCPAddress: ''
# WebRTC clients need to know the IP of the server.
# Gather IPs from interfaces and send them to clients.
webrtcIPsFromInterfaces: yes
# List of interfaces whose IPs will be sent to clients.
# An empty value means to use all available interfaces.
webrtcIPsFromInterfacesList: []
# List of additional hosts or IPs to send to clients.
webrtcAdditionalHosts: []
# ICE servers. Needed only when local listeners can't be reached by clients.
# STUN servers allows to obtain and share the public IP of the server.
# TURN/TURNS servers forces all traffic through them.
webrtcICEServers2: []
  # - 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.
  # username: ''
  # password: ''

###############################################
# Global settings -> SRT server

# Enable publishing and reading streams with the SRT protocol.
srt: no
# Address of the SRT listener.
srtAddress: :8890

###############################################
# Default path settings

# Settings in "pathDefaults" are applied anywhere,
# unless they are overridden in "paths".
pathDefaults:

  ###############################################
  # Default path settings -> General

  # Source of the stream. This can be:
  # * publisher -> the stream is provided 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 / camera
  # * https://existing-url/stream.m3u8 -> the stream is pulled from another HLS server / camera with HTTPS
  # * 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 / camera
  # * whep://existing-url -> the stream is pulled from another WebRTC server / camera
  # * wheps://existing-url -> the stream is pulled from another WebRTC server / camera with HTTPS
  # * redirect -> the stream is provided by another path or server
  # * rpiCamera -> the stream is provided by a Raspberry Pi Camera
  # If path name is a regular expression, $G1, G2, etc will be replaced
  # with regular expression groups.
  source: publisher
  # If the source is a URL, and the source certificate is self-signed
  # or invalid, you can provide the fingerprint of the certificate in order to
  # validate it anyway. It can be obtained by running:
  # openssl s_client -connect source_ip:source_port </dev/null 2>/dev/null | sed -n '/BEGIN/,/END/p' > server.crt
  # openssl x509 -in server.crt -noout -fingerprint -sha256 | cut -d "=" -f2 | tr -d ':'
  sourceFingerprint:
  # If the source is a URL, it will be pulled only when at least
  # one reader is connected, saving bandwidth.
  sourceOnDemand: no
  # If sourceOnDemand is "yes", readers will be put on hold until the source is
  # ready or until this amount of time has passed.
  sourceOnDemandStartTimeout: 10s
  # 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
  # SRT encryption passphrase require to read from this path
  srtReadPassphrase:
  # If the stream is not available, redirect readers to this path.
  # It can be can be a relative path (i.e. /otherstream) or an absolute RTSP URL.
  fallback:

  ###############################################
  # Default path settings -> Authentication

  # Username required to publish.
  # Hashed values can be inserted with the "argon2:" or "sha256:" prefix.
  publishUser:
  # Password required to publish.
  # Hashed values can be inserted with the "argon2:" or "sha256:" prefix.
  publishPass:
  # IPs or networks (x.x.x.x/24) allowed to publish.
  publishIPs: []

  # Username required to read.
  # Hashed values can be inserted with the "argon2:" or "sha256:" prefix.
  readUser:
  # password required to read.
  # Hashed values can be inserted with the "argon2:" or "sha256:" prefix.
  readPass:
  # IPs or networks (x.x.x.x/24) allowed to read.
  readIPs: []

  ###############################################
  # Default path settings -> Publisher source (when source is "publisher")

  # Allow another client to disconnect the current publisher and publish in its place.
  overridePublisher: yes
  # SRT encryption passphrase required to publish to this path
  srtPublishPassphrase:

  ###############################################
  # Default path settings -> RTSP source (when source is a RTSP or a RTSPS URL)

  # Transport protocol used to pull the stream. available values are "automatic", "udp", "multicast", "tcp".
  rtspTransport: automatic
  # Support sources that don't provide server ports or use random server ports. This is a security issue
  # and must be used only when interacting with sources that require it.
  rtspAnyPort: no
  # Range header to send to the source, in order to start streaming from the specified offset.
  # available values:
  # * clock: Absolute time
  # * npt: Normal Play Time
  # * smpte: SMPTE timestamps relative to the start of the recording
  rtspRangeType:
  # Available values:
  # * clock: UTC ISO 8601 combined date and time string, e.g. 20230812T120000Z
  # * npt: duration such as "300ms", "1.5m" or "2h45m", valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"
  # * smpte: duration such as "300ms", "1.5m" or "2h45m", valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"
  rtspRangeStart:

  ###############################################
  # Default path settings -> Redirect source (when source is "redirect")

  # RTSP URL which clients will be redirected to.
  sourceRedirect:

  ###############################################
  # Default path settings -> Hooks

  # Command to run when this path is initialized.
  # This can be used to publish a stream when the server is launched.
  # This is terminated with SIGINT when the program closes.
  # The following environment variables are available:
  # * MTX_PATH: path name
  # * RTSP_PORT: RTSP server port
  # * G1, G2, ...: regular expression groups, if path name is
  #   a regular expression.
  runOnInit:
  # Restart the command if it exits.
  runOnInitRestart: no

  # Command to run when this path is requested by a reader
  # and no one is publishing to this path yet.
  # This can be used to publish a stream on demand.
  # This is terminated with SIGINT when there are no readers anymore.
  # The following environment variables are available:
  # * MTX_PATH: path name
  # * MTX_QUERY: query parameters (passed by first reader)
  # * RTSP_PORT: RTSP server port
  # * G1, G2, ...: regular expression groups, if path name is
  #   a regular expression.
  runOnDemand:
  # Restart the command if it exits.
  runOnDemandRestart: no
  # Readers will be put on hold until the runOnDemand command starts publishing
  # or until this amount of time has passed.
  runOnDemandStartTimeout: 10s
  # The command will be closed when there are no
  # readers connected and this amount of time has passed.
  runOnDemandCloseAfter: 10s
  # Command to run when there are no readers anymore.
  # Environment variables are the same of runOnDemand.
  runOnUnDemand:

  # Command to run when the stream is ready to be read, whenever it is
  # published by a client or pulled from a server / camera.
  # This is terminated with SIGINT when the stream is not ready anymore.
  # The following environment variables are available:
  # * MTX_PATH: path name
  # * MTX_QUERY: query parameters (passed by publisher)
  # * RTSP_PORT: RTSP server port
  # * G1, G2, ...: regular expression groups, if path name is
  #   a regular expression.
  # * MTX_SOURCE_TYPE: source type
  # * MTX_SOURCE_ID: source ID
  runOnReady:
  # Restart the command if it exits.
  runOnReadyRestart: no
  # Command to run when the stream is not available anymore.
  # Environment variables are the same of runOnReady.
  runOnNotReady:

  # Command to run when a client starts reading.
  # This is terminated with SIGINT when a client stops reading.
  # The following environment variables are available:
  # * MTX_PATH: path name
  # * MTX_QUERY: query parameters (passed by reader)
  # * RTSP_PORT: RTSP server port
  # * G1, G2, ...: regular expression groups, if path name is
  #   a regular expression.
  # * MTX_READER_TYPE: reader type
  # * MTX_READER_ID: reader ID
  runOnRead:
  # Restart the command if it exits.
  runOnReadRestart: no
  # Command to run when a client stops reading.
  # Environment variables are the same of runOnRead.
  runOnUnread:

  # Command to run when a recording segment is created.
  # The following environment variables are available:
  # * MTX_PATH: path name
  # * RTSP_PORT: RTSP server port
  # * G1, G2, ...: regular expression groups, if path name is
  #   a regular expression.
  # * MTX_SEGMENT_PATH: segment file path
  runOnRecordSegmentCreate:

  # Command to run when a recording segment is complete.
  # The following environment variables are available:
  # * MTX_PATH: path name
  # * RTSP_PORT: RTSP server port
  # * G1, G2, ...: regular expression groups, if path name is
  #   a regular expression.
  # * MTX_SEGMENT_PATH: segment file path
  runOnRecordSegmentComplete:

###############################################
# Path settings
paths:
 redacted:
    source: rtsp://localhost:554/redacted
  redacted:
    source: rtsp://localhost:554/redacted
  redacted:
    source: rtsp://localhost:554/redacted
  redacted:
    source: rtsp://localhost:554/redacted
  redacted:
    source: rtsp://localhost:554/redacted
  redacted:
    source: rtsp://localhost:554/redacted
  redacted:
    source: rtsp://localhost:554/redacted
  etc.....
  all_others:```
austindetzel commented 3 days ago

I see this sometimes which is odd because Mediamtx is subscribing not receiving

2024/11/23 02:11:55 INF [RTMP] [conn 174.46.5.250:58986] opened 2024/11/23 02:11:56 INF [RTMP] [conn 174.46.5.250:58986] closed: no one is publishing to path 'redacted'