Page 1 of 2

Why is ZMES skipping Events !Solved!

Posted: Sat Jul 16, 2022 3:33 pm
by kaltertod
Hello,

As the title says I am trying to figure out why ZMES is skipping some events for analysis, yet it is choosing to analyze others. I have attached a screenshot below. Any insight would be helpful.

Thanks,
Kalter

Re: Why is ZMES skipping Events

Posted: Sun Jul 17, 2022 2:38 pm
by kaltertod
A little more information I found while watching the zm logs this morning. It does not happen with every event but I am getting some errors that pop up in the logs about Frame Reading, and No Frame found for event.

I am still watching logs this morning so I can see if I can catch it "in the act" nothing as of yet.

Re: Why is ZMES skipping Events

Posted: Wed Jul 20, 2022 3:38 pm
by tsp84
Those errors just mean that zmes asked zm API for that frame I'd (231) and zm didn't reply with the requested frame.of I remember correctly.

Are the monitors in question using video pass through? In my testing MP4 events are much slower for to zm needing to decode the MP4 and then grab a jpeg image from.the mp4

Re: Why is ZMES skipping Events

Posted: Wed Jul 20, 2022 10:18 pm
by kaltertod
tsp84 wrote: Wed Jul 20, 2022 3:38 pm Those errors just mean that zmes asked zm API for that frame I'd (231) and zm didn't reply with the requested frame.of I remember correctly.

Are the monitors in question using video pass through? In my testing MP4 events are much slower for to zm needing to decode the MP4 and then grab a jpeg image from.the mp4
Yes all of my monitors are using H264 passthrough, would I be better off saving jpegs while using ZMES?

Re: Why is ZMES skipping Events

Posted: Tue Jul 26, 2022 10:29 pm
by kaltertod
Still working on this problem, I upgraded the gpu thinking that I might have been running out of vram and that might be why zmes was skipping events. I have since found this not to be true. However, I did end up with a faster gpu out of the deal and performance is up across the board...

I also tried saving jpegs along with using passthrough, did not make a difference in zmes missing events.

I also tried tightening the polling rate at which zmes looks for new events, I shortened the time from 5 seconds down to 2 seconds with no change in events being missed.

You can see in the logs in the screenshot that is attached that zmes is missing the events at random.....

I am still searching for answers as to why zmes is not processing all events created by zoneminder.

Re: Why is ZMES skipping Events

Posted: Thu Aug 04, 2022 1:26 am
by kaltertod
Solved: I removed zoneminder and zmes and installed blue iris and deepstack.... Works first shot out of the box... Cpu usage is overall alot lower on the same hardware, no missed events, and the community already seems alot more helpful.... Hopefully one day I can come back to zoneminder and zmes.

Re: Why is ZMES skipping Events !Solved!

Posted: Sat Aug 06, 2022 10:15 am
by fontiano
Same problem here: viewtopic.php?t=31794

Maybe the problem is the "Alarm Frame Count" parameter that is "1" by default and if an alarm is "flapping" (alarm on, alarm off, alarm on, alarm off etc.) eventserver is not triggered.

My fix was to uninstall EventServer, write a script that do a tail-f of file log, and launch another script that check all events (with at least 1 alarmed frame) trying to detect objects (with yolov5)

Re: Why is ZMES skipping Events !Solved!

Posted: Sun Aug 07, 2022 2:16 pm
by iconnor
Yes event server can miss very short events.

In 1.37 you can configure to run a script on event start/stop.

However I have to wonder... are these short events really of interest?

Re: Why is ZMES skipping Events !Solved!

Posted: Sun Aug 07, 2022 6:18 pm
by kaltertod
iconnor wrote: Sun Aug 07, 2022 2:16 pm Yes event server can miss very short events.

In 1.37 you can configure to run a script on event start/stop.

However I have to wonder... are these short events really of interest?
I will fire up a vm and try out 1.37, yes the short events are of interest if they include people, and 75% of them do in fact include a person. That is the problem I am using facial recognition to cancel event notifications sent to my phone, and unknown faces or unknown person's in general to send an event... I do not manage only one but 3 different locations in this manner.

With the furthest being almost 300 miles away from me. So the notification and proper recognition of events/objects is very important.

As I have stated before the main location that I am monitoring is my primary residence and I am now using blue iris and deepstack at this location and there are no events that are missing being analyzed. I have 100% analysis and facial recognition is canceling events that are unimportant 100% of the time.

This has cut my notifications in half compared to zoneminder, cpu usage is down, and gpu is doing its job as it should.

As I stated before I will load up a vm and check out 1.37, but as far as 1.36x and zmes are concerned they are not meeting expectations and they are on the back burner.... If 1.37 can be integrated with deepstack or senseai and give the same result as blueiris and deepstack I will be back.

The biggest differentiating factor between the 2 platforms is the community here just looks and walks right on by with the exception of a few people. Sorry to say it but I believe it is true... Not everyone out there is a coder/programmer and I believe for zoneminder to move forward it will take a community that is willing to help as a whole.

P.S. Thanks for the reply

Re: Why is ZMES skipping Events !Solved!

Posted: Tue Aug 09, 2022 2:46 pm
by iconnor
Perhaps if ZoneMinder cost the same amount as Blue Iris we could do a better job.

Re: Why is ZMES skipping Events !Solved!

Posted: Tue Aug 09, 2022 6:06 pm
by Magic919
Perhaps if my Grandma had wheels she’d have been a trolley.

Re: Why is ZMES skipping Events !Solved!

Posted: Tue Aug 09, 2022 9:14 pm
by kaltertod
iconnor wrote: Tue Aug 09, 2022 2:46 pm Perhaps if ZoneMinder cost the same amount as Blue Iris we could do a better job.
Just wow, This being from a dev of the project leaves a sour taste in my mouth, especially from someone that has donated more than the cost of blue iris over the years....

Sorry if I struck a nerve there, but damn man....... I may have not been on the forums long but I have been using zoneminder since 1.26 and zmes just recently.

Re: Why is ZMES skipping Events !Solved!

Posted: Tue Aug 09, 2022 10:06 pm
by iconnor
It's not about 1 person donating. Blue Iris is a commercial product with a lot more resources. I was lamenting that this is the situation, and I cannot afford to fix it.

I don't even use ZMES and I didn't write it.

ZM donations are around $200/month. That's not even enough to pay for our amazon costs.

You are complaining about the level of support here. I wish we had more people here able to help.

In the meantime, there are people working on improving all of this, but that work is in 1.37.*, and in people's personal forks. If you this fixed, the thing to do is jump to 1.37, join slack and get involved.

Re: Why is ZMES skipping Events !Solved!

Posted: Wed Aug 10, 2022 1:29 am
by kaltertod
iconnor wrote: Tue Aug 09, 2022 10:06 pm It's not about 1 person donating. Blue Iris is a commercial product with a lot more resources. I was lamenting that this is the situation, and I cannot afford to fix it.

I don't even use ZMES and I didn't write it.

ZM donations are around $200/month. That's not even enough to pay for our amazon costs.

You are complaining about the level of support here. I wish we had more people here able to help.

In the meantime, there are people working on improving all of this, but that work is in 1.37.*, and in people's personal forks. If you this fixed, the thing to do is jump to 1.37, join slack and get involved.
Isaac,

I am not looking for you to fix it. I was simply looking for help from the community. I understand that asker developed/used to maintain zmes. I never asked you to fix the problem with zmes skipping events. I simply came here asking for help trying to fix the problem. I am not a guru and sometimes need help. You are the one that threw the monetary and time issue out there... I was simply asking for the community's help in trying to figure out the problem.

As of this post there are 5 of my own posts, 2 relevant posts from fontiano, and tsp84, and a total of 360 views of this thread without any reasonable analysis or direction to head to try and solve the problem.

If zmes is old and outdated and unsupported I think that it is time to quit advertising it on the main zoneminder page.I am not the only one here with this issue. Look here viewtopic.php?t=31794

1. My #1 complaint is the amount of people in this sub forum that looked at my issue and walked right past it, look at the views and look at the replies.

2. Yes Blue Iris is a commercial product that sells for money. There are 20 or less that work on it for a monetary sum. This is based on information available from Linkedin. In the linux world there are hundreds, if not more that work on zoneminder.

3. If my donations have meant nothing and continue to mean nothing fine.

4. I am sorry about your financial situation.

5. Is the forum not part of the community? If it is not then why is it here? If you want people to join the slack channel for support from the community just say so. If the forum is not the best place to get support from the linux community why not advertise it as such and get rid of the forum. It might help save you some traffic and reduce operating costs.

I am sorry about all of this, zoneminder is a great product. I have used it for many years. I am happy to state that I am still using 1 instance of zoneminder/zmes as a comparison against blue iris/deepstack.

I will continue to do so until I make a determination as to which is better and as of now zoneminder is lagging. I will fire up a vm and put 1.37 on it as stated and work on some scripts to look at other methods of AI detection.

At the end of the day it is about what platform works better and to a greater extent which has a better community. I am not about toxicity, I am quite the opposite in fact. I wish this project the best of luck.

Re: Why is ZMES skipping Events !Solved!

Posted: Wed Aug 10, 2022 3:34 pm
by asker
Notes:

1. When you post logs, please consider following the instructions, which involve debug logs. Link here. While you still may not get a definitive answer from the community, it will give both you and the viewers more places to look for problems. You've posted INF logs. Once you'll enable Debug logs, you'll see what the ES is trying to do for the failed events

2. If events such as 47242/47241 are examples of missed events, it looks like the detection logic is trying to access those frames but they are not available yet. You have multiple options, that you'll find in the documentation of the ML component:
a) Add a wait clause before the detection tries to grab frames (say wait=5 for that monitor)
b) Get more granular and play with the resiliency aspects for stream_sequence