config: Update 2 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 22s

This commit is contained in:
Your Name
2025-09-01 21:42:35 +12:00
parent 4e16b4eba2
commit f47bc0e67f
2 changed files with 8 additions and 20 deletions

View File

@@ -10,13 +10,8 @@ services:
- ${RECORDINGS_FOLDER}:/recordings - ${RECORDINGS_FOLDER}:/recordings
environment: environment:
- MTX_PROTOCOLS=tcp - MTX_PROTOCOLS=tcp
- CAMERA_USER=${CAMERA_USER} - MTX_PATHS_COURT_MAIN_SOURCE=rtsp://${CAMERA_USER}:${CAMERA_PASSWORD}@${CAMERA_IP}:${CAMERA_RTSP_PORT}/cam/realmonitor?channel=1&subtype=0
- CAMERA_PASSWORD=${CAMERA_PASSWORD} - MTX_PATHS_COURT_SUB_SOURCE=rtsp://${CAMERA_USER}:${CAMERA_PASSWORD}@${CAMERA_IP}:${CAMERA_RTSP_PORT}/cam/realmonitor?channel=1&subtype=1
- CAMERA_IP=${CAMERA_IP}
- CAMERA_RTSP_PORT=${CAMERA_RTSP_PORT}
- COURT_ID=${COURT_ID}
- COURT_NAME=${COURT_NAME}
- PUBLISH_PASSWORD=${PUBLISH_PASSWORD:-admin}
healthcheck: healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:9997/v2/paths/list"] test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:9997/v2/paths/list"]
interval: 30s interval: 30s

View File

@@ -15,7 +15,7 @@ metricsAddress: :9998
# RTSP Server # RTSP Server
rtsp: yes rtsp: yes
rtspAddress: :8554 rtspAddress: :8554
protocols: [tcp, udp] rtspTransports: [tcp, udp]
readTimeout: 10s readTimeout: 10s
writeTimeout: 10s writeTimeout: 10s
@@ -36,27 +36,20 @@ webrtcAllowOrigin: '*'
paths: paths:
# Main court camera stream # Main court camera stream
court_main: court_main:
# Note: Password with special characters should be URL-encoded in service.env # Source URL is provided via environment variable MTX_PATHS_COURT_MAIN_SOURCE
# e.g., ! becomes %21, @ becomes %40, etc. # from docker-compose.yml
source: rtsp://${CAMERA_USER}:${CAMERA_PASSWORD}@${CAMERA_IP}:${CAMERA_RTSP_PORT}/cam/realmonitor?channel=1&subtype=0
sourceProtocol: tcp sourceProtocol: tcp
sourceOnDemand: no sourceOnDemand: no
# Authentication
publishUser: admin
publishPass: ${PUBLISH_PASSWORD}
# Recording # Recording
record: yes record: yes
recordPath: /recordings/${COURT_ID}_%Y%m%d_%H%M%S.mp4 recordPath: /recordings/court_%Y%m%d_%H%M%S.mp4
# recordFormat is not supported in MediaMTX - recordings are always in .mp4 format
recordSegmentDuration: 1h recordSegmentDuration: 1h
recordDeleteAfter: 720h recordDeleteAfter: 720h
# HLS is automatically generated for all paths when HLS server is enabled
# Sub-stream for lower bandwidth # Sub-stream for lower bandwidth
court_sub: 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 sourceProtocol: tcp
sourceOnDemand: yes sourceOnDemand: yes