I needed to have somekind of video surveillance system to look after stuff that I have on my office.
I didn’t find any good but cheap enough product on the Internet but then I noticed that I have my desktop computer
running Ubuntu Linux and I have Logitech Webcam Pro 9000 Webcam on my desk so could I make video surveillance
system just with these things which I already have?
It’s pretty easy to get everything to work with Motion+Ubuntu+Webcam so I’m not going to write much about that.
At default Motion records everytime when it see motion but you can make masks for it so it only start recording if it see motion
on some part of the image (example you can “disable” motion detection on window so nothing that happens outside of your office doesn’t make motion to record images).
Most of the configurations you will do on motion.conf file which is on /etc/motion/motion.conf but I like to copy that file to other
directory so that I can go back to default whan if I do something stupid =).
If you have only one camera then you don’t need to do much configuration but if you have more than one camera you have to do little bit more.
Motion has very good MotionGuide where you will find everything what you will need.
For some reason, I don’t need to record video about myself. Therefore,I have timed my motion to capture images/video only when I’m not at my office with crontab (which you can find /etc/crontab) like this:
0 16 * * * root motion -c /home/username/motion/motion.conf
0 8 * * * root kill -15 $(pidof motion)
It starts to capture motion after 16:00 (4pm) and stops capturing after 08:00 (8am).
This is the only time when it doesn’t capture motion during my normal work hours.
There is probably a better way to do this, but this is my way which seems to work pretty well. =)
It’s also not a good idea to save all of your security camera images/videos to your computer when
that same person for whom you have your security camera can steal your computer.
And after that, the whole security camera system is pretty much useless.
If you don’t have any place to upload your images/videos, you can use service called DropBox for that.
In order to achieve this you should change your target directory on your motion.conf file:
After this, all images and video what motion saves will go to dropbox service right away.
Then if somebody steals all of your computer/camera stuff, you still have images/video on dropbox.
You can then see those with any computer that has Internet connection and a browser. =)
My webcam right now is “Bus 001 Device 043: ID 046d:0809 Logitech, Inc. Webcam Pro 9000”.
You can see that with lsusb command:
Bus 001 Device 043: ID 046d:0809 Logitech, Inc. Webcam Pro 9000
I had some problems with it though. It only worked once and it didn’t work anymore after unplugging and plugging back to USB.
But after changing motion resolution to 640×480, I got rid of that problem. Of course I would like to capture images/video with
bigger resolution but if it’s only work with 640×480 then I have to use that.