From f47bc0e67f2c6a9931c2002fc862905050d1c467 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Sep 2025 21:42:35 +1200 Subject: [PATCH] config: Update 2 files --- .../config/docker-compose.yml | 9 ++------- squashkiwi-streaming/config/mediamtx.yml | 19 ++++++------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/squashkiwi-streaming/config/docker-compose.yml b/squashkiwi-streaming/config/docker-compose.yml index e8c072e..b38f839 100644 --- a/squashkiwi-streaming/config/docker-compose.yml +++ b/squashkiwi-streaming/config/docker-compose.yml @@ -10,13 +10,8 @@ services: - ${RECORDINGS_FOLDER}:/recordings environment: - MTX_PROTOCOLS=tcp - - CAMERA_USER=${CAMERA_USER} - - CAMERA_PASSWORD=${CAMERA_PASSWORD} - - CAMERA_IP=${CAMERA_IP} - - CAMERA_RTSP_PORT=${CAMERA_RTSP_PORT} - - COURT_ID=${COURT_ID} - - COURT_NAME=${COURT_NAME} - - PUBLISH_PASSWORD=${PUBLISH_PASSWORD:-admin} + - MTX_PATHS_COURT_MAIN_SOURCE=rtsp://${CAMERA_USER}:${CAMERA_PASSWORD}@${CAMERA_IP}:${CAMERA_RTSP_PORT}/cam/realmonitor?channel=1&subtype=0 + - MTX_PATHS_COURT_SUB_SOURCE=rtsp://${CAMERA_USER}:${CAMERA_PASSWORD}@${CAMERA_IP}:${CAMERA_RTSP_PORT}/cam/realmonitor?channel=1&subtype=1 healthcheck: test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:9997/v2/paths/list"] interval: 30s diff --git a/squashkiwi-streaming/config/mediamtx.yml b/squashkiwi-streaming/config/mediamtx.yml index 0827faa..9442fbe 100644 --- a/squashkiwi-streaming/config/mediamtx.yml +++ b/squashkiwi-streaming/config/mediamtx.yml @@ -15,7 +15,7 @@ metricsAddress: :9998 # RTSP Server rtsp: yes rtspAddress: :8554 -protocols: [tcp, udp] +rtspTransports: [tcp, udp] readTimeout: 10s writeTimeout: 10s @@ -36,27 +36,20 @@ webrtcAllowOrigin: '*' paths: # Main court camera stream court_main: - # Note: Password with special characters should be URL-encoded in service.env - # e.g., ! becomes %21, @ becomes %40, etc. - source: rtsp://${CAMERA_USER}:${CAMERA_PASSWORD}@${CAMERA_IP}:${CAMERA_RTSP_PORT}/cam/realmonitor?channel=1&subtype=0 + # Source URL is provided via environment variable MTX_PATHS_COURT_MAIN_SOURCE + # from docker-compose.yml sourceProtocol: tcp sourceOnDemand: no - # Authentication - publishUser: admin - publishPass: ${PUBLISH_PASSWORD} - # Recording record: yes - recordPath: /recordings/${COURT_ID}_%Y%m%d_%H%M%S.mp4 - # recordFormat is not supported in MediaMTX - recordings are always in .mp4 format + recordPath: /recordings/court_%Y%m%d_%H%M%S.mp4 recordSegmentDuration: 1h recordDeleteAfter: 720h - - # HLS is automatically generated for all paths when HLS server is enabled # Sub-stream for lower bandwidth court_sub: - source: rtsp://${CAMERA_USER}:${CAMERA_PASSWORD}@${CAMERA_IP}:${CAMERA_RTSP_PORT}/cam/realmonitor?channel=1&subtype=1 + # Source URL is provided via environment variable MTX_PATHS_COURT_SUB_SOURCE + # from docker-compose.yml sourceProtocol: tcp sourceOnDemand: yes \ No newline at end of file