##
##  mediamtx.yml -- MediaMTX Server Configuration
##

logLevel:                 info
logDestinations:          [ file ]
logFile:                  @l_prefix@/var/mediamtx/log/mediamtx.log

readTimeout:              10s
writeTimeout:             10s
readBufferCount:          512
udpMaxPayloadSize:        1472

api:                      yes
apiAddress:               127.0.0.1:9997
metrics:                  no
metricsAddress:           127.0.0.1:9998
pprof:                    no
pprofAddress:             127.0.0.1:9999

runOnConnect:
runOnConnectRestart:      no

#   RTSP
rtspDisable:              no
protocols:                [ udp, multicast, tcp ]
encryption:               optional
rtspAddress:              127.0.0.1:8554
rtspsAddress:             127.0.0.1:8322
rtpAddress:               127.0.0.1:8000
rtcpAddress:              127.0.0.1:8001
multicastIPRange:         224.1.0.0/16
multicastRTPPort:         8002
multicastRTCPPort:        8003
serverKey:                @l_prefix@/etc/x509/example-server.key.pem
serverCert:               @l_prefix@/etc/x509/example-server.crt.pem
authMethods:              [ basic ]

#   RTMP
rtmpDisable:              no
rtmpEncryption:           optional
rtmpAddress:              127.0.0.1:1935
rtmpsAddress:             127.0.0.1:1936
rtmpServerKey:            @l_prefix@/etc/x509/example-server.key.pem
rtmpServerCert:           @l_prefix@/etc/x509/example-server.crt.pem

#   HLS
hlsDisable:               no
hlsAddress:               127.0.0.1:8888
hlsEncryption:            yes
hlsServerKey:             @l_prefix@/etc/x509/example-server.key.pem
hlsServerCert:            @l_prefix@/etc/x509/example-server.crt.pem
hlsAlwaysRemux:           no
hlsVariant:               lowLatency
hlsSegmentCount:          7
hlsSegmentDuration:       1s
hlsPartDuration:          200ms
hlsSegmentMaxSize:        50M
hlsAllowOrigin:           "*"
hlsTrustedProxies:        []
hlsDirectory:             ""

#   WebRTC
webrtcDisable:            no
webrtcAddress:            127.0.0.1:8889
webrtcEncryption:         yes
webrtcServerKey:          @l_prefix@/etc/x509/example-server.key.pem
webrtcServerCert:         @l_prefix@/etc/x509/example-server.crt.pem
webrtcAllowOrigin:        "*"
webrtcTrustedProxies:     []
webrtcICEServers:         [ stun:stun.l.google.com:19302 ]
webrtcICEHostNAT1To1IPs:  []
webrtcICEUDPMuxAddress:
webrtcICETCPMuxAddress:

paths:
    all:
        source:                     publisher
        sourceFingerprint:
        sourceOnDemand:             no
        sourceOnDemandStartTimeout: 10s
        sourceOnDemandCloseAfter:   10s
        publishUser:                example
        publishPass:                example
        publishIPs:                 []
        readUser:
        readPass:
        readIPs:                    []
        disablePublisherOverride:   no
        fallback:
        runOnInit:
        runOnInitRestart:           no
        runOnDemand:
        runOnDemandRestart:         no
        runOnDemandStartTimeout:    10s
        runOnDemandCloseAfter:      10s
        runOnReady:
        runOnReadyRestart:          no
        runOnRead:
        runOnReadRestart:           no

