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
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

View File

@@ -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