I've been looking for a small, cheap, low power device to use as a server for my Foscam wireless IP security cameras. The Raspberry Pi looks perfect for the job, but I want to make sure it's up to the task.
Does anyone know if Zoneminder (http://www.zoneminder.com/) can be made to run on an ARM cpu, and whether or not the Pi is powerful enough to handle motion detection video recording from two cameras?
I know this is a pretty specific question for something that isn't even available yet, but maybe someone can either tell me "no way this device can handle something like that" or "maybe". For $25 I can afford to be wrong on a "maybe"; I'm sure I could find something else to do with it.
Thanks!
Zoneminder on Raspberry Pi
10 posts
- Posts: 2
- Joined: Fri Sep 02, 2011 12:09 pm
It is in the Debain ARM repository, so yes it does compile. Whether it works I don't know.
- Moderator
- Posts: 6521
- Joined: Sat Jul 30, 2011 7:41 pm
I'm sure it "works", for smallish values thereof. Zoneminder needs a bunch of CPU oomph to work well. I don't think, without some GPU assist code in there, that this would cope with more than one cam's worth of data processing. An A8 might manage 2-3. An A9 dual/quad core might manage at a level like the screenshots show.
- Posts: 596
- Joined: Fri Jul 29, 2011 6:50 pm
Ok, thanks guys.
- Posts: 2
- Joined: Fri Sep 02, 2011 12:09 pm
At the cost running one camera per device might not be a bad thing, Even at the cost of SD card, and power adapter they R-PI-B is still lower then most Network based cameras. Great idea. Can't wait till they ship.
- Posts: 14
- Joined: Fri Aug 19, 2011 5:09 pm
Perhaps what most CPU usage required is the detection of movement.
But for continuous video recording, 24 hours, several cameras,possibly if serious enough. Are saying?
Any other software better than ZoneMinder?
But for continuous video recording, 24 hours, several cameras,possibly if serious enough. Are saying?
Any other software better than ZoneMinder?
- Posts: 5
- Joined: Mon Dec 26, 2011 2:02 pm
Zoneminder is in the repo. I was able to install it and get it working on my Raspberry. I went down the rabbit hole is mjpgstreamer as I started reading about using UVC cameras for Zoneminder and it appeared that this may be needed. The current version of the raspbian has UVC support and my camera worked beautifully without any fuss once I knew how to set it up:
the camera reports as:
The camera is set up as /dev/video0 as a "monitor"
The setup specifics are:
General:
Source Type: Local
Source:
Path: /dev/video0
Capture Method: Video For Linux version 2
Device Channel: 0
Device Format: SECAM L
Color Palette: YUYV
Capture Width: 320
Capture Height: 240
With this, it started to capture video.
There were a couple other tweaks:
This showed up in the log:
To fix it I needed to edit /usr/share/perl5/ZoneMinder/Memory.pm
to fix it find the line which is:
and replace it with:
It seems this needs to be done every time zoneminder upgrades through apt-get. Woudl be nice it it was fixed in the repo as the raspberry is a 32 bit device anyway...
If you are getting shared memory errors, due to resolution of the images requiring more shared memory than is available, you may need to adjust the shared memory available
I found this suggestion on the web:
then I restarted the zoneminder service
I also got zimezone errors in the logs which also caused the time reported to be GMT instead of local time. This is a common perl script issue and it fixed by editing the /etc/php5/apache2/php.ini to have the appropriate timezone setting. For me it is CST, so I changed the setting here to be:
then I restarted the zoneminder service
At this point, I had to set up gmail as the SMTP server so that I could get email notifications based on alarms. This is documented elsewhere on the web, but I had to install and configure postfix
At this point it all works. My next step is to use wiringPi to open and close the garage door. Once thsi works, only trigger the device to use motion when the garage door is open.
Hope this helps someone.
the camera reports as:
- Code: Select all
ID 04f2:a133 Chicony Electronics Co., Ltd Gateway Webcam
The camera is set up as /dev/video0 as a "monitor"
The setup specifics are:
General:
Source Type: Local
Source:
Path: /dev/video0
Capture Method: Video For Linux version 2
Device Channel: 0
Device Format: SECAM L
Color Palette: YUYV
Capture Width: 320
Capture Height: 240
With this, it started to capture video.
There were a couple other tweaks:
This showed up in the log:
- Code: Select all
[Shared data size conflict in shared_data for monitor Monitor-1, expected 328, got 316]
To fix it I needed to edit /usr/share/perl5/ZoneMinder/Memory.pm
to fix it find the line which is:
- Code: Select all
our $arch = int(3.2*length(~0));
and replace it with:
- Code: Select all
our $arch = 32;
It seems this needs to be done every time zoneminder upgrades through apt-get. Woudl be nice it it was fixed in the repo as the raspberry is a 32 bit device anyway...
If you are getting shared memory errors, due to resolution of the images requiring more shared memory than is available, you may need to adjust the shared memory available
I found this suggestion on the web:
- Code: Select all
sudo echo kernel.shmmax = 536870912 >/etc/sysctl.d/60-kernel-shm.conf
then I restarted the zoneminder service
- Code: Select all
sudo service zoneminder restart
I also got zimezone errors in the logs which also caused the time reported to be GMT instead of local time. This is a common perl script issue and it fixed by editing the /etc/php5/apache2/php.ini to have the appropriate timezone setting. For me it is CST, so I changed the setting here to be:
- Code: Select all
[Date]
date.zimezone = America/Chicago
then I restarted the zoneminder service
- Code: Select all
sudo service zoneminder restart
At this point, I had to set up gmail as the SMTP server so that I could get email notifications based on alarms. This is documented elsewhere on the web, but I had to install and configure postfix
- Code: Select all
sudo apt-get install postfix
At this point it all works. My next step is to use wiringPi to open and close the garage door. Once thsi works, only trigger the device to use motion when the garage door is open.
Hope this helps someone.
- Posts: 2
- Joined: Tue Sep 11, 2012 1:45 pm
Great post gearhead. Thanks for sharing. 
Hi All,
is it possible to capture video from x264 stream? I use IP camera with RTSP protocol with x264 stream. When i configured rtsp stream with h264 using ffmpeg, the CPU is overloaded and GPU hardware acceleration doesn't be used. I need to run ffmpeg with support quad-core GPU. Does anyone more experiences how can i use zoneminder with ffmpeg hardware support on raspberry?
Thank you
is it possible to capture video from x264 stream? I use IP camera with RTSP protocol with x264 stream. When i configured rtsp stream with h264 using ffmpeg, the CPU is overloaded and GPU hardware acceleration doesn't be used. I need to run ffmpeg with support quad-core GPU. Does anyone more experiences how can i use zoneminder with ffmpeg hardware support on raspberry?
Thank you
- Posts: 2
- Joined: Wed Jan 09, 2013 9:18 pm
Thanks gearhead. Can you tell us what type of camera you're using? Do you have more than one hooked into zoneminder? I read somewhere that zoneminder is a bit overkill for single camera setup. Is it running well?