fix: correct MediaMTX v1.x config syntax (runOnReady, top-level flags)

This commit is contained in:
ComputerTech 2026-04-04 13:35:45 +01:00
parent 68974261e5
commit 457c5c89c9
1 changed files with 12 additions and 15 deletions

View File

@ -65,30 +65,27 @@ sudo tee "$MEDIAMTX_CONF" > /dev/null << YAMLEOF
logLevel: info logLevel: info
logDestinations: [stdout] logDestinations: [stdout]
# Disable unused protocols (top-level flags for MediaMTX v1.x) # Disable unused protocols
rtmpDisable: true rtmp: false
webrtcDisable: true webrtc: false
# HLS output — listeners access the stream here # HLS output
hls: hlsAddress: :${HLS_PORT}
address: :${HLS_PORT} hlsVariant: lowLatency
# Keep a short segment list so listeners tune in quickly hlsSegmentDuration: 1s
segmentDuration: 2s hlsPartDuration: 200ms
partDuration: 200ms
segmentMaxAge: 30s
# SRT input — DJ streams here via OBS # SRT input
srt: srtAddress: :${SRT_PORT}
address: :${SRT_PORT}
# Paths # Paths
paths: paths:
${SRT_PATH}: ${SRT_PATH}:
runOnPublish: >- runOnReady: >-
curl -s -X POST http://127.0.0.1:${LISTENER_PORT}/api/webhook curl -s -X POST http://127.0.0.1:${LISTENER_PORT}/api/webhook
-H "Content-Type: application/json" -H "Content-Type: application/json"
-d "{\"event\":\"publish\",\"path\":\"${SRT_PATH}\",\"source\":{\"remoteAddr\":\"\$MTX_QUERY\"}}" -d "{\"event\":\"publish\",\"path\":\"${SRT_PATH}\",\"source\":{\"remoteAddr\":\"\$MTX_QUERY\"}}"
runOnUnpublish: >- runOnNotReady: >-
curl -s -X POST http://127.0.0.1:${LISTENER_PORT}/api/webhook curl -s -X POST http://127.0.0.1:${LISTENER_PORT}/api/webhook
-H "Content-Type: application/json" -H "Content-Type: application/json"
-d "{\"event\":\"unpublish\",\"path\":\"${SRT_PATH}\"}" -d "{\"event\":\"unpublish\",\"path\":\"${SRT_PATH}\"}"