1.9 KiB
highlights
Purpose
Generates derived video products from recorded footage: a daily highlight reel (events scored and assembled into a short FFmpeg-concatenated clip) and scheduled per-camera timelapses. These are offline/batch jobs that read the events and recordings tables and write new rows into recordings tagged with a synthetic trigger.
Key files
vigilar/highlights/reel.py— event scoring map (PET_ESCAPE=10,WILDLIFE_PREDATOR=9, ...), clip selection, FFmpeg concat assembly, inserts resulting file viainsert_recordingvigilar/highlights/timelapse.py— per-camera timelapse generator; readstimelapse_schedules, walks recordings within the configured hour window, stitches with FFmpeg, inserts a newrecordingsrowvigilar/highlights/__init__.py
MQTT topics
Subscribes: No MQTT subscribers found at time of writing. Publishes: No MQTT publishers found at time of writing.
Database tables
events— read-only, source for reel scoringrecordings— read (source clips) and write (new reel / timelapse entries viainsert_recording)timelapse_schedules— read bytimelapse.pyto determine which cameras / hours / generation times are active
Depends on
storage— all table access viavigilar.storage.queriesandvigilar.storage.schema- FFmpeg subprocess for clip concatenation and timelapse assembly
Consumed by
web— therecordingsblueprint surfaces reels and timelapses alongside regular recordings
Notes
Scoring is a hand-tuned dict in reel.py. The top-scored events of the day are pulled, their surrounding recordings are concatenated via FFmpeg, and the result is persisted as a new recordings row with a RecordingTrigger tag so the UI can distinguish generated from captured clips. Timelapse generation is driven by timelapse_schedules rows — each row defines a camera, an hour window, and a generate_time at which the day's frames are stitched.