How to set up a streaming webcam
--------------------------------

A streaming webcam is a page containing a picture that updates as quickly
as the client can download new pictures; the client sees a movie (of sorts)
from your camera.

Compile cqcam as usual (see INSTALL for details).  Put the 'webcam' binary
in /usr/local/bin, and make it SUID root.  'make install' will do this for
you.  Copy the 'nph-webcam' script to your cgi-bin directory.  Copy the
webcam.html page to your htdocs directory.  Make sure your web server has
been started.  At this point,
  http://localhost/webcam.html
should produce a bare-bones page with a streaming picture on it.  You'll
get a few auto-updated frames.  Click 'reload' for a few more.

I am told that this doesn't work with IE, though I have no desire to
verify this fact.  If you want streaming images, use Netscape.


How to tweak it
---------------

Set up a better page.  webcam.html is just a sample.  The tag
  <img src="/cgi-bin/nph-webcam">
will put a streaming image into any normal page.  The 'alt', 'width',
and 'height' modifiers to the 'img' tag will work fine and are highly
recommended.

You can change the location of the webcam binary, the options passed to
it, and the headers passed to the client in the nph-webcam script.
Customization of the webcam binary itself is done through config.mk at
compile time.  See INSTALL for details.


How to set up an auto-refresh webcam
------------------------------------

An auto-refresh webcam is a page that loads a new static image once every
N seconds, where N is commonly 60.

Compile and install cqcam as usual (see INSTALL for details).  'make
install' will do this for you.  Copy the refresh.html page to your htdocs
directory.  Create a script that takes a picture and puts it in your web
directory.  For example:
  #!/bin/sh
  /usr/local/bin/cqcam -j > /home/you/public_html/temp.jpg
  mv /home/you/public_html/temp.jpg /home/you/public_html/my-webcam.jpg
Create an entry for this script in your cron table (see the crontab(1) man
page).  To run it once a minute, use:
  * * * * *    /path/to/your/script
Make sure your web server has been started.  At this point,
  http://localhost/~you/refresh.html
should produce a bare-bones page with an auto-refresh picture on it.


This documentation may be unclear.  Forward me any questions or
suggestions, and I'll update it.

Patrick Reynolds <patrickr@virginia.edu>
