Does it Help to Add Hardware Between Camera and Server?

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
HopWorks
Posts: 8
Joined: Wed Jul 13, 2022 8:04 pm

Does it Help to Add Hardware Between Camera and Server?

Post by HopWorks »

Hello All,

I wanted to ask.. does it help stability to add hardware between an IP camera and the ZoneMinder server? I ask because I envisioned a system for my auto that uses an RPI4 (4gb RAM) for each camera to offer buffering, and serves up its data on-demand to the server via ethernet through a switch, to which is ALSO a RPI4 (8gb ram). I just wanted to know if this is helpful. I did not want to connect my 4x 1080P cameras directly to the server RPI and overwhelm it. I figured if I had an RPI4 for each camera, I could have some control through scripts or whatnot and buffer the data for when the server was ready for it.

Surprisingly, I could not find a wealth of info about this configuration which tells me either it is not viable, or it's serious overkill.

Thank you so very much for your time!

EDIT: Cameras are the Amcrest ProHD 1080P WiFi Camera 2MP (1920TVL) Indoor Pan/Tilt Security Wireless IP Camera IP2M-841BI got on Amazon. I checked for their compatibility with ZoneMinder. Also, the server will have to access a VIOFO A129 firmwared to serve NTSP wirelessly.

I hope I was not too vague with my info!
User avatar
iconnor
Posts: 2055
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Does it Help to Add Hardware Between Camera and Server?

Post by iconnor »

One pi4 can likely handle all 4, but if you need another, you can just add another. Or you can add as many as you like. You can structure it any way you like.
Ralphred
Posts: 26
Joined: Fri Jul 08, 2022 12:23 pm

Re: Does it Help to Add Hardware Between Camera and Server?

Post by Ralphred »

either it is not viable, or it's serious overkill.
I can't foresee any show stopping problems that would make it not viable, I can do a list of pros and con though
Pros:
  • Pi's have silly low power requirements, great for systems that need to be battery backed-up
  • Having exclusive wireless lans are great (but there are easier ways to do this)
  • If you get a nice working solution you can sell SD cards with it pre-installed
Cons:
  • Potential for huge latency (without careful frame-dropping)*
  • Pi's have a massive attack surface that needs securing (one time problem, but still)
  • It's overkill:
    Unless you have identified a local problem that needs this solution to fix it, it can also mask other issues that "should be fixed" and won't until they become fatal.
    Unless there is some "edge recording retention during network/power issue" clause in the spec.
* is the biggest one for me, mainly because how ZM would handle a glut of data post a "buffering necessary" event is unknown** to me, and solutions are resource intensive in my mind.

I am interested by the idea, and have enough hardware laying around, and am happy to help out if you want to bounce some troubleshooting idea around. I'm quite tempted to experiment and solve my lack of knowledge around ** as it is.
HopWorks
Posts: 8
Joined: Wed Jul 13, 2022 8:04 pm

Re: Does it Help to Add Hardware Between Camera and Server?

Post by HopWorks »

Sorry for the late reply!!! To be honest, I forgot to subscribe to this post and did not know there were replies!!! I have fixed that!

I can print cases for my gear, and not worried about exposure. What I AM worried about is the RPI4-based server handling 4x1080p RTSP feeds and also being able to serve up a monitor feed to yet another RPI4 (with a DSI screen attached). I posted a thread just now asking this, and if I should go with an X86 (or X64) SBC to give my system the necessary boost to handle.

But the fact is, when I get this all together this weekend, I will know what the performance issues are. If the RPI4-ZM-Server cannot keep up, I will need to look at a X86 SBC solution.

Or my I-5 laptop. That's the last-case scenario.

Thank you so much for your reply!!!!
User avatar
iconnor
Posts: 2055
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Does it Help to Add Hardware Between Camera and Server?

Post by iconnor »

I have managed to get 4 720p cams working on a pi3b. The gpu started to fall apart after pushing one of them to 1080p.

I believe the pi4 should be able to do 4 1080p cams. However I am not sure how high you can set the gpu ram. I would expect you to need 512Mb minimum and I'm not sure that you can set it higher than 256.
HopWorks
Posts: 8
Joined: Wed Jul 13, 2022 8:04 pm

Re: Does it Help to Add Hardware Between Camera and Server?

Post by HopWorks »

I read in a ZoneMinder tutorial of sorts on setting up usage with the RPI4, and in the notes it was suggested to increase the GPU usage to 512mb, though it did say unconfirmed. I will know if Raspbian can handle that soon enough, this weekend I am hoping. I am using 8gb for the server, and 4gb for the camera RPI4 clients. Or are they considered sub-servers, since they actually serve up RTSP from the one camera connected via CSI? I might even be able to give the GPU 512mb each on those 4gb ones since they will be headless.

I have all the parts and my WORK LIFE knows that apparently. Every time I sit down to get this together, I get called with an issue to deal with. I wish I was already retired!!

There is something else I considered testing and that is to run the OS off of a M2 (using USB3) 256gb stick, and having another separate SSD of 2tb for the video. The power draw of these is high considering the environment they are connected to. I looked for a USB cable that allows me to inject 5vdc from an outside source but came up dry. I already did this with the stick before, and it worked great. But not with two SSD's on the same USB3 bus. I also have routing the logging off the SD card to look at also, but with the OS external, that is moot anyway. NONE of this is related to this thread however, so I will post my inquiries and comments in a different thread, unless the moderators do not mind. This really is an exciting project!!

Thank you for your speedy reply!!
User avatar
iconnor
Posts: 2055
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Does it Help to Add Hardware Between Camera and Server?

Post by iconnor »

I run my pi4 off a 16gb optane in a usb stick. Works great.
HopWorks
Posts: 8
Joined: Wed Jul 13, 2022 8:04 pm

Re: Does it Help to Add Hardware Between Camera and Server?

Post by HopWorks »

iconnor wrote: Sun Aug 07, 2022 2:43 pm I run my pi4 off a 16gb optane in a usb stick. Works great.
What version? I see the prices range from very low to very high. For this project it does not matter though since I would not get it until it is too late, unfortunately. Thanks for the suggestion!
HopWorks
Posts: 8
Joined: Wed Jul 13, 2022 8:04 pm

Re: Does it Help to Add Hardware Between Camera and Server?

Post by HopWorks »

iconnor wrote: Sun Aug 07, 2022 2:43 pm I run my pi4 off a 16gb optane in a usb stick. Works great.
Hi sir, if I may ask, what is your source for the best tutorial on setting up booting from and using for the OS an SSD? I have a number of links to follow, but if you have one you could recommend, it might save me some trouble.

I appreciate it! Thank you sir!
HopWorks
Posts: 8
Joined: Wed Jul 13, 2022 8:04 pm

Re: Does it Help to Add Hardware Between Camera and Server?

Post by HopWorks »

OK, well, for some strange reason, I cannot get any of my Intel M2 sticks (from my stock) to perform reliably with the SABRENT USB 3.2 Type-C Enclosures for M.2 PCIe NVMe and SATA SSDs. I had a backup plan though and also ordered SABRENT 2.5-Inch SATA to USB 3.0 enclosures that worked for me in the past. I have a number of Intel 2.5" SSD's that are SATA 3 and 80gb. I am going to try an install and boot from SSD using one now. I have to dust off my notes first. I am not happy about the larger footprint, but it is what it is.

It's crunch time but I am now free until deadline on Sunday, so I will be burning the midnight oil putting this all together.

More when I encounter it!

EDIT: It's going to take me weeks documenting the successes and failures. But I will offer it along with notes for whoever finds it interesting or helpful. Maybe I will find time on our Chicago road trip to document, in between 8 hour driving legs. :cry:
User avatar
iconnor
Posts: 2055
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Does it Help to Add Hardware Between Camera and Server?

Post by iconnor »

Mine was being very unreliable. I tried lots of things like firmware updates etc.. then just left it. Then one day realised that the pi was and had been for some time running just fine off it. I questioned whether I had been plugging it into the usb 2 port instead of the usb 3 but am not sure.

Or maybe there was a driver/kernel update or something. In any event, has been stable for months and is noticeably faster.
HopWorks
Posts: 8
Joined: Wed Jul 13, 2022 8:04 pm

Re: Does it Help to Add Hardware Between Camera and Server?

Post by HopWorks »

That's great to hear! Thank you!!
Last I tried it (photo) it worked great, then one day it just could not boot. I never went back to see what went wrong, but I did make a drive image to be able to create the file system again. I will try this again today. The photo shows that it looks flimsy and like something that should certainly not be bumped. SSD Enclosures have improved since then though. The Sabrents I got look like armored candy for stability.

I want you to know sir that you posting that gave me hope that something since I tried it, and now, got fixed.
RPI4 - USB Boot from 950 Pro (Samsung).jpg
RPI4 - USB Boot from 950 Pro (Samsung).jpg (65.09 KiB) Viewed 85 times
Post Reply