Raspberry PI 4 Optimizations/Tuning

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Raspberry PI 4 Optimizations/Tuning

Post by lselinger »

It's certainly been a while since I've posted :D I was just curious if anyone else is using an RPI 4 w 4GB RAM to run Zoneminder and if you've uncovered any really good optimizations or configurations?

I'm currently running Zoneminder 1.34.22 on an overclocked RPI 4 (2Ghz CPU and 750Mhz GPU) with 4 cameras (soon to be 5). I'm not really having any issues but always interested to see if anyone has found 'recipes' that squeeze more out of these devices.

I've set all 4 cameras to 10fps VBR, 720p, and one under the best quality in the camera settings. Three cameras are just cheap Hamrolte from aliexpress and one is an older WANSCAM PTZ. They all do native x264 or x265 so in the actual Zoneminder camera settings I've set them to h.264 write through for storage (on an attached 1TB USB 3 drive) and then use the rpi HWACCEL in the source config.

Only 2 are in a recording mode (modect) the other ones are just meant to be live feeds with no alarming or anything. I'm really surprised how well it's handing this and I typically have a load of around 1 or just under/over.

Any other tinkerers using running Zoneminder on an RPI 4 with successes?
User avatar
burger
Posts: 417
Joined: Mon May 11, 2020 4:32 pm

Re: Raspberry PI 4 Optimizations/Tuning

Post by burger »

ZMA (modect / mocord) uses the most CPU, but RPI is also limited in FPS and resolution that it can handle. The RPI should be tweaked for gpu_mem settings in the bootloader. It's a usable platform for ZM as long as you understand what it can, and cannot do.

See the wiki:
https://wiki.zoneminder.com/Single_Board_Computers
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
lselinger
Posts: 35
Joined: Fri Oct 25, 2013 9:57 pm

Re: Raspberry PI 4 Optimizations/Tuning

Post by lselinger »

Very much agree. I was quite surprised to get 4 cameras usable on it with room for another 1-2 (based solely on load and debug). I have my GPU overclocked as high as I think it can go and the memory up to 512 for now but may go higher after another camera or two. Also looking at using vaapi to test instead of just rpi for hwaccel.
Post Reply