off loading processing to the GPU.

Forum for questions and support relating to the 1.26.x releases only.
Locked
odror
Posts: 12
Joined: Sat Feb 15, 2014 8:53 pm

off loading processing to the GPU.

Post by odror »

I am new to zoneminder. I am testing it with a 1080p IP camera.

On i7-4770 machine I get CPU values (using top) of 25% for zma and zmc.

Is there a way to offload some of the processing to my NVIDIA gtx 660 card.

If I will have 3-4 cameras this is really going to be a problem.

Thanks
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: off loading processing to the GPU.

Post by knight-of-ni »

Yep, that's the well known side effect to using ffmpeg to transcode a high resolution H.264 stream into jpeg's.
And no, there is no way to offload that to the GPU because no one has written that code yet. <- hint: we welcome volunteers.

The next release will have a "libvlc" method, which should be a drop in replacemet for ffmpeg, but I'm not sure it will do much better for your application.

The only other thing I can say is we currently have a video branch in Alpha, which will record video streams to disk in mp4 container format. That will be much more efficient, but it is not very user friendly at the moment.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
odror
Posts: 12
Joined: Sat Feb 15, 2014 8:53 pm

Re: off loading processing to the GPU.

Post by odror »

Thank

VLC has hardware acceleration support. Would'nt that help?? I'll wait for the next version.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: off loading processing to the GPU.

Post by knight-of-ni »

libvlc might be more efficient, and I'd be interested to see your results. I would not expect a significant improvement, however. Transcoding H.264 is expensive no matter how you do it.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
mabene
Posts: 13
Joined: Tue Dec 24, 2013 1:06 pm

Re: off loading processing to the GPU.

Post by mabene »

odror wrote:I am new to zoneminder. I am testing it with a 1080p IP camera.
On i7-4770 machine I get CPU values (using top) of 25% for zma and zmc.
Is there a way to offload some of the processing to my NVIDIA gtx 660 card.
If I will have 3-4 cameras this is really going to be a problem.
Thanks
I've got a couple of 1080p cameras active on my own system (i5-3570K), Running at 5fps using mjpeg - that seems to be a much better fit for zonemindesr architecture that h.264 streams. each zmc (image capture) process shows in top at ~ 5%-6%. Motion detection (zma) is much more expensive at about 13% (percentage of single core).

Depending on camera capability, there are some things you culd try:
if the camera has onboard motion detection that actually works reasonably well (most cameras I've tried so far don't), activate motion detection on the camera, configure the cameras in "nodect" mode and have the cameras trigger alarm events. I've used http trigger on the camera to call a php script on the zm server that passes the alert to zoneminder using zmtrigger.pl interface.

If the camera offers alternate streams at reduced bandwith/resolution, you could set up two monitors for each camera:
Cam-detect: Access secondary stream, low fps/low resolution (possibly greyscale). configure motion detection on this monitor.
Cam-HD - Full HD, "Nodect" Mode, cam-detect as linked monitor.

This will run the moniton detection against a much smaller picture at lower processing cost and trigger recording of the hires images in case an alarm is triggered.
Locked