webcam_server(1)

NAME
webcam_server - a server to stream webcam video or snapshots

SYNOPSIS
webcam_server [-d device] [-p port] [-D[sh]] [-m[bsf]] [-c caption] [-tf R,G,B] [-tb R,G,B] [-tt R,G,B] [-T x,y] [-q jpeg_quality] [-g geometry] [-n] [-x] [-G gamma] [-f[hv]] [-R rotation] [-r] [-s] [-v] [-l logfile] [-a] [-h]

DESCRIPTION
webcam_server is a server daemon that can stream frames from any video4linux device to remote clients running the provided applet or single frame snapshots running a web browser.

OPTIONS

-a  Enable test mode - does not accept client connections and prints out the current frames per second (fps).

-c caption
    Set a caption to be displayed near the bottom of each captured frame. This string can be formatted for strftime() as follows: %Y - year, %m - month, %d - day, %H - hours, %M - minutes, %S - seconds
    The following variables are also formatted:
    %%V - webcam_server version, %%f - current frame, %%v - number of viewers
    example: webcam_server -c "my webcam %d/%m/%Y %H:%M:%S [version: %%V, %%f frames, %%v viewers]"

-d device
    Specify the video4linux supported device to capture frames from.

-Dh, -Ds
    Disable HTTP (h) snapshots or applet streams (s).

-fh, -fv
    Flip image horizontally (h) or vertically (v).

-g geometry
    Set the image capture size. The specified size must be supported by your video device.
    example: webcam_server -g 352x288

-G gamma
    Simple gamma correction. Adjusts image pixels by specified value. Valid range is -100 to 100.

-h  Display help and command line parameters.

-l logfile
    Specify a file to print log messages.

-mb, -ms, -mf value
    Maximum bytes (b), seconds (s) or frames (f) per client connection.

-n  Force use of read() system call. For some devices this can be faster than the standard memory mapped method of frame capture. (**Recommended for some webcams)

-p port
    Listen for client connections on the specified port.

-q jpeg_quality
    Set JPEG compression quality. Valid range is 0-100 (%).

-r  Retry camera initialization inifinitely upon failure. Useful for when you unplug your camera frequently; the server will start and wait until the camera has been connected.

-R n
    Rotate the image 90 degrees (n) times. 1 = 90, 2 = 180, 3 = 270 degrees

-s  Enable daemon mode via daemon() system call.

-tf R,G,B
    Set text foreground colour. Valid range is 0-255 (for each in R,G,B).

-tb colour
    Set text background colour. Valid range is 0-255 (for each in R,G,B).

-tf colour
    Set text transparency colour. Valid range is 0-255 (for each in R,G,B). To make the foreground or background of the caption transparent, set it to the same R,G,B values as the transparency colour.

-T x,y
    Draw the caption at the specified x,y coordinates in the frame. If the caption geometry (size of the text in pixels) is larger than the width or height of the image subtract the x,y point, the excess text will be truncated.

-v  Verbose mode - display connections and messages to standard output.

-x  Swap RGB colours to BGR colours. (Use this if your frames look blue or red)

GETTING STARTED

The easiest way to make sure things are working is to run the server with no options and try to access "http://localhost:8888" via a web browser.

If your device does not seem to work, try using the -n option to force the use of the read() system call. Try using your device with other software and try similar settings with webcam_server.

If you are using a v4l supported TV capture card and want to change channels, download xawtv and use v4lctl to configure it. This functionality is not yet supported by webcam_server.

SETTING UP THE APPLET
Note: The applet must reside on the same host as the webcam_server!

Copy the following code into a publicly visible HTML document. You may have to adjust some values to fit your needs. Before it can be viewable by others, you must change "localhost" to the host name or IP address of your server.

<APPLET code="WebCamApplet.class" archive="applet.jar" width="320" height="240"> <param name=URL value="http://localhost:8888"> <param name=FPS value="1"> <param name=width value="320"> <param name=height value="240"> </APPLET>

BUGS

Send bug reports to Donn Morrison at donn@donn.dyndns.org. http://donn.dyndns.org/portalofnnod/webcam_server.html (homepage)

AUTHOR
Donn Morrison <donn@donn.dyndns.org>

COPYRIGHT
Copyright (C) 2004 Donn Morrison <donn@donn.dyndns.org>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

MISC
If you enjoy this software, please let me know.