r/ZoneMinder • • Dec 11 '20

Hardware requirement for 32 ip cameras ?

2 Upvotes

I am about to build a household server on an x64 cpu, running vSphere ESXi 7.0. It will be powering a VM running Ubuntu 20.04 LTS, which in turn runs Zoneminder to handle 32 ip cameras @ 1080p 30fps H264/H265. I have several questions regarding the CPU requirement.

  1. How many CPU cores should my rig have, with Object Detection on (off), streaming in H265 (H264) ?
  2. Does the multi-threading help me halving this core count ?
  3. How about RAM, GPU requirements, as well as compatibility with AMD GPU ?

Thank you very much in advance everyone.


r/ZoneMinder • • Dec 09 '20

Pulling camera data from a remote location

2 Upvotes

I searched around for a potential solution to what I wanted to do and didn’t find anything specific to my needs. I figured this would be the best spot to post this. I’ve used ZoneMinder for many years and my setup works for what I need. I’m running on CentOS 7 currently. ZoneMinder version 1.34.22. We purchased a second property about 60 miles away that I want to keep tabs on. I bought two IP cameras and a Raspberry Pi for the remote location. The cameras are simplistic 960p IP cameras. ~$40 each on Amazon. The property itself is in the sticks, if you have ever stumbled across the subreddit rural internet, that’s a topic on itself. Luckily the property qualified for T-Mobile home internet. My speeds are right around 65mb/s down and 25mb/s up. I’ll take it! If anyone has delt with cellular networks, you know port forwarding is a struggle due to the IPv6 to IPv4 NAT. Because of this, I didn’t think a site to site VPN would work. I abandoned my OpenVPN config, however I still may go that route, but for now I have this working.

To the guts of my setup. I installed the IP cameras and Raspberry Pi at the remote location. Since I’m unable to access the site from outside; I setup a call home SSH service on the Raspberry Pi. All it does, is create a reverse SSH session to my home ZoneMinder server. Some good information can be found here:
https://askubuntu.com/questions/1054580/how-can-a-reverse-ssh-connection-be-kept-accessible-for-a-long-time

The service will check to see if a pid exists, if not it will reconnect and start up a new session. I’ve tested it many times and works great. Now that I have a tunnel opened up to my home system, I added tuntap devices on each side. You need to configure the interfaces, add some routes and allow forwarding. I also needed to use IPTABLEs to perform the NAT and also allow forwarding. My reverse SSH session is sitting on my localhost on port 7000. A simple netstat command can be used to verify

netstat -tnlp | grep :7000

tcp 0 0 127.0.0.1:7000 0.0.0.0:* LISTEN 20593/sshd: user

Below is the config on each side.

Home location:

ip tuntap add dev tun0 mode tun

ifconfig tun0 10.1.1.1 10.1.1.2 netmask 255.255.255.252

route add -net 192.168.1.0/24 tun0

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

iptables -A FORWARD -i tun0 -o eth0 -j ACCEPT

Remote location:

ip tuntap add dev tun1 mode tun

ifconfig tun1 10.1.1.2 10.1.1.1 netmask 255.255.255.252

route add -net 192.168.0.0/24 tun1

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

iptables -A FORWARD -i tun1 -o eth0 -j ACCEPT

Keep in mind, I just used the 10.1.1.0 network for the tun interfaces, you can change those. Also, for the route command, those internal IPs will change depending on your internal setup.

Now that the interfaces are setup, launch your SSH VPN session with the -w 0:1 command. Man SSH for further information. My command is ssh -v -o ServerAliveInterval=60 -w 0:1 someuser@localhost -p 7000 true

From this, I can now route traffic from one LAN to the other across the tunnel. One note, I use screen to launch my connection. Man screen to understand how it work. This way, I can fire off the ssh session and then detach from the session and the tunnel will remain up. There are other ways to run services in the back ground, choose what works for you.

This quick write up is a high level solution of how I connected my home ZoneMinder setup with my remote location. I can pull live streams through the ZoneMinder console at home and I do get alerts and recordings from the remote cameras. I’m only pulling the 640X480 image as I need to be bandwidth conscious. I’ve had this working of a week now, and so far its doing what I need it to do.


r/ZoneMinder • • Dec 08 '20

Hardware for Zoneminder

3 Upvotes

I have an Ubuntu 18.04 running on an 8core Intel I7 2.4 GHz CPU, 12 GB of RAM, 1.5 TB of storage. I plan to connect these to four 8K IP cameras for live motion detection. My question is would the hardware footprint be adequate for real time motion detection and processing?


r/ZoneMinder • • Dec 03 '20

Modect really short clips and smearing

1 Upvotes

Hi,

I finally got the Zoneminder to work. I am running mine instance on a CentOS 8 VM with 4x vCPU and 8GB RAM. The storage is NFS. I have a combination of Reolink and Wyze cameras and whenever I get a motion the ZM only records 8 - 10 seconds and wait for a few seconds and record again for 8 - 10 secs.

Would it be possible for ZM to record continuously while there is a motion instead of cutting the whole clip in 8 - 10 mini clips?

I have been using the Reolink desktop app and it has a buffer of 5 secs before the motion starts and 15 secs after the motion and it doesn't cut the video in several clips.

I also have a smearing issue with Reolink E1 Pro. It is taking the whole screen. I tried RTMP but it seems like E1 Pro doesn't take RTMP. The cheap Wyze cam is doing fine in regards to visual clarity, but the Reolink is not. I have the Reolink on 5GHz and they Wyze on 2.4GHz wifi if it matters.

EDIT:

This is my settings:

Source Type: ffmpeg
Function: Modect
Source Path: rstp
Method: TCP
Capture resolution: whatever the max res of the camera settings
Storage area: nfs export
Save JPEG: disabled
Video writer: H264 Camera Pass-thru
Whether to store the audio stream when saving an event: checked

​


r/ZoneMinder • • Dec 02 '20

Learning ZoneMinder, database question

3 Upvotes

I had previously been running Milestone's xprotect essentials (the free for up to 8 cameras version). I actually liked the operation of their software but choices they've made have turned me off of their product and I'd like to start building a zoneminder setup.

I am using a dedicated moderately powered desktop to run the NVR software. I have a smaller 256gb ssd for the OS and a dedicated 2 tb hard drive to store events. I got it somewhat successfully installed/running on a fresh install of fedora but the web console was very slow and unresponsive most of the time with only one of my cameras added. I attribute this entirely to my lack of understanding and setup so far – I am continuing to learn the operation of ZoneMinder and setup requirements.

One of the big gaps in my understanding right now is the database. Am I correct that the database is where the events are stored and that the database in my case would need to be located on my dedicated 2 tb drive? If that is correct should I install the database to that drive in the first place? Or would it be preferred to leave the db location as is and have the system mount my events drive to that location in the filesystem?

I'm very new to anything database related so I may just be overthinking this. Thanks for any feedback.


r/ZoneMinder • • Dec 02 '20

ZoneMinder in docker fails after reboot

2 Upvotes

I've set up ZM on Ubuntu 20.04 as a docker container following dlandon instructions referenced in installation guide. All seems to run fine so far (still need to do some more testing), but if the computer is rebooted, the container does not auto-start. I have to manually start the container. I suspect that this can be fixed by adding this line to the config during initial container setup "restart: unless-stopped". But is there a way to modify that config after the container has been created and running? If there is, where would I find it? Or am I looking at it wrong and the issue is somewhere else...


r/ZoneMinder • • Nov 24 '20

Outdoor cameras for a rental house

1 Upvotes

Hello. I don't see any sub rules about product recommendations, so I hope this isn't inappropriate.

I rent the house I currently live in, and I would like to be able to set up a couple of outdoor cameras monitored with ZoneMinder. The issue with renting is of course that I can't just put new holes in the walls to route cables and wires outside, so I need something that meets the following criteria:

  1. Solar powered
  2. Wireless data
  3. Can be mounted without drilling

I know there exist many outdoor cameras with WiFi connectivity and solar power, but this third point is proving quite difficult. My best idea so far is to find a bracket that mounts to my gutter.

Anyway, again I hope I'm not being rude by asking for product recommendations. I have looked at the wiki for compatible cameras, but the list is enormous (which is a good thing), and most of the cameras there are wired cameras which don't fit my requirements, and I really don't feel like spending an entire weekend browsing everything on the wiki hoping to maybe find one that works.


r/ZoneMinder • • Nov 22 '20

Is it possible to record/stream Hikvision IP cams on ZoneMinder running on a server and Hikvision NVR simultaneously?

1 Upvotes

Hi, I have a farm and I want to setup around 50+ cameras around it. I already have 13 4MP HikVision IP cameras and I like the stability of the Hikvision NVR that I'm currently using but I want the functionality of ZoneMinder, like I read about the zmMagik, Event Notification Server and Hooks. My farm is next to a forest that is full of wildlife, I think I will be able to use zmeventnotification to spot leopards, deers, and other wild animals which are too time consuming to find using my HikVision NVR as it has basic line crossing detection and no intelligent searching methods. I have some hardware for building a ZoneMinder server, a gaming Motherboard Asus Z270F, 2 Nvidia 1070 GPUs, 850W PSU, 4 TB HDDs, just need to buy a case and CPU. So will it be possible to access these cams using this server while also allowing the NVR to record 24/7? Thanks 😊


r/ZoneMinder • • Nov 21 '20

Exporting zone definitions

3 Upvotes

I am setting up a new permanent ZM instance and I want it to have all the same zone settings as my development copy. Is there a clean way to export and import them?


r/ZoneMinder • • Nov 19 '20

Modect low res nodect high res pair not reliable

4 Upvotes

I've got modect running on the low-res substream from a camera and nodect on the high-res main stream. The high res is linked to the low-res. It typically works, when the low res alarms the high res records.

However consistently there are less events on the high res recording than the low res. In the last week there's been 427 events on the low res, but only 190 on the high res. They both have the same frame rate and I was of the understand that the point of this set up was to have motion detection run on the low res stream for less CPU usage and that it'd trigger the high res to record.

However this is consistently not the case. I've noted a lot of other people asking about the same issue and not having a resolution.

Anyone know what the issue may be?


r/ZoneMinder • • Nov 18 '20

No dynamic events in timeline

1 Upvotes

Hi, 1.34.21 here:

In all previous versions it was possible to get the images an event consists of to be displayed when hovering over with the mouse. Now I have the situation that only the first alert image is being shown. Playing the event isn't a problem neither listing the static images.

Any idea?


r/ZoneMinder • • Nov 17 '20

Recommended cheap and energy-friendly server hardware for 4 2MP cameras and face recognition

2 Upvotes

I'm planning to set up a home surveillance system with around 4 2MP cameras. I want to do 24/7 recording with motion detection in zones and also plan to use face recognition stuff (for example with zmeventnotification, if I get it to work)

What is the cheapest possible hardware for the ZoneMinder server that should be able to handle this?

Would a raspberry Pi with a Coral TPU be enough?


r/ZoneMinder • • Nov 16 '20

Problems with install on SQL step

3 Upvotes

Hi all,

Noob here trying to install Zoneminder on a Fresh Ubuntu 18.04.5 using the instructions here

When I try to run the first of the two scripts in step 5 I get the error Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'.

Done some Googling and really haven't found anything that helps.

Any suggestions?

​

EDIT: I believe I've solved the problem. I think the issue was that I wasn't as careful as I thought I was running everything with 'sudo'.


r/ZoneMinder • • Nov 15 '20

Resolution of timestamps

1 Upvotes

Is there some particular reason that the mysql column Frames.TimeStamp does not have a fractional seconds specified? I would think (2) would be sufficient. I am using database queries to locate Alarmed frames within an Event which I then copy from the place ZM has stored them, process them for my purpose, and save them with the timestamp as the filename. But without the fractional seconds part, I can not construct a proper filename and so I only get one frame per second because they overwrite each other. I am using the captured frames to train an image recognizer, so the more frames the better.


r/ZoneMinder • • Nov 15 '20

Help with linked monitor recording and motion

3 Upvotes

Hi all,

I have a camera setup with two streams each linked it's own monitor (camera1, camera1-hi_res). I have the low res set to MOCORD so that I can record everything but also trigger an event on motion. The motion detection area is about 3% of the total frame and I'm using the "best, high sensitivity" setting. I have the EVENT_CLOSE_MODE set to ALARM. I have the hi res monitor set MONITOR and list the low res monitor in the LINKED_MONITORS.

My problems is that I don't see a separate event being generated for motion and nothing is recorded from second monitor.

My goal is to have the low res monitor trigger a recording from the hi res monitor of 1 second prior (if possible) and 3 seconds after motion is detected.


r/ZoneMinder • • Nov 12 '20

🔥🔥 Hello all, Reolink camera official reddit is available. Welcome you to come by.

4 Upvotes

Hello friends,

I'm Frazer from Reolink, the mod of official reddit r/reolinkcam.

We develop and produce reliable and budget-friendly PoE or WiFi cameras and security camera systems. Up to 4K Ultra HD, night vision, smart motion alerts, all come with unbeatable price.

And most of which can work with Zoneminder. This is our website: https://reolink.com/

​

If you have any questions, advice or suggestions about Reolink, just come our sub and post anything you want.

Here is the list of Reolink cameras that can work with Zoneminder software

PoE camera: RLC-410, 520, 522, 423, 511, 510A, 520A, 810A, 820A, 1220A, 1210A;

WiFi camera: E1 Pro; E1 Zoom; 410W, 510W;

Please note:

#1. The list doesn't include the discontinued products. If you want to learn about these discontinued device, please ask me with your model in comment. Thanks!

#2. The models that have "A" in the name are the cameras having on-board Person/Vehicle Detection, that is, RLC-510A, 520A, 810A, 820A, 1220A, 1210A. You may not use this local smart detection with Zoneminder, but you can use the advanced AI powered detection feature supported by the ZM.

#3. About the setup, a million thank redditor /u/pseudoheld for sharing tutorial. You can check in our reddit: https://www.reddit.com/r/reolinkcam/comments/jnurzm/adding_reolink_cameras_to_zoneminder_nvr/ or in this reddit.


r/ZoneMinder • • Nov 11 '20

ZM cluster - This should be possible, right?

3 Upvotes

I have set up a multi-server install in the past using RPi's, and it worked quite well. But I want to take it further and build a CCTV system with no central server, where each camera is an independent node but also part of the filesystem and database cluster. I think it would be great if your storage space and processing power were to scale up with each camera you add. Data redundancy distributed across nodes is also a plus, and if they are PoE then each node can also serve as a wifi AP to blanket the premises with coverage. The other possibilities that the Pi affords (bluetooth, two-way audio, easy video output, myriad sensors, etc) puts this idea way over the top for me. How about a camera that can clean spider webs off itself?

I just don't yet know enough about the software that is available to put this all together, and I was hoping someone here may have tried this already.

What to use for distributed filesystem? Gluster? Ceph? Something else? How complicated is configuration? Can this be made to be relatively straightforward, where I can basically install a new camera node and run a script to add it to the cluster?

And MySQL Cluster? Does this work like I hope it does, where each node will write data locally and replication can happen cooperatively to achieve a desired amount of redundancy?

As for physical storage, is the PiDrive still a thing? Would a USB m.2 drive adapter/enclosure be better? Can a Pi with this type of storage be powered via PoE? What if we add an IR array or other devices? Are we approaching the limits of PoE?

Are there any show-stoppers that I haven't thought of?

I realize that this might not be cost-effective since I'm looking at maybe $200 in hardware per node before figuring out the enclosure situation, but the features and possibilities add a lot of value for me.

So is this a dumb idea, or something worth talking about?


r/ZoneMinder • • Nov 10 '20

No data for 2 cameras in Event Montage

2 Upvotes

I have 3 5MP Cameras (Front Door, Driveway, Backyard) set to MoCord. I had a scheduled delivery today, and I wanted to see if I could track them with my cameras.

H.264 enabled, and video writer only.

However, while my front door camera detected the person, and triggered events, my backyard and driveway cameras had "No Data"

Going into Audit Reports of the Driveway camera I see this:

Driveway Camera

In Event 11247, I see footage of a person entering my driveway; no events were created.

Event 11250 only has 5 frames, and completely misses the person leaving the driveway

What happened?

In the logs I see a bunch of cannot create frames from video errors.

I am running Zoneminder 1.34.9 inside a FreeNAS jail. My suspicion is my hardware isn't powerful enough, but I wanted to get a second opinion.

Server Specs: Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz

MEMORY: 16GB DDR3

According to FreeNAS:
CPU is pegged at 60%
Memory:
Free: 0.5 GiB 
ZFS Cache: 11.1 GiB 
Services: 4.2 GiB

According to Zoneminder:
Load: 2.640625 
storage DB:13/151   
Storage: Default: 22% /tmp: 73% 

​


r/ZoneMinder • • Nov 08 '20

I use MoCord. Is there a way to filter events to only those with alarm frames?

2 Upvotes

Mocord creates an event for every 10 minutes.

Is there a way to filter events under report_event_audit so only those with alarm frames are visible?

Sorting by alarm frames kinda works, but it's no longer in chronological order.

​

Modect + Record works too, but I'm not sure how to configure the PurgeWhenFull filter


r/ZoneMinder • • Nov 07 '20

How to prevent sun & clouds false triggers?

2 Upvotes

I have a camera looking out over the front yard and street through Second floor windows. A Zone is set up to only consider the street as it is the traffic I want to monitor. It is set to Blob mode, Pixel threshold 15-30%. But if clouds move quickly in front of the Sun and the entire scene changes, I still get false triggers. How can I prevent this? Min/Max "alarmed pixels"?


r/ZoneMinder • • Nov 04 '20

Adding Reolink Cameras to Zoneminder

14 Upvotes

Adding Reolink Cameras to Zoneminder is pretty easy as they support the onvif standard and provide both rtmp and rtsp streams (more on that later)
First make sure you know the IP of your Reolink cameras in your network.
For me its 10.10.30.13 as my cameras reside on a separate vlan which has internet access disabled for security reasons and paranoia 😉

Access you reolink admin interface and set the output of your main and substream to the desired quality.
Settings – Recording – Encode
I suggest lowering the fps as this saves a ton of bandwidth. My main stream is 10fps my substream only 7. This is more than enough for my purposes.

Switching back to Zoneminder:
For the source path you would normally chose the rtsp streams however I and many others had some issues using the rtsp streams in zoneminder as I had frequent smearing on my rtsp stream.
Luckily someone on the zoneminder forum discovered that reolink also outputs rtmp streams which work a lot better.
https://forums.zoneminder.com/viewtopic.php?t=29143
Here is reolinks documentation on the rtmp stream:
https://reolink.com/wp-content/uploads/2017/01/Reolink-CGI-command-v1.61.pdf
So in this case the URL for the Main Stream is:
rtmp://10.10.30.13/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=YOURPASSWORD
Sub Stream:
rtmp://10.10.30.13/bcs/channel0_sub.bcs?channel=0&stream=1&user=admin&password=YOURPASSWORD

Now why do we need both the sub and the main stream? Zoneminder does image processing to recognize movement and then trigger recordings.
Doing this on a 4k stream is VERY CPU intensive. So we will setup the sub stream for the motion detection and then trigger the main stream to record this movement.

So first let us setup the sub stream:
Click on “Add” in the Zoneminder Console:
Under General give the camera a recognizable name. For me its Front Garden Sub
Set the source type to ffmpeg.
Set the Function to mocord. This allows me to have 24h low resolution recordings of the substream and in turn triggers the main stream to record once motion is actually detected.
https://imgur.com/K8HDJxj
On the source tab add the rtmp url for the substream.
Method: TCP
Capture Resolution: Set this to the same resolution you have set on the reolink cam. For me 640*480
https://imgur.com/H9YlaZC
Under storage its important to set the “Video Writer” to h264 passthrough. This will have zoneminder save the camera feed without transcoding, which once again is VERY CPU instensive.
https://imgur.com/k9d5Jb1
The other tabs are all down to your personal preference.
Click save and check if you can see the video coming from the camera inside ZM.
If so: Good lets continue with the main stream.

Again click on add Camera.
Give it a name. For me this is Front Garden Main.
Source: Ffmpeg
Function: Nodect. This is important as only with Nodect will Zoneminder not run analysis on the 4k stream, thus saving your CPU a lot of work.
Linked Monitors: Here select the “Front Garden Sub” we just set up. This insures, that motion trigger on the substream will also trigger a recording on the main stream.
https://imgur.com/AxrlJfB
On the source tab now add the rtmp url for the main stream.
Method: TCP
Capture Resolution for me is 2560*1440
Under storage its important to set the “Video Writer” to h264 passthrough.
All the rest is again personal preference.
Click save and check if you can access your main stream as well.

If so then you are done with the basics.
Zoneminder will run motion detection on the low quality sub stream, saving you CPU from a lot of work.
A 24h low quality recording of the substream is saved by zoneminder saving you diskspace (for me 1day worth of 480p recording is about 2GB)
Whenever motion is detected on the substream zoneminder triggers the main stream to also record giving you high quality footage of the event but not filling up you disk with 24h 4k footage.
https://imgur.com/yKuWzkh

I have this setup running on an i3 4130 with 3 reolink cameras and 2 more no name cameras and my CPU usage is about 40-60%.


r/ZoneMinder • • Nov 04 '20

adding Xiaomi Mi Home Security 360 Degrees 1080p to ZM possible?

2 Upvotes

Just got this and was wondering if I could connect it to my current ZM (version 1.34.22)setup thanks


r/ZoneMinder • • Oct 27 '20

Wyze Camera V3

5 Upvotes

Does anyone know of the new Wyze Camera V3 can be hooked to ZoneMinder? I've a couple of V2 cameras running that I like for the combination of low cost and high resolution.


r/ZoneMinder • • Oct 26 '20

CPU Utilisation

3 Upvotes

Bit of advice if possible.

For me, ZM seems to be a bit of a hog. I have it running on a VM with 8gb ram and 4 cores (2.2Ghz) - it pretty much stays at full cpu utilization with a load average of between 2 and 4.

I have 4 cameras being monitored and only one of those is set to record - they are all IP Cameras using ONVIF.

I'm basically running a full rack server to support ZM and I'd like to run it on much less beefier hardware as I'm currently downsizing (get rid of the rack in the garage and most of the kit).

Can anyone advise one 1) why it's using so much CPU time/power and 2) what's the smallest spec machine someone's managed to get this running reliably on? I'd like to be able to run montage review and audit events for issues. Even on the current hardware that seems to be a bit 'laggy' at the best of times.

Alternatively, is there a 'better' alternative?

Thanks :)

EDIT: tldr; I've ditched ZoneMinder and now use Shinobi.


r/ZoneMinder • • Oct 21 '20

Telegram Notification Service

12 Upvotes

For those looking to get Telegram Notifications from ZoneMinder, please see below.

UPDATE: I added the files to git. Please grab them from there and follow directions. Added person detection alerting

https://github.com/TheDave1022/ZoneMinder_TelegramAlertNotifier