Frigate “recording broken” was retention config, not a pipeline jam

Resolves the 🚨 URGENT “Frigate recording broken / overnight footage lost” item from the handover. The earlier wifi-reload / br-cams / go2rtc-jam hypothesis was WRONG. Actual root cause: retention config kept zero continuous/motion footage, so ffmpeg’s segments were discarded instead of stored. Fixed by adding record.motion.days: 10 + tracking cat.

For Agents

If Frigate recordings/ looks empty but cameras stream fine, do NOT assume a jam. Check the resolved record retention block FIRST. continuous.days: 0 + motion.days: 0 with only alerts/detections retention means Frigate only keeps segments overlapping a tracked object — during quiet periods it correctly discards everything. That is config, not a bug.

Symptoms (looked identical to a jam)

  • recordings/ (/srv/frigate/recordings) nearly empty; daily sizes had “collapsed” (2026-08-20 = 68 MB, 2026-08-21 = 98 MB) — read at the time as a days-long stall.
  • A docker restart frigate did not change it.
  • A request to pull “a brief clip of the cat outside at ~03:00” could not be fulfilled — that footage never existed.

Actual root cause (2026-08-22)

Frigate’s resolved record config had:

  • record.continuous.days = 0
  • record.motion.days = 0
  • only record.alerts and record.detections retention set (14 days each, mode: motion).

alerts/detections retention only keeps recording segments that overlap a tracked object (was person, car). During any window with no person/car detection, ffmpeg still wrote 10s segments into the /tmp/cache tmpfs, and Frigate’s recording maintainer then DISCARDED them instead of moving them into /srv/frigate/recordings.

So the “68 MB/day collapse” was simply low person/car activity, not a jammed pipeline. Everything downstream was healthy:

  • Detect healthycamera_fps = 5.0 on all 4 cams.
  • Record ffmpeg running — fresh, good ~1.5 MB segments landing in /tmp/cache.
  • But 0 files moved to recordings/ in a 3-minute observation window while cache held segments.
  • Cameras, go2rtc, ffmpeg, disk (root LVM 6% used) all fine.

The cat at 03:00 was invisible on two counts: cat was not a tracked object AND there was no continuous/motion retention to keep the footage regardless of object.

Diagnostic method (runbook value)

To distinguish cameras broken vs record path broken vs retention config — in this order:

  1. Detect healthGET /api/stats, check per-camera camera_fps. ~5.0 = cameras + detect fine.
  2. Is ffmpeg producing segments?docker exec frigate ls -la /tmp/cache. Fresh ~1.5 MB .mp4 segments = record ffmpeg is running.
  3. Resolved retentionGET /api/config, inspect the record block: continuous.days, motion.days, alerts.retain.days, detections.retain.days.

Decision rule

Cache has fresh segments AND recordings/ is empty AND continuous.days == 0 AND motion.days == 0 → it is retention config, not a jam. Do not restart-thrash the container; edit the config.

Fix applied (2026-08-22)

Edited /home/levander/nvr/frigate/config.yml (backup: config.yml.bak-20260822-catmotion):

  1. Added cat to global objects.track → now [person, car, cat] on all 4 cams. Model is coco-80, so cat is a valid label.
  2. Added record.motion.days: 10.

User chose motion recording, 10-day retention over continuous 24/7 (24/7 would be ~150 GB/day for 4 cams). Applied with docker restart frigate.

Verified after restart:

  • /api/config shows track includes cat on all cams and record.motion.days = 10.
  • 13 new segments per camera landed in /srv/frigate/recordings within 3 minutes.
  • Recording now works.

Config / topology reference

Config path

The live config is /home/levander/nvr/frigate/config.yml (mounted to /config), NOT /srv/frigate/config. /srv/frigate → container /media/frigate is the recordings/exports mount only.

  • Cameras: 2 physical Tapo dual-lens units on the cams VLAN192.168.30.119 = cam1/cam2, 192.168.30.139 = cam3/cam4.
  • Streams: Frigate reads detect from camN_sub (stream2/7) and record from camN_main (stream1/6) via the go2rtc restream at rtsp://127.0.0.1:8554.

Loose end (benign)

/home/levander/nvr/frigate/go2rtc_homekit.yml is a 0-byte file that Frigate loads as an extra go2rtc config path — it is the source of the stray c302 / c302_h264 go2rtc streams. Harmless; candidate for removal from the config path later.