webcamd ======= Ever wanted to use your indycam as a webcam but couldn't be bothered with the shell scripts and cron jobs? Probably not. But now you can; with webcamd. It sits on a port (by default 1999) and listens for a web browser connection upon which it sends back an image from the indycam. It gets better. webcamd has a user specified history, that keeps copies of the last images that have been snapped. you can request these from your webrowser by adding the image number after the URL. for example, start webcamd from the command line [ianw@ariel:/webcamd] webcamd -h 10 -t 300 This specifies a history of 10 images with a time between images of 300 seconds (5 minutes). You may select more or less, however if you put a timer of only a few seconds (~1-5) you'll use up about 50% of a standard Indys CPU. Put it in the minute range and you'll never even notice it there. now, in a web browser, connect up to your machine, the URL for mine would be http://ariel:1999/ [ <-careful you'll need the http:// part! ] and you will magically see the image! You can go through the history by adding numbers after the hostname, eg http://ariel:1999/3 shows you the third image in the queue. At each snap interval the first image is replaced and the old images moved down one, until they fall off the end. PROGRAM OPTIONS --------------- The program options are -p [port] : specify the port number to run on (default 1999) -h [history] : specify the number of images to store -t [time] : time in seconds between taking photos -z [1-4] : denominator of the zoom factor (ie. 2 == zoom by 1/2, 4 == 1/4) you don't really want to zoom *in* do you? -q [1-100] : quality factor, between 1 (worst) and 100 (best). Default 75 -V : print out the version number Messages are put into the syslog or if syslogd is not enabled put onto the console. HOW DOES IT WORK ---------------- (WARNING : this was created to learn about video & image programming. the quality of the code reflects my experience ... ) The source is available. But basically it launches a thread to store the images for our history list and launches another thread when people connect up. there's no forking and little copying so it takes up as little room as possible. HOW TO INSTALL -------------- % vcp [select your indycam for VINO video in] %./webcamd % netscape http://localhost:1999/ you have video! you might like to add it so that it automatically starts at boot time ** you do not have to do this or do this this way ** I prefer to have a local file that will execute a few commands on system boot, without worring about the whole RC structure. I did this (% represents the command line prompt) 1) open command prompt 2) become the super-user (enter password if required) % su - 3) copy webcamd to a common location % cp webcamd /usr/bin/ 3) create a new file % nedit /etc/init.d/local 4) put this into it #! /sbin/sh # LOCAL SERVICES # add programs to be started at boot here /usr/bin/webcamd # END LOCAL 5) save from nedit and exit 6) on command prompt type %chmod a+x /etc/init.d/local %ln -s /etc/init.d/local /etc/rc2.d/S99local That's it .. it will now start when you boot.