qcwebcam- QuickCam-based webcam program for fhttpd
Version 0.3.2, beta release by Alex Belits, firstname.lastname@example.org.
qcwebcamis a webcam program written as a server process for fhttpd HTTP server. It utilizes user processes interface which differs from CGI, FastCGI or module interfaces used in other servers.
qcwebcamdoes not work as an additional HTTP server by itself, all data is sent through main HTTP server which can be located on the same or different host. All camera hardware handling, image preparation and user interface is done by
qcwebcamwhile buffering, HTTP protocol and security is handled by HTTP server. Flow control (actually dropping frames for slow connections) is done by
qcwebcamusing fhttpd flow control messages that are part of protocol.
qcwebcam supports multiple clients at a time without creating
additional processes for every user by itself or HTTP server, although since
HTTP protocol is used, data is sent to every client individually.
Currently only Linux and FreeBSD versions exists, although the program should work on other unices where fhttpd and cqc/qcread library will be ported. No ports to non-unixlike systems are planned.
qcwebcam is used on constantly-running wbcam page at
http://phobos.illtel.denver.co.us/qcam-frame?update=serverpush. It's 486dx2-80 box with 32M of RAM,
connected through 28.8kbs modem line.
<value>. Default value is 128.
-frame" appended to it is mapped to the HTML with
<IMG>tag for the image. "
update=serverpush" parameter enables both server-push update of the HTML and server-push for image in it.
img=jpeg" parameter is removed. Configuration form has the same URL as the image with "
-config" appended to the name (not parameters). "
update=serverpush" parameter remained the same. To accomodate two different URLs for camera configuration and image fhttpd configuration file SHOULD contain "
*" appended to the base URL in application definition. This change allows to set different access restrictions for configuration and image URLs.
/usr/local/etc/qcwebcam.<programname>configuration files support.
/usr/local/etc/qcwebcam.qcwebcam) may contain the following keywords:
<custom-url>is the base URL for the camera. (SHOULD be the same as defined in HTTP server configuration)
<cameraname>is the camera name in
<fps>is the frame rate (should be between 0.001 and 100 to be accepted, but values >1 are impractical).
qcwebcam0.1 if invalid value was entered in non-self-updating form, and driver detected/fixed it, next form contained entered, not fixed value. Now only values, checked by camera driver are returned in non-self-updating form. Self-updating forms first are returned with entered value, then updated with corrected values if entered values were invalid.
qcwebcamon the host, already running fhttpd, with installed fhttpd and qcread sources, unpack
qcwebcam-0.3.2.tar.gzfile and compile source with
make. You may need to edit
Makefileif locations of libraries and include files differ from ones defined there - default ones are set for qcread, fhttpd and qcwebcam unpacked into directories under the same base directory.
qcwebcamas an application for fhttpd
qcwebcamas an application into
Application qcam - root 1 64 /home/ftp/qcam* /usr/local/camera/bin/qcwebcamwhere
/usr/local/camera/bin/qcwebcamis the location of qcwebcam binary,
/home/ftp/qcamis the path resulted from URL-to-filename translation on the server ("
*" is added to match "
/home/ftp/qcam-config" pathname for configuration form and "
/home/ftp/qcam-frame" pathname for image "frame"),
qcamis the application name. 64 is the limit of requests number in a queue, and 1 is the number of processes allowed - it SHOULD be 1 because only one process can access camera at a time.
rootis the user, whose userid will be used to run
qcwebcam- it SHOULD be root because accessing parallel ports in this manner and setting proirity for process requires that. "
Application" line should be placed before the default "
Application" line that contains "
*" as the pathmask - otherwise the default application will override it.
qcwebcamas an application into
Application qcam - qcamuser 1 64 /home/ftp/qcam*where
qcamuseris the local username used by remotely running
qcwebcamto login into fhttpd, all other parameters are the same as for local process.
On the remote host where
qcwebcam will be running add into
/usr/local/etc/httpprocrc file (or make one, it
should be owned by root and has permissions 600):
application qcam user qcamuser host hostname password (wr$ql8^ port 8000where
qcamis the application name,
qcamuseris the user on the host
hostname, where fhttpd is running, and
(wr$ql8^is the password of that user on that host (use something as non-human-readable as this but DON'T use this password). 8000 is the port where fhttpd is accepting user processes logins.
/usr/local/etc/qcam.conf(see cqc/qcread documentation). File
<programname>is the basename of
qcwebcamexecutable, so by default it is "
/usr/local/etc/qwebcam.qcwebcam") can have additional options for the camera (see "Changes in version 0.2" and "Changes in version 0.3" sections).
Restart fhttpd by
kill -HUP its proces.
qcwebcam should run locally, fhttpd will start it, and if it
should be running on remote host, start it as root using the command line
qcamis the application name.
<IMG>tag for the image.
<IMG>tag for the JPEG image stream with self-update through server push (Netscape).
http://hostname/qcam is the base URL that maps into path
defined in the configuration.
Since Netscape requires that server-push image streams should be referenced
through <IMG> tags with height and width predefined, you will need
to use "
-frame" URL or a file with somethung like:
<IMG SRC="/qcam?update=serverpush" WIDTH=320 HEIGHT=240>for server-push streams.