Page 1 of 1

Raspberry PI 4 Optimizations/Tuning

Posted: Fri Dec 04, 2020 6:16 pm
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?

Re: Raspberry PI 4 Optimizations/Tuning

Posted: Fri Dec 04, 2020 11:24 pm
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

Re: Raspberry PI 4 Optimizations/Tuning

Posted: Sat Dec 05, 2020 5:16 pm
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.