Closed Aculeasis closed 2 years ago
I'm not super familiar with ONVIF motion detection protocol, but frigate doesn't just say "if motion detected somewhere then run object detection", it is hyper focused on only detected motion based on how the config is setup and then also will ignore motion that occurs inside of motion masks (like a tree or something).
Frigate uses the location of motion to decide where to pull a region from to run object detection on it (frigate does not run object detection on the entire frame when motion occurs). So if ONVIF motion doesn't provide this pixel based location of motion, it would be useless to frigate.
Other problem is, each camera may have a different % support of protocol and that would create its own issues for supporting this.
I looked through the ONVIF protocol specifications.
The manually defined polygons / regions wouldn't realistically work since these seem to be user-setup and not dynamic. The cell based option could potentially work depending on how configurable the cell sizes / positions are:
Cell based motion detection determined by placing a grid over the video source and determining changes.
So if ONVIF motion doesn't provide this pixel based location of motion, it would be useless to frigate.
It is sad. Maybe hikivision protocol supports it, but it's proprietary.
I'm not sure if it needed to be closed, my second comment highlighted some options that could work depending on how it's implemented
The manually defined polygons / regions wouldn't realistically
This is it? I think this has only a region name.
Also, I tried to subscribe on events using onvif_zeep for my inside camera, but all examples don't work and ONVIF device manager can't see the events. But HA works =\
I was referring to
Cell based motion detection determined by placing a grid over the video source and determining changes.
Not sure if you see anything like that
Wouldn't this be useful in the sense that Frigate wouldn't need to do constant motion detection, and could just do motion detection on a buffered stream based on when ONVIF motion is reported?
Wouldn't this be useful in the sense that Frigate wouldn't need to do constant motion detection, and could just do motion detection on a buffered stream based on when ONVIF motion is reported?
Frigates motion detection is not momentary, it keeps calculating an average background to know where motion is occurring as well as to know when to ignore motion because it's too large (like when a camera changes from color to IR).
Can I request this be reopened? My server CPU ground to a halt today because I had a TON of motion activity (I believe in excess of 25 cameras, which is unusual), and this is a feature that other software like Shinobi and Blue Iris has. I understand its not a priority but I'm hoping it can be added at some point, I'm pretty confident I'm at my limit of adding more cameras without something to reduce CPU and memory usage substantially
we already have ideas for how to further reduce motion detection cpu usage, and as has been explained above the motion data in onvif is not specific enough and also likely not fast enough to process data in real time like frigate does
Describe what you are trying to accomplish and why in non technical terms I want to use cameras' motion detectors via ONVIF events to decrease cpu usage.
Describe the solution you'd like Add new motion detector type - something like the ONVIF motion events
Additional context Many modern ip cameras have internal detectors (sound, move, zone etc.) and support ONVIF events. For example a connected my dahua cam to HA via ONVIF and I can use motions' binary sensors. I think it is a wonderful option for low hardware with coral tpu and a lot of cameras. https://www.home-assistant.io/integrations/onvif/#supported-sensors