qcam-grabber - version 0.91
Jan 11/97: Jim MacKinnon 
Nov 11/97: updated to libqcam-0.91 compatability.  Bob Williams 
_______________________________________________________________

Introduction:

This is a QCAM frame grabber designed to be used with the web-video
package from Ulm.  Binaries for Ulm web-video-1.3 are included here. 
You will require:

    qcam-0.91 library           (available at most Linux ftp sites)
    web-video1.3 distribution   (http://www-vs.informatik.uni-ulm.de/soft/wv/)

The grabber provides a live stream to the ULM streamserver, which can then
distribute several low bandwith 'video-on-demand' www streams via 
nph-SyncImageStream calls in browsers that support it 
(netscape 2.0 and up).
See the comments at the top of qcam-grabber.c for more info,
_______________________________________________________________

Where:

ftp://ftp.phys.ualberta.ca/pub/linux/qcam-grabber-0.2.tar.gz
http://bob.usuf2.usuhs.mil/video/
http://bob.usuf2.usuhs.mil/video/qcam-grabber-0.91.tgz
http://bob.usuf2.usuhs.mil/video/qcam-grabber-0.91-1.i386.rpm
http://bob.usuf2.usuhs.mil/video/qcam-grabber-0.91-1.src.rpm

This package should soon find it's way to the
RedHat contrib site and it's mirrors.

_______________________________________________________________

Notes:

Autoprobe may not work if you have two qcams,
a color on one port and b/w on another, for example,
so the distribution config is for port 0x378 (first printer port).
Change this if your b/w qcam is on the second printer port.    

Option: -n "label": A date and time stamp, and a label,
is overlayed onto the last 8 pixel rows of the image 
(thanks to code modified from the Robot Camera Project - 
rac@informatik.tu-chemnitz.de)

There is a 5 minute timeout in nph-SyncImageStream 
to prevent saturation, since at 240x320, 
the video delivery can as much as 4MB total over that duration.

A separate qcam.conf file is used (see comments in the code), since pgm enhance
code can be applied to the image. This can be changed in the code if you want
to use /usr/local/etc/qcam.conf instead.

The version 0.91 package is supplied with Linux i386 ELF binaries
for all of the required code, nph-SyncImageStream1.3, streamserver,
qcam-grabber, and example web setup and startup files.

And many thanks (again and again ) 
to all of the qcam development team and the
video-on-demand team at ULM, plus many others (see qcam-grabber.c).
_______________________________________________________________

Build:

	Use the RPM binary or source distribution, or

        1) This package includes web-video1.3 binaries
           but if you must rebuild web-video, apply the 
           supplied (in qcam-grabber-0.2 or at the Ulm
           ftp site) patch to web-video1.3 and rebuild
           the streamserver and nph-SyncImageStream binaries
           (also found at the Ulm ftp site.)
        2) Edit qcam-grabber-src/Makefile and edit the PATHs
           to suit your needs.
	3) Cd /usr/local/src/qcam-grabber-0.91/qcam-grabber-src.
           "make"

_______________________________________________________________

Installation:

	Use the RPM, or
	cd /usr/local/src/qcam-grabber-0.91/qcam-grabber-src
        make install

        The default WWW file location for things in this package is
        /home/httpd/html/video and /home/httpd/cgi-bin,
        and the tree will look something like
        this (with the web-video binaries installed in the main web tree):

        /home/httpd/cgi-bin/nph-SyncImageStream1.3
        /home/httpd/cgi-bin/video    (cgi web page)
        /home/httpd/html/icon.gif    (32x32, for use with the Ulm CowBrow)
        /home/httpd/html/properties  (configuration for the Ulm CowBrow)
        /home/httpd/html/video/index.html                (your own design)
        /home/httpd/html/video/video.html                (your own design)
        /home/httpd/html/video/liver.wav   (to make a sound when accessed)
        /home/httpd/html/video/scene1.html  (for frames defaults)
        /home/httpd/html/video/bin/qcam-grabber
        /home/httpd/html/video/bin/start_grabber  (second startup script)
        /home/httpd/html/video/bin/qcam.conf
        /home/httpd/html/video/bin/streamserver
        /home/httpd/html/video/bin/start_streamserver (first startup script)

_______________________________________________________________

Operation:

Stop any processes which are currently operating the qcam,
although this is only really necessary if these processes
require exclusive access.

Then start the streamserver(s) on a port of your choice, i.e.:

# /home/httpd/html/video/bin/streamserver -f Camera0 -p 10000 -tcp -q 1 &
and/or
# /home/httpd/html/video/bin/streamserver -f Camera1 -p 10001 -tcp -q 1 &

Then start the grabber on the same port:

# /home/httpd/html/video/bin/qcam-grabber -S [localhost || your.ip.num] \
   -P 10000 -N 7 -T 3 -E 0 -s 2 -c 50 -u &

    The options have been changed from v0.2 to
    avoid overlap with libqcam options.
    usage options are available by entering "./qcam-grabber -h".

    Options:
      -x width   Set width
      -y height  Set height
      -p qcport  Set qcam parallel port (0x378 || 0x278)
      -B bpp     Set bits per pixel (4 || 6)
      -S ip      Set Streamserver ip address
      -P ssport  Set Streamserver port (10000)
      -N val     Set pgmenhance_val (0..9)
      -T val     Set time for frame delay (sec)
      -c val     Set contrast
      -w val     Set white balance
      -W         Auto-set white balance
      -b val     Set brightness
      -E "vals"  Autoexposure mode, parameters required (0,1,2)
      -D         Remove dark speckling
      -e         Perform edge detection
      -n         Add date and time notation
      -H         Display Histogram
      -s val     Set scaling factor (1, 2, or 4)
      -t val     Set top line of scan
      -l val     Set left column of scan
      -f file    Select configuration file
      -u         Force unidirectional mode
      -V         Show version information
      -d file    Dump cam information to file



The HTML call in video.html (or in any other web page you server)
to bring in the stream will look like this:

<IMG SRC="/cgi-bin/nph-SyncImageStream?TYPE=VIDEO+FORMAT=GIF+PIC=1+VIDEO=Camera0 height=240 width=320 >

(Height and width here depend on how the grabber scales the image.
 You might just leave them out:)

<IMG SRC="http://some.other.machine/cgi-bin/nph-SyncImageStream?TYPE=VIDEO+FORMAT=GIF+PIC=1+VIDEO=Camera1 >

Then just invoke the URL:

        http://<yourhost>/video/video.html
or      http://localhost/cgi-bin/video
or      http://localhost/video/

--
For version 0.2:
James S. MacKinnon           Office: P-139 Avahd-Bhatia Physics Lab
Department of Physics        Voice : (403) 492-8226
University of Alberta        email : Jim.MacKinnon@Phys.UAlberta.CA
Edmonton, Canada T6G 2N5
        WWW:   http://www.phys.ualberta.ca/~jmack/jmack.html
--
Version 0.91:
Bob Williams
Department of Biochemistry
Uniformed Services University of the Health Sciences
4301 Jones Bridge Road
Bethesda, Maryland 20814 USA
phone: 301-295-3568
mailto:bob@bob.usuf2.usuhs.mil
http://bob.usuf.usuhs.mil/williams.html
--
