Page 1 of 1
zmEventNotification - Can it be used to decide if we should record
Posted: Fri Jun 12, 2020 1:55 pm
by BaconButty
Hi
Sorry if this is the wrong forum, it seemed most appropriate.
I've been looking at zmEventNotification. I understand the general function is to decide if a notification should be sent to the user or not.
My question is, would it be possible to use it (after getting an external trigger) on a live feed to decide if the clip should be recorded or not?
Alternatively, if it's not possible to use it on a live feed, could it be used to delete the event if it deems there's no relevant object in the video?
Bit of background, I'm working on creating an offsite backup and so need to limit the disk space as much as possible. I'm using my cameras motion detection which actually works quite well, however we had a stormy night last week that tripped it up. I need to figure out how to not trigger on these, or at least remove them.
Thanks for reading.
Re: zmEventNotification - Can it be used to decide if we should record
Posted: Fri Jun 12, 2020 4:13 pm
by asker
I don't think it is practical. ZM decides to start a recording based on motion. The ES gets notified of a new even _after_ ZM starts recording. The ES starts it's life assuming that there are frames in an event that are retrievable for analysis. In your case, you don't have an event yet. You could use something like mlapi (
https://github.com/pliablepixels/mlapi) and look at the stream example to basically use ZM's zms URL (mjpeg streaming) and analyze frames for objects and trigger a recording if something matches. However, I can't help but wonder if the delays in detection will result in you missing relevant recording bits. This could however be feasible in a GPU/accelerated platform environment. There are many if-but-what-if situations here one could craft though.
So short answer - No. Longer answer - maybe, depending on your ability to tweak it, the models you choose for object detection and the platform you use to run the ES.
The other option: Let ZM record. Let the ES tag the event with object detection notes. Write a filter to delete events that don't have object detection notes.
Re: zmEventNotification - Can it be used to decide if we should record
Posted: Fri Jun 12, 2020 4:55 pm
by BaconButty
The other option: Let ZM record. Let the ES tag the event with object detection notes. Write a filter to delete events that don't have object detection notes.
This sounds like a great solution, I'll try to get this working. Thank you!
Re: zmEventNotification - Can it be used to decide if we should record
Posted: Sat Jun 13, 2020 5:11 pm
by BaconButty
I just wanted to say, I'm amazed at how well this is working. As a novice, setting up ZmeventNotification was pretty difficult, but now that I have it setup the results are brilliant.
Basically the recorded events folder are now a fraction of the original size. For example, my front garden camera would pick up motion due to passing cars frequently, all I had to do was exclude vehicles in objectconfig.ini and now it only picks up anything else.
It was easy to set a filter up that looks for events with duration > 10 seconds (as this only updates when the clip is done) and delete them if the notes section is the default one (means we didn't pick up any new objects).
As this works off an image, I'm having trouble getting the timing right on the alarm shot to make sure we catch the object, but it's not a huge deal. Important objects generally trigger the motion more than once (I'm working in 15 second record blocks).
Really powerful stuff.
Re: zmEventNotification - Can it be used to decide if we should record
Posted: Thu Jun 18, 2020 10:45 am
by asker
Glad you got it sorted out! Yup I may be biased but the Es+hooks transformed ZM for me too.
Re: zmEventNotification - Can it be used to decide if we should record
Posted: Fri Jul 03, 2020 1:51 pm
by h1pp13p373
Asker, thank you again!! I was about to ask the same question and you answered it here. I'm also absolutely LOVING ES!