How does frigate recording config work? #20032
Replies: 2 comments 1 reply
|
Frigate's recording system is designed to avoid duplicate storage through an efficient segment-based approach (1). How Recording WorksFrigate saves video from the stream with the Storage Efficiency - No DuplicatesEvents, detections, and alerts don't create separate video files. Instead, they reference the same recording segments that overlap with tracked objects (1). This configuration "avoids storing duplicate footage for overlapping tracked objects and reduces overall storage needs" (1). New recording segments are written from the camera stream to cache and "are only moved to disk if they match the setup recording retention policy" (1). Your Configuration AnalysisYour current setup has overlapping retention periods that may be causing confusion: record:
retain:
days: 7 # Continuous recording
alerts:
retain:
days: 30 # Alert recordings
detections:
retain:
days: 30 # Detection recordingsFrigate "chooses the largest matching retention value between the recording retention and the tracked object retention when determining if a recording should be removed" (1). Storage ManagementAs of Frigate 0.12, "if there is less than an hour left of storage, the oldest 2 hours of recordings will be deleted" (1). This automatic cleanup helps prevent storage issues. Retention ModesThe different retain modes determine which recording segments are kept (1):
Recommendations for Your SetupBased on the documentation, consider this approach: record:
enabled: True
retain:
days: 4
mode: all
alerts:
retain:
days: 15
mode: motion
detections:
retain:
days: 15
mode: motionSnapshots are separate image files and do add storage, but they're typically negligible compared to video storage since they're single JPEG images per event. 📚 Sources: Have another question? Just tag @inkeep. |
Alerts vs Detections - What's the Difference?You're right to question this - there is potential overlap. Let me clarify the difference between alerts and detections in Frigate's recording configuration (1). Alerts are configured under the review:
alerts:
enabled: True
labels:
- car
- person
required_zones:
- drivewayDetections are broader and include "all labels that are tracked / listened to" by default (2): review:
detections:
enabled: True
labels:
- car
- person
required_zones:
- drivewayRecording Retention ConfigurationIn the recording configuration, both alerts and detections can have separate retention settings (1): record:
enabled: True
alerts:
retain:
days: 14
mode: motion
detections:
retain:
days: 14
mode: motionCan You Omit Detection Days?Yes, you can omit the detections section entirely. The recording configuration shows that both record:
enabled: True
retain:
days: 7
mode: motion
alerts:
retain:
days: 10
mode: active_objectsWhat Detection Days DoDetection retention keeps recording segments that overlap with any detection event, regardless of whether it qualified as an alert (1). This means if you have detections enabled but alerts restricted to certain zones, detection retention would preserve recordings of objects detected outside those alert zones. The same options are available with alerts and detections, except it will only save the recordings when it overlaps with a review item of that type (1). 📚 Sources: Have another question? Just tag @inkeep. |
Uh oh!
There was an error while loading. Please reload this page.
Hi, I’m trying to better understand how Frigate handles continuous recordings vs events/detections/snapshots and how to configure retention correctly.
If I enable continuous recording and also enable events (clips), detections, or snapshots, does Frigate actually save separate/duplicate video/image files in addition to the continuous recordings?
Or are events/detections just “pointers/bookmarks” into the continuous video that don’t take extra space?
25 cameras (mostly 5MP)
Frigate shows 1.5–2.5 GB/hr per camera stored
HDD: 4 TB
Config:
Continuous recording: 7 days
Event mode (motion): 30 days
Detection mode (motion): 30 days
Snapshots: 30 days
Reality: I only get ~5 days continuous and ~5 days events before the disk is full.
Should I even define both event retention and detection retention if I already have continuous enabled?
Do snapshots add significant extra storage usage, or are they negligible compared to video?
What would be the best config if I want around 4 days continuous + 10–15 days events + 30 days snapshots without wasting space?
Is the detection: section actually needed in the record: config when I have clips: enabled?
Basically, I want to avoid double-saving the same footage and configure Frigate so I maximize retention without running out of disk earlier than expected.
Thanks!
All reactions