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