Control remote security cameras

Q I have seen security cameras for sale that come with Windows software to detect movement, record video and send alerts via email or SMS. Can these cameras be used with Linux? What sort of software is available to record, are the other services available in Linux, and what type of camera should I use?

A You'll be pleased to hear that you can do all of this with Linux. There are plenty of programs that will record a camera feed, including that Swiss Army Knife of video, MPlayer, but there are also dedicated programs to provide security features, like motion detection, alerts, handling multiple cameras and so on. The most complete of these is almost certainly ZoneMinder (www.zoneminder.com). There are various types of camera you can use, the most common being a standard security amera that provides composite video output. This connects to the composite input connector found on many TV and frame grabber cards.

ZoneMinder works with these and with USB cameras, usually webcams. Any camera supported by the Video4Linux framework will do. You can also use IP cameras that connect directly to your network, either wired or wireless, but these are a lot more expensive. ZoneMinder can handle any number of cameras, but the principles are the same whether you use one or a dozen. Once ZoneMinder is installed, you need to modify the Apache configuration. Open a terminal and run

sudo ln -s /etc/zm/apache.conf /etc/apache2/sites-enabled/010-zm
sudo /etc/init.d/apache2 restart

to include the provided configuration and restart apache to use it. This is for Ubuntu 8.04; it may be different for other distros. Now open Firefox and browse to http://localhost/zm and click on Add New Monitor - each monitor is associated with a camera. Give the monitor a name in the General tab. The type should be local for a wired camera or webcam, and set the function to Modect (Motion Detection). Pick the camera's device name and number in the source tab, usually /dev/video and 0 for the first camera. You can leave the other tabs as they are for now and press Save. If the function and source items show green in the main browser display, your camera is working, click on its name to view its output.

Whenever ZoneMinder detects changes between frames from the camera, it begins recording. These 'events' are listed in the window that opens when you click on the camera name, and you can view them as a movie or stills. Of course, you don't want any type of movement to trigger an event - if there's a tree in your camera's field of view, a windy day will fill your hard disk. ZoneMinder supports zones within the field of view that can be prioritised or ignored. A lot more is possible with this software, read the documentation in the ZoneMinder wiki (www.zoneminder.com/wiki.html to see just how much.

Back to the list