From d705fcaf450633c1e9c8eb6fa65455ec6730356e Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Sep 2025 21:30:45 +1200 Subject: [PATCH] test: Update 2 files --- squashkiwi-streaming/config/mediamtx.yml | 2 +- squashkiwi-streaming/test-camera.sh | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/squashkiwi-streaming/config/mediamtx.yml b/squashkiwi-streaming/config/mediamtx.yml index fa9fcce..b3f11d8 100644 --- a/squashkiwi-streaming/config/mediamtx.yml +++ b/squashkiwi-streaming/config/mediamtx.yml @@ -49,7 +49,7 @@ paths: # Recording record: yes recordPath: /recordings/${COURT_ID}_%Y%m%d_%H%M%S.mp4 - recordFormat: mp4 + # recordFormat is not supported in MediaMTX - recordings are always in .mp4 format recordSegmentDuration: 1h recordDeleteAfter: 720h diff --git a/squashkiwi-streaming/test-camera.sh b/squashkiwi-streaming/test-camera.sh index 05c4c54..8aad25a 100755 --- a/squashkiwi-streaming/test-camera.sh +++ b/squashkiwi-streaming/test-camera.sh @@ -1,8 +1,17 @@ #!/bin/bash # Test camera RTSP connection # shellcheck disable=SC1091 + +# Handle both dropshell execution and manual execution +if [ -z "${AGENT_PATH}" ]; then + # Manual execution - set paths relative to template directory + AGENT_PATH="../../../agent/" + source "./config/.template_info.env" + source "./config/service.env" +fi + source "${AGENT_PATH}/common.sh" -_check_required_env_vars "CAMERA_IP" "CAMERA_USER" "CAMERA_PASSWORD" "CAMERA_RTSP_PORT" "LOCAL_DATA_FOLDER" +_check_required_env_vars "CAMERA_IP" "CAMERA_USER" "CAMERA_PASSWORD" "CAMERA_RTSP_PORT" echo "Testing camera connection..." echo "Camera IP: ${CAMERA_IP}" @@ -22,7 +31,7 @@ echo "" echo "Testing with ffprobe..." docker run --rm --network host \ linuxserver/ffmpeg:latest \ - ffprobe -v error -show_streams -select_streams v:0 \ + ffprobe -v error \ "${RTSP_URL}" 2>&1 | head -20 if [ $? -eq 0 ]; then