Repository navigation
Open
Description
Goal
Record video when an event is triggered, mark the triggering event on the timeline with an icon, and let the user configure how much footage before the trigger is included.
Scope
- Allow event-triggered recording to be selected per camera.
- Associate each trigger with its camera, timestamp and event type/label.
- Show an icon at the trigger time on the timeline, distinct from the start of the recording. Clicking it should navigate to the associated recording; details should identify the event and camera.
- Provide a configurable pre-recording duration so the saved clip includes footage leading up to the trigger. Clearly distinguish requested pre-recording from footage actually available.
- Define the recording duration after the trigger and how repeated or overlapping triggers are handled.
Existing work to assess first
The repository already has event-based recording, a prebuffer, event metadata and timeline event navigation. Audit and reuse those paths rather than implement a second system. Establish which parts of this request already work and which need configuration, UI or reliability improvements.
Acceptance
- A trigger records the intended camera and appears at its actual trigger timestamp on the timeline.
- The icon remains at the trigger time even when the recording starts earlier because of pre-recording.
- Configuring pre-recording changes the requested lead-in; missing prebuffer after startup or interruption is reported rather than claimed as captured.
- Clicking the marker opens the correct camera and playback day, including events near midnight and across time zones.
- Repeated triggers, cancellation, recorder restart and failed capture have deterministic, tested behavior; retained recovery evidence is preserved.
- Tests cover zero/nonzero pre-recording, insufficient prebuffer, overlapping triggers and timeline navigation. Settings and limitations are documented.
Design questions
- Which trigger sources should be supported beyond those already implemented?
- Should pre-recording be configured per camera, globally, or per event request? What range is supported?
- How long should recording continue after a trigger, and should another trigger extend the same clip or create a separate recording?
- What icon and details should each event type display?
Related work
Coordinate recording names, day directories and media URLs with #11 / PR #13. Keep this feature separate from disk-pressure pruning in #14.
Metadata
Metadata
Assignees
Labels
No labels
Activity
mouldybread commentedon Nov 28, 2026
Suggested prompt for a coding assistant: