Commit Graph
3 Commits
Author SHA1 Message Date
ryzendigo 2b3f32e5df fix: clean up comment formatting 2026-03-21 16:42:18 +08:00
ryzendigo 17e5211991 feat(recap): add auto-generation scheduler and more config options
New config options:
- auto_generate: trigger daily recap at a scheduled time
- schedule_time: HH:MM for when to run (default 02:00)
- cameras: list of cameras to process (empty = all)
- speed: playback speed multiplier (1-8x, default 2)
- max_per_group: how many events play simultaneously (1-10, default 3)

New scheduler thread (recap/scheduler.py) checks once per minute,
generates yesterday's recap for each configured camera when the
scheduled time hits. Validated schedule_time format in config.
2026-03-21 16:40:49 +08:00
ryzendigo 717b878956 feat: add daily recap video generation
Adds a new recap feature that composites detected people from throughout
the day onto a clean background, producing a short summary video of all
activity for a given camera.

How it works:
- Builds a clean background plate via median of sampled frames
- Extracts clip frames for each person event from recordings
- Uses per-event background subtraction (first frame of clip as reference)
  within a soft spotlight region to isolate the person
- Groups non-overlapping events to play simultaneously
- Balances groups by duration so the video stays even
- Renders at 2x speed, stitches groups into final output

New files:
- frigate/recap/ — core generation module
- frigate/api/recap.py — POST /recap/{camera}, GET /recap/{camera}
- frigate/config/recap.py — recap config section (enabled, fps, etc)
- frigate/test/test_recap.py — unit tests
- web/src/components/overlay/RecapDialog.tsx — UI component (not yet wired)

Config example:
  recap:
    enabled: true
    default_label: person
    output_fps: 10
    video_duration: 30
    background_samples: 30

Relates to #54
2026-03-21 16:36:39 +08:00