mediamtx/rtsp-simple-server.yml

122 lines
4.8 KiB
YAML
Raw Normal View History

2020-10-27 23:29:53 +00:00
# supported stream protocols (the handshake is always performed with TCP).
protocols: [udp, tcp]
2020-10-27 23:29:53 +00:00
# port of the TCP RTSP listener.
rtspPort: 8554
2020-10-27 23:29:53 +00:00
# port of the UDP RTP listener (used only if udp is in protocols).
rtpPort: 8000
2020-10-27 23:29:53 +00:00
# port of the UDP RTCP listener (used only if udp is in protocols).
rtcpPort: 8001
2020-08-05 09:20:11 +00:00
2020-10-27 23:29:53 +00:00
# timeout of read operations.
2020-07-19 16:43:59 +00:00
readTimeout: 10s
2020-10-27 23:29:53 +00:00
# timeout of write operations.
writeTimeout: 10s
2020-08-05 09:20:11 +00:00
2020-10-27 23:29:53 +00:00
# supported authentication methods (both are insecure, use RTSP inside a VPN
# to enforce security).
2020-07-12 11:16:33 +00:00
authMethods: [basic, digest]
2020-08-05 09:20:11 +00:00
2020-10-27 23:29:53 +00:00
# enable Prometheus-compatible metrics on port 9998.
metrics: no
2020-10-27 23:29:53 +00:00
# enable pprof on port 9999 to monitor performances.
pprof: no
2020-10-27 23:29:53 +00:00
# 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: rtsp-simple-server.log
# command to run when a client connects to the server.
# this is terminated with SIGINT when a client disconnects from the server.
2020-11-01 16:33:06 +00:00
# the server port is available in the RTSP_PORT variable.
# the restart parameter allows to restart the command if it exits suddenly.
runOnConnect:
runOnConnectRestart: no
2020-09-19 15:13:45 +00:00
# these settings are path-dependent.
2020-10-27 23:29:53 +00:00
# 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
2020-09-19 15:13:45 +00:00
# another entry.
paths:
all:
# source of the stream - this can be:
2020-10-05 19:40:17 +00:00
# * record -> the stream is provided by a RTSP client
# * rtsp://existing-url -> the stream is pulled from another RTSP server
2020-10-03 19:10:41 +00:00
# * rtmp://existing-url -> the stream is pulled from a RTMP server
2020-10-27 23:29:53 +00:00
# * redirect -> the stream is provided by another path or server
source: record
2020-10-27 23:29:53 +00:00
# if the source is an RTSP url, this is the protocol that will be used to
# pull the stream.
sourceProtocol: udp
2020-10-27 23:29:53 +00:00
# if the source is an RTSP or RTMP 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
2020-10-27 23:29:53 +00:00
# if the source is "redirect", this is the RTSP url which clients will be
# redirected to.
sourceRedirect:
# username required to publish.
publishUser:
# password required to publish.
publishPass:
# ips or networks (x.x.x.x/24) allowed to publish.
publishIps: []
# username required to read.
readUser:
# password required to read.
readPass:
# ips or networks (x.x.x.x/24) allowed to read.
readIps: []
# command to run when this path is initialized.
# this can be used to publish a stream and keep it always opened.
2020-10-27 23:29:53 +00:00
# this is terminated with SIGINT when the program closes.
# the path name is available in the RTSP_PATH variable.
2020-11-01 16:33:06 +00:00
# the server port is available in the RTSP_PORT variable.
# the restart parameter allows to restart the command if it exits suddenly.
2020-07-31 16:12:42 +00:00
runOnInit:
runOnInitRestart: no
2020-07-31 16:12:42 +00:00
2020-07-30 11:43:10 +00:00
# command to run when this path is requested.
# this can be used to publish a stream on demand.
2020-10-27 23:29:53 +00:00
# this is terminated with SIGINT when the path is not requested anymore.
# the path name is available in the RTSP_PATH variable.
2020-11-01 16:33:06 +00:00
# the server port is available in the RTSP_PORT variable.
# the restart parameter allows to restart the command if it exits suddenly.
2020-07-30 11:43:10 +00:00
runOnDemand:
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 runOnDemand command will be closed when there are no
# readers connected and this amount of time has passed.
runOnDemandCloseAfter: 10s
2020-07-30 11:43:10 +00:00
# command to run when a client starts publishing.
2020-10-27 23:29:53 +00:00
# this is terminated with SIGINT when a client stops publishing.
# the path name is available in the RTSP_PATH variable.
2020-11-01 16:33:06 +00:00
# the server port is available in the RTSP_PORT variable.
# the restart parameter allows to restart the command if it exits suddenly.
2020-07-30 11:43:10 +00:00
runOnPublish:
runOnPublishRestart: no
2020-07-30 11:43:10 +00:00
# command to run when a clients starts reading.
2020-10-27 23:29:53 +00:00
# this is terminated with SIGINT when a client stops reading.
# the path name is available in the RTSP_PATH variable.
2020-11-01 16:33:06 +00:00
# the server port is available in the RTSP_PORT variable.
# the restart parameter allows to restart the command if it exits suddenly.
2020-07-30 11:43:10 +00:00
runOnRead:
runOnReadRestart: no