Hi all. I've been using ZM for some time with limited success and I finally decided to knuckle down and get my system dialed in. Unfortunately, things aren't working like I would expect.
System
To begin, I have have 2 cameras with low and high res streams that make up my system. I set the low res streams, with at least one zone to analyze, to "Nodect". The high res streams are set to "Modect" with the corresponding low res stream as their linked monitor and no zones defined. The way I believe this should work is the low res does the heavy lifting of motion detection and the high res records a quality video once low-res decides there is motion. Admittedly, I don't recall the reason behind this configuration but it was suggested online... somewhere?
Motion detection within the zones is set to Blob with what I believe to be reasonable min/max values for each of the 3 detecting methods based on this article in the ZM Wiki - https://wiki.zoneminder.com/index.php/U ... or_Dummies.
Issues
There are a couple of issues I'm trying to understand and overcome. First, there are events that are captured by the low res streams that are not recorded by the high res streams. It seems to be related to the motion score but I don't understand why - for instance, if I walk through the field of view of one camera, both streams register and record events as expected. However, sometimes only the low res stream reports an event.
Second, one of my monitors is regularly alarming for motion outside of its zone. I don't know where or how to start with this issue because I thought the boundaries of the zone was Bible but I'm regularly getting recordings of activity outside of it.
Finally, I'd like to be able to tune the detection to ignore light changes such as lightning and headlights sweeping through the field of view. I believe the max alarmed or blob size is the key here but I'm not sure what the best method for tuning this is.
Thank you in advance!
Newbie Configuration Help
Re: Newbie Configuration Help
Hi keet. Your issue from the description is that you have setup your monitors incorrectly. The low resolution sub stream should be set to 'Modect' and the high resolution main stream should be set to 'Nodect'. The high resolution monitor should also use Linked Monitors and list your sub stream. If you do this then only the low resolution sub stream is analyzed and will trigger recording of the high resolution main stream when an alert is raised.
The detection and analysis settings are a different issue and I'll defer comments on that for now until you resolve the monitor defintions and linking.
The detection and analysis settings are a different issue and I'll defer comments on that for now until you resolve the monitor defintions and linking.
ZoneMinder 1.36.33 - Various Reolink, Ubiquiti cameras - NUC6CAYH - Ubuntu Server 22.04
Re: Newbie Configuration Help
Thank you for the replyefranzwa!
Unfortunately (or luckily??) there's a typo in my original post and, indeed, my low-res streams are set to 'Modect' and high-res are set to 'Nodect' as you instructed.
Unfortunately (or luckily??) there's a typo in my original post and, indeed, my low-res streams are set to 'Modect' and high-res are set to 'Nodect' as you instructed.
Re: Newbie Configuration Help
Hi keet, great to know you have the most important item set correctly which is the linking of your Main stream (hi res) to Sub stream (low res) monitor to trigger events. I'll have to preface my comments by stating that there are literally 1000+ settings in ZoneMinder and your camera's firmware which could influence the expected capturing of events. So my comments are based on what I have experienced.
I see you have listed three issues. Let's take them individually.
1. Sub stream triggered events that are not recorded from Main stream: On my Console I see that the number of events captured for linked Main and Sub monitors is always equal, so this should work as expected. One issue that I had during setup was that my camera firmware was set to Variable Framerate and ZoneMinder does not like that. In your firmware check to see that you have properly defined the Frames Per Second (FPS), Fixed (not variable) framerate and I-Frame Interval (if available). The FPS of your camera streams is very important and you will need to know that number for both Main and Sub stream (my camera has different FPS available for both). Monitor Buffers need to be set carefully. I set the Image Buffer Size to 2*FPS, or 2 seconds worth of frames. Both Pre and Post Event Image Count are set to FPS. For Monitor Storage I disable Save JPEGs and use h264 Camera Passthrough for Video Writer. This drastically reduces the CPU use of your server. I have found that overloading the server CPU can cause errors to occurr during events. Keep in mind these comments are based on my setup and usage, there could easily be 1000+ things that can interfere with event detection.
2. Alarms occurr for events outside defined zones: By definition this should not happen. When you define a new Monitor there is a default zone defined which covers the entire field of view for camera. Did you remember to delete this one? I also have learned to just use the most optimal Zone Preset for my use case. In the past I tried to set all of the Zone parameters manually which was a mistake (for me, maybe not for ZM experts) ... after reading the ZM Documentation I concluded that there is TOO MUCH configurability and is very easy to mis-configure one setting box and really degrade the event riggering.
3. Ignore large changes across field of view: There is a setting for this. In your individual Zone settings look for Overload Frame Ignore Count. This helps ignore large changes like a light turning on that overloads the camera sensors for a few frames, car headlights, lightning and such. Default is 0, set to 1 or higher, you may need to experiment with this.
Hope that helps debug and optimize your setup. Cheers!
I see you have listed three issues. Let's take them individually.
1. Sub stream triggered events that are not recorded from Main stream: On my Console I see that the number of events captured for linked Main and Sub monitors is always equal, so this should work as expected. One issue that I had during setup was that my camera firmware was set to Variable Framerate and ZoneMinder does not like that. In your firmware check to see that you have properly defined the Frames Per Second (FPS), Fixed (not variable) framerate and I-Frame Interval (if available). The FPS of your camera streams is very important and you will need to know that number for both Main and Sub stream (my camera has different FPS available for both). Monitor Buffers need to be set carefully. I set the Image Buffer Size to 2*FPS, or 2 seconds worth of frames. Both Pre and Post Event Image Count are set to FPS. For Monitor Storage I disable Save JPEGs and use h264 Camera Passthrough for Video Writer. This drastically reduces the CPU use of your server. I have found that overloading the server CPU can cause errors to occurr during events. Keep in mind these comments are based on my setup and usage, there could easily be 1000+ things that can interfere with event detection.
2. Alarms occurr for events outside defined zones: By definition this should not happen. When you define a new Monitor there is a default zone defined which covers the entire field of view for camera. Did you remember to delete this one? I also have learned to just use the most optimal Zone Preset for my use case. In the past I tried to set all of the Zone parameters manually which was a mistake (for me, maybe not for ZM experts) ... after reading the ZM Documentation I concluded that there is TOO MUCH configurability and is very easy to mis-configure one setting box and really degrade the event riggering.
3. Ignore large changes across field of view: There is a setting for this. In your individual Zone settings look for Overload Frame Ignore Count. This helps ignore large changes like a light turning on that overloads the camera sensors for a few frames, car headlights, lightning and such. Default is 0, set to 1 or higher, you may need to experiment with this.
Hope that helps debug and optimize your setup. Cheers!
ZoneMinder 1.36.33 - Various Reolink, Ubiquiti cameras - NUC6CAYH - Ubuntu Server 22.04
Re: Newbie Configuration Help
Thank you so much for the thorough rundown. I agree that ZM has too much configurability and, in my opinion, too little documentation describing just exactly how things work.
1. I did have some changes to make here, especially around the frame rates. I used VLC to open the streams and check the video size and rates and updated the buffers and frame analysis accordingly. I also made sure, in the camera I can control, the framerate wasn't set to variable. Only time will tell if this improves things and I get one-to-one recordings moving forward.
2. This one really bothers me and I'm not sure what to make of it. At first, I thought it was a result of modifying the boundaries of the default zone but, after deleting the modified zone and creating a new one, I continued to get alarms for events outside of the boundaries. For reference, here is my zone: And here is one of many events occurring outside of that zone: My hope is that, by correcting the issues above in #1, the issues of #2 will follow suit...
[FOLLOW UP] - I'm still getting notifications for vehicles passing in the street....
3. I've looked at the Overload Frame count and, although we haven't had a good storm since, I did bump it up to a few frames to try and take care of lightning and such. Unfortunately, it's not taking care of things like when my neighbor parks his truck at night. What's got me scratching my head is that it appears to be a large change in coloration but the blob that's being detected is fairly small (stand it up vertically and it's about the size of a child). Any thoughts on what's going on here?
1. I did have some changes to make here, especially around the frame rates. I used VLC to open the streams and check the video size and rates and updated the buffers and frame analysis accordingly. I also made sure, in the camera I can control, the framerate wasn't set to variable. Only time will tell if this improves things and I get one-to-one recordings moving forward.
2. This one really bothers me and I'm not sure what to make of it. At first, I thought it was a result of modifying the boundaries of the default zone but, after deleting the modified zone and creating a new one, I continued to get alarms for events outside of the boundaries. For reference, here is my zone: And here is one of many events occurring outside of that zone: My hope is that, by correcting the issues above in #1, the issues of #2 will follow suit...
[FOLLOW UP] - I'm still getting notifications for vehicles passing in the street....
3. I've looked at the Overload Frame count and, although we haven't had a good storm since, I did bump it up to a few frames to try and take care of lightning and such. Unfortunately, it's not taking care of things like when my neighbor parks his truck at night. What's got me scratching my head is that it appears to be a large change in coloration but the blob that's being detected is fairly small (stand it up vertically and it's about the size of a child). Any thoughts on what's going on here?
Re: Newbie Configuration Help
Issue 2: Still not sure how this is even possible. I did re-read the documentation Zone section (maybe my 10th time since using ZoneMinder in the past 8 years). In the Region Points section it is noted that 'It is possible to accidentally place a control point outside of the valid
coordinates of the image. This will prevent the monitor from working properly.'. The first thing to check is that there are no coordinates of the zone boundary that fall outside your camera resolution. The Sub stream for my camera inserted below is 640x360 pixels so the allowable range in the Zone setup is 0-639 for the x-axis and 0-359 for the y-axis. The 0,0 location starts at upper left of the image.
Issue 2: My second recomendation is to not use a single complex zone shape. I would break this into 2 or 3 zones that use only 4-5 coordinate points each. And make sure that the point coordinates are within the actual pixel range of your camera stream. Perhaps one zone that is close to the camera, one for the walkway and one out on the lawn. The event info will tell you which zones are being triggered and that may help you refine the zones even further. When I started using ZoneMinder I had way too many zones defined, today my cameras have 1-2 zones defined each. One other general comment regarding your zones is that you most likely don't need to cover the high areas of the walls. Only cover areas where humans will actually be in the images. This reduces the number of pixels being analyzed (CPU use) and will reduce the number of false positives such as headlights or shifting clouds that change the brightness of the high areas of the walls.
Issue 3: ZM is detecting a blob and unfortunately the Overload Frame Count will not help this issue. Now we are getting into the really hard part of Zone setup. Having a pretty deep understanding of the Zone detection algorithims and settings is needed here. And I have to admit after 8 years of ZM use that I do not have this deep knowledge which the developers of the code must have. Thus my earlier comment about too much configurability of the detection algorithms. Based on the description in the official Documentation my best advice would be to adjust the Min Pixel Threshold upward. This will reduce the sensitivity of the changes in brightness of each pixel between frames and prevent this blob from being detected. I have found that this issue of false detections at night is common due to the large changes of contrast caused by lights, especially headlights from cars. You most likely will never prevent all fase detections ... just focus on reducing to a reasonable level.
Cheers!
coordinates of the image. This will prevent the monitor from working properly.'. The first thing to check is that there are no coordinates of the zone boundary that fall outside your camera resolution. The Sub stream for my camera inserted below is 640x360 pixels so the allowable range in the Zone setup is 0-639 for the x-axis and 0-359 for the y-axis. The 0,0 location starts at upper left of the image.
Issue 2: My second recomendation is to not use a single complex zone shape. I would break this into 2 or 3 zones that use only 4-5 coordinate points each. And make sure that the point coordinates are within the actual pixel range of your camera stream. Perhaps one zone that is close to the camera, one for the walkway and one out on the lawn. The event info will tell you which zones are being triggered and that may help you refine the zones even further. When I started using ZoneMinder I had way too many zones defined, today my cameras have 1-2 zones defined each. One other general comment regarding your zones is that you most likely don't need to cover the high areas of the walls. Only cover areas where humans will actually be in the images. This reduces the number of pixels being analyzed (CPU use) and will reduce the number of false positives such as headlights or shifting clouds that change the brightness of the high areas of the walls.
Issue 3: ZM is detecting a blob and unfortunately the Overload Frame Count will not help this issue. Now we are getting into the really hard part of Zone setup. Having a pretty deep understanding of the Zone detection algorithims and settings is needed here. And I have to admit after 8 years of ZM use that I do not have this deep knowledge which the developers of the code must have. Thus my earlier comment about too much configurability of the detection algorithms. Based on the description in the official Documentation my best advice would be to adjust the Min Pixel Threshold upward. This will reduce the sensitivity of the changes in brightness of each pixel between frames and prevent this blob from being detected. I have found that this issue of false detections at night is common due to the large changes of contrast caused by lights, especially headlights from cars. You most likely will never prevent all fase detections ... just focus on reducing to a reasonable level.
Cheers!
ZoneMinder 1.36.33 - Various Reolink, Ubiquiti cameras - NUC6CAYH - Ubuntu Server 22.04
Re: Newbie Configuration Help
Well, a few follow ups. I was able to solve issue #2 by deleting and recreating the offending zone. I'm guessing something got tweaked just enough during the reconfiguration of the monitor that, as you suggested, one of the points ended up outside the actual scope of the image.
Issue #1 still persists, however. Yesterday my son played in the driveway while I mowed the lawn and the low stream monitor had 300-something events while the high stream only had 30-something. I may have to hunt down the instructions I followed and see if I missed a step because something isn't working as designed here...
Issue #1 still persists, however. Yesterday my son played in the driveway while I mowed the lawn and the low stream monitor had 300-something events while the high stream only had 30-something. I may have to hunt down the instructions I followed and see if I missed a step because something isn't working as designed here...
Re: Newbie Configuration Help
Hi keet, good to hear the alarm is now being triggered only in the defined zones.
Regarding issue #1 of linked monitor not being triggered, I checked my events and there are some missed on the linked monitors. I have 4 cameras and for the last week here are the number of events for the Main (which is linked to Sub) and Sub: 225/228, 169/172, 42/42, 184/193. So my linked triggering is actually only 95%, not 100% as I thought earlier. So we do have a simiar issue although at a much different magnitude. I belive that my missed events on Main are *possibly* due to very short events on the Sub. I will look into this more on my end.
My thought for your case is that this is most likely due to the camera setup (FPS, keyframe rate, and whether the FPS and keyframe are variable or constant) and also the Monitor Buffers settings.
My camera firmware luckily allows the FPS and the keyframe rate to be set constant so this should help ZM analysis to be more consistent. My keyframe rate is set equal to the FPS which should be a keyframe every second. The keyframes and how often they appear in your stream are most likley very important for ZM analysis.
Monitor Buffers need to be set appropriately. I may have to make more adjustments to get my linked triggering to 100% but my strategy is to set Image Buffers to 2xFPS, Pre/Post Event Count equal to FPS. Probably increasing these could help but I was attempting to reduce memory/CPU requirements. One of my Sub Monitor Buffers is shown below.
Cheers and hope this helps. Let me know how this works for you and if you can increase your linked triggering.

Regarding issue #1 of linked monitor not being triggered, I checked my events and there are some missed on the linked monitors. I have 4 cameras and for the last week here are the number of events for the Main (which is linked to Sub) and Sub: 225/228, 169/172, 42/42, 184/193. So my linked triggering is actually only 95%, not 100% as I thought earlier. So we do have a simiar issue although at a much different magnitude. I belive that my missed events on Main are *possibly* due to very short events on the Sub. I will look into this more on my end.
My thought for your case is that this is most likely due to the camera setup (FPS, keyframe rate, and whether the FPS and keyframe are variable or constant) and also the Monitor Buffers settings.
My camera firmware luckily allows the FPS and the keyframe rate to be set constant so this should help ZM analysis to be more consistent. My keyframe rate is set equal to the FPS which should be a keyframe every second. The keyframes and how often they appear in your stream are most likley very important for ZM analysis.
Monitor Buffers need to be set appropriately. I may have to make more adjustments to get my linked triggering to 100% but my strategy is to set Image Buffers to 2xFPS, Pre/Post Event Count equal to FPS. Probably increasing these could help but I was attempting to reduce memory/CPU requirements. One of my Sub Monitor Buffers is shown below.
Cheers and hope this helps. Let me know how this works for you and if you can increase your linked triggering.

- Attachments
-
- zm-buffers.png (29.72 KiB) Viewed 3269 times
ZoneMinder 1.36.33 - Various Reolink, Ubiquiti cameras - NUC6CAYH - Ubuntu Server 22.04