From abf17cbf2420f5b99b6babc7cdd7bcf027c7803e Mon Sep 17 00:00:00 2001 From: ginnoir Date: Thu, 8 Oct 2026 03:05:32 -0500 Subject: [PATCH] feat(cameras): 24/7 recording (7 d) + 30 d event clips; pin frigate to 6 CPUs The UI on-demand toggle was rejected because record.enabled was false in config. OpenVINO used ~6.5 cores with all 52 threads visible; cpuset 0-5 brings frigate to ~1.2. Co-Authored-By: Claude Opus 5.5 --- stacks/cameras/docker-compose.yml | 9 +++++++-- stacks/cameras/frigate/config.yml | 22 +++++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/stacks/cameras/docker-compose.yml b/stacks/cameras/docker-compose.yml index 4fd6096..899ea9a 100644 --- a/stacks/cameras/docker-compose.yml +++ b/stacks/cameras/docker-compose.yml @@ -1,4 +1,4 @@ -# cameras stack — Reolink E1 live view + detection snapshots. +# cameras stack — Reolink E1 live view, 24/7 recording, detection snapshots, PTZ page. # # The E1 (192.168.1.99) has NO RTSP/RTMP/ONVIF: only Reolink's Baichuan protocol on its # media port (9001 — set in the Reolink app; neolink breaks if it changes). neolink logs @@ -6,7 +6,8 @@ # cameras net (unauthenticated, so it is never on edge). frigate's built-in go2rtc is the # only neolink client; the browser gets MSE through Caddy (cam.ginnoir.com). # -# Recording is OFF — snapshots only (/storage1/labdata/frigate). Detection is OpenVINO on +# Recording: 24/7 main stream kept 7 d, person/pet clips 30 d, snapshots 30 d — all under +# /storage1/labdata/frigate (~310 GB rolling). Detection is OpenVINO on # CPU, deliberately not the P100 (llama-swap owns its VRAM; CDI breaks after reboots). # # Configs are host-managed at /config// (Portainer's checkout won't materialize a @@ -51,6 +52,10 @@ services: labels: - "com.centurylabs.watchtower.enable=false" env_file: stack.env + # OpenVINO (CPU) spawns one worker per visible CPU and busy-spins them: with all 52 + # threads visible the detector alone burned ~6.5 cores. Pinned to 6 threads it's + # ~1.2 cores total (incl. 24/7 recording) at ~23 ms inference. Measured 2026-10-08. + cpuset: "0-5" shm_size: "256mb" depends_on: [neolink] networks: [edge, cameras] diff --git a/stacks/cameras/frigate/config.yml b/stacks/cameras/frigate/config.yml index fb3c05a..119b7c4 100644 --- a/stacks/cameras/frigate/config.yml +++ b/stacks/cameras/frigate/config.yml @@ -36,8 +36,21 @@ go2rtc: e1_sub: - rtsp://neolink:8554/e1/subStream +# Recordings → /media/frigate/recordings = /storage1/labdata/frigate/recordings. +# Main stream 24/7 ≈ 4.2 Mbps ≈ 44 GB/day (measured 2026-10-08) → ~310 GB rolling at 7 d. +# Alert/detection clips (person/dog/cat) kept 30 d beyond that. record: - enabled: false + enabled: true + continuous: + days: 7 + alerts: + retain: + days: 30 + mode: motion + detections: + retain: + days: 30 + mode: motion snapshots: enabled: true @@ -55,6 +68,12 @@ cameras: - path: rtsp://127.0.0.1:8554/e1_sub input_args: preset-rtsp-restream roles: [detect] + # Record full res. E1 audio is pcm_s16be, which mp4 can't carry → transcode to AAC. + - path: rtsp://127.0.0.1:8554/e1 + input_args: preset-rtsp-restream + roles: [record] + output_args: + record: preset-record-generic-audio-aac detect: # Frigate >=0.14 defaults detect.enabled to false — without this nothing is detected. enabled: true @@ -65,3 +84,4 @@ cameras: streams: Main: e1 Sub: e1_sub +version: 0.17-0