Zone definition region points

Forum for questions and support relating to the 1.28.x releases only.
Post Reply
JRoque
Posts: 19
Joined: Tue Nov 30, 2010 12:45 am

Zone definition region points

Post by JRoque » Wed Mar 22, 2017 12:55 pm

Hello,

When I try to define new region points in either an existing or new zone, the video/grid is cut and does not reshape to the points defined. I have tried different camera brands, models, resolution, upgrade OS and ZM to 28.1 - nothing has worked.

I've had this issue for years. I was able to define my initial zones just fine but at some point that stopped working. I had seen others having this issue but can't find that topic here any longer.

ZM: V1.28.0
OS: Ubuntu 12.04.5 LTS
Cam: Foscam, Wansview, varied resolutions

Thanks,
JR

SteveGilvarry
Posts: 445
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Zone definition region points

Post by SteveGilvarry » Thu Mar 23, 2017 8:34 am

Haven't seen this before but current version is 1.30.0, some recent modifications to zones that may have helped.
Production Zoneminder 1.35.x
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

JRoque
Posts: 19
Joined: Tue Nov 30, 2010 12:45 am

Re: Zone definition region points

Post by JRoque » Thu Mar 23, 2017 5:15 pm

Thanks for your comment. I think the issue is related to mootools but mine seems configured correctly. I've even tried several versions of mootools but that didn't help. I noticed that switching to a different skin, ie: flat, does update the zone image sometimes.

Do you know if upgrading from 1.28 to 1.30.x on ubuntu 12.04 is possible or do I have to start with a fresh install?

Thanks,
JR

SteveGilvarry
Posts: 445
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Zone definition region points

Post by SteveGilvarry » Thu Mar 23, 2017 6:56 pm

Apologies I thought possible but none of the guides for upgrade cover 12.04, might have to be a fresh install onto later Ubuntu. Looks like 12.04 is end of life for support next month anyway. https://wiki.zoneminder.com/Common_Issu ... u#Upgrades
Shouldn't need to play with anything like mootools package version tested with installed versions.
Production Zoneminder 1.35.x
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

User avatar
iconnor
Posts: 1311
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Zone definition region points

Post by iconnor » Fri Mar 24, 2017 12:08 am

You can build from source (maybe) on 12.04, but I can't provide binary packages via ppa for it. It's just too old.

JRoque
Posts: 19
Joined: Tue Nov 30, 2010 12:45 am

[Solved] Zone definition region points

Post by JRoque » Fri Mar 24, 2017 6:28 am

Thanks both for your help.

I upgraded ubuntu to 14.04 first then installed zm 1.30 from iconnor's repository. Other than some minor tweaking like adding /zm to /cgi-bin/nph-zms path and installing ffmpeg, it upgraded fine. I was pleasantly surprised when the upgrade did not eat my SQL db or deleted my events or images like early zm builds did when "upgrading". All my monitors and carefully crafted alarm zones were there in the end. And just as important, editing zone region points works perfectly now. Thanks a million for that PPA, iconnor!

Next up: figuring out why 1.30 runs about 3 times slower than 1.28 - or uses 3 times more CPU. I'm sure I'm missing something or have some remnant from the previous version causing the issue. I'll search the forum and post elsewhere if I can't figure it out.

Thanks,
JR

User avatar
iconnor
Posts: 1311
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Zone definition region points

Post by iconnor » Fri Mar 24, 2017 10:19 pm

Hmm... that is interesting. I can't imagine why it would be slower. Which process is using more cpu?

JRoque
Posts: 19
Joined: Tue Nov 30, 2010 12:45 am

Re: Zone definition region points

Post by JRoque » Sat Mar 25, 2017 4:40 pm

Hello Isaac and thanks for your help.

I have 4 cameras active with 3 of them running motion detection at night, the 4th remains on monitor only. Three are low-res, one is 720p @ 512K bit rate, 10 fps.

I managed to cut some of the utilization by switching from /videostream.cgi to /snapshot.cgi on most of my (old) cameras. FPS now hovers around 4 which is a bit choppy from the 10 - 15 fps I was getting before under 1.28.

I run ZM on monitor during the day and modect at night. After the change above, monitor runs <50% CPU while modect run 100% (2 cores, 4Gb RAM, Ubuntu 14.04, VirtualBox guest).

I briefly switched to modect and captured top:

Code: Select all

top - 12:10:40 up 1 day,  8:51,  2 users,  load average: 3.48, 1.52, 0.76
Tasks:  98 total,   4 running,  94 sleeping,   0 stopped,   0 zombie
%Cpu(s):  7.4 us, 63.1 sy,  0.0 ni,  4.6 id,  0.0 wa,  0.0 hi, 24.9 si,  0.0 st
KiB Mem:   3615884 total,  1724388 used,  1891496 free,   194180 buffers
KiB Swap:   522236 total,        0 used,   522236 free.  1213088 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
20930 www-data  20   0  255500 121692 101240 R  91.3  3.4   0:24.45 zma
20856 www-data  20   0  177760  55528  40032 R  37.2  1.5   0:29.18 zma
20838 www-data  20   0  176856  54744  40032 S  19.3  1.5   0:20.04 zma
20857 www-data  20   0  285228 145368 112168 R  11.0  4.0   0:14.77 zmc
20847 www-data  20   0  160112  36084  22192 S   7.0  1.0   0:08.02 zmc
20830 www-data  20   0  177588  53436  40192 S   6.0  1.5   0:08.27 zmc
20814 www-data  20   0  177608  53440  40192 S   4.6  1.5   0:07.74 zmc
During the day modect triggers for most cameras due to wind/sun and that obviously affects utilization. From the snapshot above it looks like analysis is a little hot.

Here's df -h

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
udev            1.8G  4.0K  1.8G   1% /dev
tmpfs           354M  396K  353M   1% /run
/dev/sda1       7.3G  3.1G  3.9G  45% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            1.8G  414M  1.4G  24% /run/shm
none            100M     0  100M   0% /run/user
none            917G  769G  149G  84% /media/sf_events
none            917G  769G  149G  84% /media/sf_images
none            917G  769G  149G  84% /var/cache/zoneminder/events
none            917G  769G  149G  84% /var/cache/zoneminder/temp
none            917G  769G  149G  84% /var/cache/zoneminder/images
and iotop:

Code: Select all

Total DISK READ :       0.00 B/s | Total DISK WRITE :       7.41 K/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:      37.04 K/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
  137 be/3 root        0.00 B/s    0.00 B/s  0.00 %  1.49 % [jbd2/sda1-8]
21264 be/4 mysql       0.00 B/s    7.41 K/s  0.00 %  0.05 % mysqld
 1024 be/4 mysql       0.00 B/s    0.00 B/s  0.00 %  0.00 % mysqld
    1 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % init
    2 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [kthreadd]
    3 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [ksoftirqd/0]
 1028 be/4 mysql       0.00 B/s    0.00 B/s  0.00 %  0.00 % mysqld
    5 be/0 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [kworker/0:0H]
Regards,
JR

User avatar
iconnor
Posts: 1311
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Zone definition region points

Post by iconnor » Sat Mar 25, 2017 6:22 pm

Yeah, what have you set for your max fps, max alarm fps, etc? When using videostream, the camera will determine the fps. When using snapshot, zmc will be limited by whatever is set in those fields. There is also an analysis fps setting, which tells zm how many frames to use for modect. So you can reecord at 10 fps, but only analyze every 2fps or whatever you set.

When using top, you can hit c to have it show the command line, this will tell you which monitor is consuming all the cpu.

JRoque
Posts: 19
Joined: Tue Nov 30, 2010 12:45 am

Re: Zone definition region points

Post by JRoque » Sun Mar 26, 2017 12:38 am

Hi. When set to stream, I leave those fields blank. When set to snapshot, I put 8 for max, 15 for alarm. The HD camera is the only one that can limit FPS and I have that one set to 10 on the camera, blank in ZM. Thanks for the tip on analyze, I hadn't looked into that yet but it makes perfect sense to set that low, like 2 fps.

I need to look into my memory settings and see if they carried over after the upgrade. Anything different about 1.30 vs 1.28 on memory management? With 4Gb of RAM, 3 standard and 1 HD cams, what are the magic numbers to enter? If fact, I would like to add as much memory to cam buffers as possible so I can be ready when I upgrade the rest of the cameras to HD.

Hey thanks for your continued help! Don't mean to bug you so much over this.

Regards,
JR

JRoque
Posts: 19
Joined: Tue Nov 30, 2010 12:45 am

Re: Zone definition region points

Post by JRoque » Fri Mar 31, 2017 12:13 am

Hi all, to bring this to a close, I ended up upgrading VirtualBox host and extension pack from 4.3 to 5.1. This cut CPU utilization quite significantly. I'm still getting very poor frame rate and CPU is still higher than what it was under 1.28 but this is workable.
Thanks all!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests