A Gnome Security Camera

Published under the GNU GENERAL PUBLIC LICENSE Version 2

Check out a full screen view

Sample MPEG file (9,363,987bytes!!!)


Gspy retrieves images from a video4linux device and processes these into a daily mpeg movie on the disk drive. Each image is recorded with a time stamp to insure accurate real world correlation. Special motion detection algorithms are used to reduce the size of the daily movies by eliminating pictures with similar content as well as the normal compression obtained via the mpeg process. The result is a time lapse video per day with nonlinear time compression using only the images of interest. This program will only run on Linux machines which support a video4linux-device in 640x480 capture size. This software has been tested with the 2.4.0-test1 kernel, 2.4.0-test4 and the 2.2.16 kernel with the usb backport patch. You should have the Berkeley MPEG Tools installed if you wish to generate the MPEG files. Gspy can be used without the MPEG tools, as it will fill a directory with jpg images that can be processed or viewed at a later time. Versions from 0.1.6 include a user defined command that is executed on each alarm. This command string can include a token(s) "%f%" that will get replaced with the alarm picture filename. Typical uses would be to copy the alarm picture to a remote site using ftp or scp, email the picture to someone, play a sound annoucement... "Step away from the keyboard!", turn on lights using a parallel port or X10 interface, or ???. Have FUN

Known Supported Devices:


Version 0.1 - June 2 2000
- birth via the wonderful glade interface
- starting with kernel 2.4.0-test1-ac5 with ov511 patch cm3 by claudio
- webcam is the Creative Labs video Web Blaster III - USB

Version 0.1.1 - June 29	2000
-added image intensity normalization to counteract cameras AGC jumps.
-made first image init the reference image
-added mug shot pixmap to help about box
-added picture stats to status bar

Version 0.1.2 - July 18	2000
- added code to call mpeg encoder from file menu
- added code so that mpeg is generated in a child process (using nice)
- altered image intensity normalization... still getting alarms on jumps
  of camera AGC under certain conditions.... needs more work
- updated defaults for alarms

Version 0.1.3
- removed calls to sync. The USB driver seems to have stabilized enough
  not to crash the kernel.

Version 0.1.4   Feb 24 2002
- support added for Philips cameras, requires user to uncomment the
  #define PWC 1 statement in callbacks.c before compiling. ccvt.S and
  ccvt.h added to project to support data conversions.
  Thanks to Herve BOTERMAN
- default device changed to /dev/video0 as Redhat 7.2 uses /dev/video
  as a directory

Version 0.1.5   Feb 25 2002
- updated main.c and callbacks.c to support automatic polling of camera
  data types available. This helped to support the Philips cameras which
  do not have RGB24 format data available. Source cahnges (#define PWC)
  are no longer required. Thanks to Herve BOTERMAN.
Version 0.1.6   Aug 12 2002
- changed contact email address on about page
- changed version in
- next 2 options were suggested by a user ( Thanks Tim )
- added setup param for turning active alarm area box on display on/off
- added setup for a user command to be executed on alarms
  (this can be anything from rsyncing a directory to a remote box, to
   emailing a file)
- commented out some debug printing to the console  

Version 0.1.7   Nov 20 2002 (recommended for Redhat 6,7,8,9)
- added a console version that runs without X or gnome installed
  ( see the console directory and main.c for building information )
  The console version uses configuration that is imbedded in the source code.
Version 0.1.8   Jan 15 2005 (recommended for gnome2, 2.6 kernels)
- rebuilt/reconfigured project to build using a modern distribution. This
  builds on my current development system:
  Ubuntu warty kernel, 
  glade 0.6.4  (sorry, havent had much luck porting to glade-2 yet)
  automake (GNU automake) 1.4-p6
  autoconf (GNU Autoconf) 2.59
  gcc (GCC) 3.3.4 (Debian 1:3.3.4-9ubuntu5)

To Build This Project:

gspy-0.1.2-src.tar.gz(145920 bytes) or
gspy-0.1.3-src.tar.gz(192891 bytes) or
gspy-0.1.4-src.tar.gz(534302 bytes) or
gspy-0.1.5-src.tar.gz(200008 bytes) or
gspy-0.1.6-src.tar.gz(205802 bytes) or
gspy-0.1.7-src.tar.gz(222107 bytes) or
gspy-0.1.8-src.tar.gz(208662 bytes).

To build the application from the glade project in the gspy directory, enter:

make install

To run the application, enter gspy at the shell prompt. Gspy should open the video device and then popup the runtime display window similar to that shown above. If the open fails on the video device, gspy will exit with an error message. You may need to check and see that the usb stack is loaded if you are using a usb web camera device. To get your usb camera running, you may find the Linux USB guide useful (see reference section below). Gspy is quite cpu intensive due the the image processing load. I run it on a 500mhz PIII and it puts a 25% load blip on every 2 seconds. It should run on most pentium class computers. Gspy creates subdirectories under a user specified location for each date it runs. All jpegs captured for the day are placed in the subdirectory. Use the menu option file/Makempeg to select one of the daily directories and start the mpeg generation process (done in the background at a nice priority). You must have the Berkeley mpeg tools installed (mpeg_encode binary) for this command to work.



Not Working?:

  1. Builds fail on RH 7.3 and 8.0 (gettext version 0.11.xx)
  2. Example tests and logs for checking usb setup
  3. USB device questions:
  4. Frequently Asked Questions relating to gspy


User Feedback:

  1. Car thief stars on gspy
  2. Changing Gspy for Non 640x480 Cameras



  1. Homepage --
  2. CVS server --
  3. Linux USB Guide
  4. Berkeley MPEG Tools
  5. Linux OV511 Driver
  6. Omnivision OV511 Advanced camera USB bridge, data sheet
  7. October 2002 Linux Journal Article about gspy(163k).

Who We Are and Where to Find Us

The Face
The Vital Statistics
Lawrence P. Glaister P.Eng. VE7IT 
1462 Madrona Drive
Nanoose Bay B.C.
Canada V9P 9C9

SourceForge Logo Support This Project