Deleting unwanted recordings through Frigate api (events) #15863
Unanswered
mbronstein1
asked this question in
Ask A Question
Replies: 1 comment 7 replies
-
In general, I think a new API will be needed that allows for deleting recordings for a given timeframe |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Frigate Version 15-beta4
Is there a good way to remove unwanted recordings segments through the api? I have an application that interacts with Frigate through MQTT and the API and determines whether an event is useful or not based on my specific use cases. This means that Frigate is usually saving a large amount of recordings that may not be useful to me (based on specific parameters like time of day or other additional context that Frigate cannot provide beyond the detections).
I am currently using the
events
mqtt topic to get individual events from Frigate, and I know that the Frigate devs have pivoted to usingreviews
instead to negate duplicate recordings for multiple events at the same time. However, for my use case, event-based processing is typically better.Any ideas on how I can delete unwanted recording clips based on the event ids I don't care about? This would help improve retention and storage space TREMENDOUSLY, which has been a recurring problem, as I would like to set the retention to a long time (about a year) and then just remove recordings/snapshots/events/etc that aren't useful to me. I noticed that the only easy way through the api to delete video segments was to delete the review. It seems deleting the event just removes the snapshot (which makes sense because multiple events might need the same recording).
One thought I had was to also subscribe to the
reviews
mqtt topic, and on "end" types cross-check all detection/event id's associated with that review w/ my application's saved events. If none of those id's exist, delete the review (which would delete the recordings). It also looks like associated events do not get deleted via theDELETE review
route so I'd probably need to hit theDELETE events
route as well.I would love to hear from others w/ possible ideas or if anyone has solved this use case on their end. Or if any contributors (who obviously know their codebase way better than I do) have a better approach.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions