qcwebcam - QuickCam-based webcam program for fhttpdVersion 0.3.2, beta release by Alex Belits, abelits@phobos.illtel.denver.co.us.
/usr/local/etc/qcam.conf and /usr/local/etc/qcwebcam.<cameraname> files.
qcwebcam is 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. qcwebcam does
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
qcwebcam while buffering, HTTP protocol and security is handled
by HTTP server. Flow control (actually dropping frames for slow connections)
is done by qcwebcam using 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.
/usr/local/etc/qcwebcam.<programname>:
autobrightness <value>
<value>. Default value is 128.
-frame" URL
-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.<programname>
(default is /usr/local/etc/qcwebcam.qcwebcam) may contain the
following keywords:
url <custom-url>
<custom-url> is the base URL for the camera.
(SHOULD be the same as defined in HTTP server configuration)
camera <cameraname>
<cameraname> is the camera name in
/usr/local/etc/qcam.conf file.
framerate <fps>
<fps> is the frame rate (should be between 0.001 and
100 to be accepted, but values >1 are impractical).
qcwebcam 0.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.
qcwebcamqcwebcamqcwebcam on the host, already running fhttpd, with
installed fhttpd and qcread sources, unpack
qcwebcam-0.3.2.tar.gz file and compile source with
make. You may need to edit Makefile if 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.
qcwebcam as an application for fhttpdqcwebcam as an application into
/etc/fhttpd.conf file:
Application qcam - root 1 64 /home/ftp/qcam* /usr/local/camera/bin/qcwebcamwhere
/usr/local/camera/bin/qcwebcam is the location of qcwebcam
binary, /home/ftp/qcam is 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"),
qcam is 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. root is 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.
qcwebcam as an application into
/etc/fhttpd.conf file:
Application qcam - qcamuser 1 64 /home/ftp/qcam*where
qcamuser is the local username used by remotely running
qcwebcam to 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
qcam is the application name, qcamuser is 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.
qcwebcam/usr/local/etc/qcam.conf (see
cqc/qcread
documentation). File
/usr/local/etc/qwebcam.<programname> (where
<programname> is the basename of
qcwebcam executable, 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.
If 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
qcwebcam qcamwhere
qcam is the application name.
qcwebcamqcwebcam will be:
http://hostname/qcam-config"
http://hostname/qcam-frame"
<IMG> tag for the image.http://hostname/qcam"
http://hostname/qcam-config?update=serverpush"
http://hostname/qcam-frame?update=serverpush"
<IMG> tag for the JPEG image stream with self-update through server push (Netscape).http://hostname/qcam?update=serverpush"
where 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.