While you may not have an expectation of privacy at your company office, I certainly do when it comes to my department office.
So I'm not too happy about that, and while monitoring my office will not prevent future breaches of privacy, it will at least ease some of the paranoia if it turns out that my office doesn't routinely get entered.
This post only deals with a locally attached webcam -- I struggled with remote wifi-connected webcams a few years ago with little luck.
sudo apt-get install zonemindersudo cp /etc/zm/apache.conf /etc/apache2/sites-enabled/zm.confsudo service apache2 restart
Figure out what video devices you have:
ls /dev/video*You can now navigate to http://localhost/zm/dev/video0
Click on 'add monitor' |
These settings are fine. |
Note: these settings did NOT work. Keep reading the post... |
Setting up the camera seemed deceptively easy -- everything went fine, except actually getting an image.
note the red colour for the video device. No good. |
Looking at the log I was getting
Failed to set video format: Invalid argument
'zmc -d /dev/video0' exited abnormally, exit status 255
which is when I googled and found this post: http://rainbow.chard.org/2012/04/24/using-zoneminder-with-a-cheap-cctv-camera/
Basically, getting the settings absolutely right matters!
v4l-info
which told me
video capture VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE) index : 0 type : VIDEO_CAPTURE flags : 0 description : "YUV 4:2:2 (YUYV)" pixelformat : 0x56595559 [YUYV] VIDIOC_ENUM_FMT(1,VIDEO_CAPTURE) index : 1 type : VIDEO_CAPTURE flags : 1 description : "MJPEG" pixelformat : 0x47504a4d [MJPG] VIDIOC_G_FMT(VIDEO_CAPTURE) type : VIDEO_CAPTURE fmt.pix.width : 1600 fmt.pix.height : 1200 fmt.pix.pixelformat : 0x47504a4d [MJPG] fmt.pix.field : NONE fmt.pix.bytesperline : 0 fmt.pix.sizeimage : 5760000 fmt.pix.colorspace : unknown fmt.pix.priv : 0so changed my settings to
It took a bit of trial and error |
Next, I was receiving
Got unexpected memory map file size 49153524, expected 230401524and this post helped me:
http://jared-oberhaus-tech-notes.blogspot.com.au/2011/12/im-trying-to-capture-video-from-device.html
Our old friend shmmax eh? Apparently I had about 32 mb set up (!) on my laptop, so I changed it to 671088640 (640 mb)
sudo sysctl -w kernel.shmmax=671088640
See this post for how to make it permanent.
Anyway, once all is well you will hopefully see something like this (note the colours -- the /dev/ is a nice orange, although the log is still an unhappy red)
Now we can actually do things. Click on the name of your device (here: laptop) and you should get something like
You can now click on Zones in the main menu and add one (takes a little bit of trial and error, but you'll get there). To get motion detection, and thus get ZM to save things, change the mode from Monitor to e.g. modec
Your files will be found under /usr/share/zoneminder/events but you can change that using the setting menu which you can access in the top right corner in the main window.
So that's pretty much it. There are a couple of settings you might want to fiddle with:
You might want to set up ffmpeg to allow for generation of video fles |
Hiç yorum yok:
Yorum Gönder