Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Motion detection, crashes, detection stops in 1.37 #4178

Open
IgorA100 opened this issue Oct 23, 2024 · 14 comments
Open

Motion detection, crashes, detection stops in 1.37 #4178

IgorA100 opened this issue Oct 23, 2024 · 14 comments

Comments

@IgorA100
Copy link
Contributor

Describe Your Environment

  • Version of ZoneMinder 1,37 updated 22-10-24
  • How you installed ZoneMinder [Isaac Connor's PPA]
  • Full name and version of OS - Ubuntu 24.04.1

If the issue concerns a camera

  • China
  • frame rate - 15-20 (I haven't tried other values)
  • resolution - 2048*1536 H264B

Detection area settings
Alarm Check Method: Blobs
Min/Max Pixel Threshold (0-255): 10
Filter Width/Height (pixels): 3 - 15
Zone Area: 100%
Min/Max Alarmed Area: 0.12%
Min/Max Filtered Area: 0.12%
Min/Max Blob Area: 0.12%
Min/Max Blobs: 1

I tried changing Alarmed Area, Filtered Area, Blob Area, but this only affects the size of the detection area. The problem remains.

Describe the bug
Initially, detection works correctly, but after recording from 2 to 10 events, the camera starts recording continuously and stops analyzing movements. Then it can stop recording altogether! If you go to the camera settings and simply re-save, the camera works correctly for some time.

No errors. Free memory ~30Gb out of 64Gb, CPU load does not exceed 40%

I understand that there is little information, but if you run debugging level 3, there will be a huge file.
I have not been able to solve this problem for several weeks, it is probably a bug.

@connortechnology
Copy link
Member

connortechnology commented Oct 23, 2024

Not going to be able to help without a debug log. No one else is experiencing this.

We don't necessarily need the entire log, a snippet of a few hundred lines may do.

@IgorA100
Copy link
Contributor Author

Need level 3 debugging?
P.s., ONVIF motion detection was enabled on the camera. But ONVIF was disabled in ZM.
I tried to disable detection on the camera itself.
I will observe...

@IgorA100
Copy link
Contributor Author

After disabling ONVIF on the camera, there are no problems so far (for 20 hours). It is possible that ONVIF events transmitted from the camera interfere with the analysis of ZM detection.
Debug level 3 for 2 hours is 500 MB

@IgorA100
Copy link
Contributor Author

So, today's behavior:
During the day, there was definitely movement near the camera, but no motion detection was detected for 4 hours by ZM. Then the detection started working again.
I have a level 3 debug file of 1.2 GB. What should I do?

@connortechnology
Copy link
Member

You could try https://cloud.zoneminder.com/upload/upload_center.html

Or I can setup and ftp account

@IgorA100
Copy link
Contributor Author

The archived file is lightweight.
Here is the link: https://cloud.kentavr.com.ru/s/NSFWCGNASofiLWa/download/_debug.zip

@IgorA100
Copy link
Contributor Author

There were definitely movements between these two events that were not detected by ZM
2024-10-25 14:59:37 | 2024-10-25 15:00:14
2024-10-25 19:00:57 | 2024-10-25 19:06:43

@connortechnology
Copy link
Member

Not sure if this is the problem yet, but because you are analysing at 5fps but only decoding keyframes... you may skip over keyframes and generally not achieve any analysis. If you are going to only decode keyframes, then you really should not set an analysis limit so that it will analyze every keyframe.

@IgorA100
Copy link
Contributor Author

Now I completely stopped understanding what the "Analysis FPS" parameter means when "Decoding = Keyframes + Ondemand"
I assumed the following algorithm:

  • each Keyframe is decoded, as well as 5 more frames during a second.

That is, if the camera broadcasts with FPS=20 and Keyframes are transmitted every 2 seconds, then it will be like this:

  • The first key frame is analyzed
  • 4 frames are skipped and the next frame is analyzed (and so on five times during a second or ten times during two seconds)
  • The second key frame is analyzed
    And so on.

Am I wrong in my reasoning?

@connortechnology
Copy link
Member

Decoding=Keyframes means only keyframes are decoded. So you may skip over the only frame that was decoded.

If a frame was not decoded then we can't analyze it.

@IgorA100
Copy link
Contributor Author

IgorA100 commented Oct 25, 2024

So, in theory, the "Analysis FPS" parameter should not affect the analysis at all when Decoding=Keyframes?
But in fact it does affect?

I cleared the "Analysis FPS" parameter and will continue to monitor.

@connortechnology
Copy link
Member

Ideally. I have a patch where if decoding=KEYFRAMES and the packet is decoded it will analyse it, but that's not good enough. analysis fps could be set to 1/s but keyframe interval could be 2/s and so then we would be analysing at 2/s.

@IgorA100
Copy link
Contributor Author

IgorA100 commented Oct 26, 2024

With the "Analysis FPS" parameter unset (empty), events started to be recorded constantly (but there were also event skips!!!). More precisely, this is what happened:

  • I cleared the parameter at night.
  • There was no movement and ZM did not record events, everything is OK.
  • Movements appeared in the morning ~approximately at 2024-10-26 08:39:16, but ZM did not detect them!!!
  • The next movement occurred at 2024-10-26 09:02:09 and ZM started recording an event. But after the movement ended, the event recording did not stop. The recording lasted 10 minutes instead of 15-20 seconds (there was movement only in the first 12 seconds)
Cause Motion:All
Notes Motion: All
Start Time 10/26/24, 9:02:09AM GMT+3
End Time 10/26/24, 9:12:09AM GMT+3
Duration 00:10:00
Frames 10802 Alarm:1
Score Total:6 Max:6 Avg:6
  • The next events are:
Cause Continuous
Notes
Start Time 10/26/24, 9:12:09AM GMT+3
End Time 10/26/24, 9:22:09AM GMT+3
Duration 00:10:00
Frames 10799 Alarm:0
Score Total:0 Max:0 Avg:0

Although they shouldn't be there, because there was no movement....

Log: https://cloud.kentavr.com.ru/s/CKgyFiDZTdei2p7/download/_debug_02133.zip
That is, it got even worse......

It turns out that if you clear the "Analysis FPS" parameter, it still gets set to "2" when you save. I've set it to "90" now and will observe.

@connortechnology
Copy link
Member

Oh... that's a problem. I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants