Motion

Introduction
Motion is a program that monitors the video signal from cameras. It is able to detect if a significant part of the picture has changed; in other words, it can detect motion.

http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome

Gentoo Linux
Even though 'motion' is in the Portage tree, you will need to download and use the svn ebuild, because the official ebuilds do not work with the latest kernels, specifically the 'v4l' drivers.

https://bugs.gentoo.org/show_bug.cgi?id=376225

su - root mkdir -p /usr/local/portage/media-video/motion cd mkdir -p /usr/local/portage/media-video/motion/ wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-video/motion/files/motion.initd-r2 wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-video/motion/files/motion.confd