sourceforge logo VNCCAM
screenshot VNCCAM is a frameserver for AXIS and other "webcams" that speaks the VNC protocol (also known as the Remote Framebuffer protocol).

Releases: VNC viewers
About
This program fetches images as quickly as it can from a given URL. It processes them minimally -- such as rotating the image and overlaying it with text containing a short description and the date and time. It reads a configuration file, by default "vnccam.xml". It takes exactly one command-line option, -f, to specify a config file. I wrote it in a few days to fill a need at my company, so it doesn't have a lot of polish or options, and may or may not do what you want. It may even kill and eat your dog, so don't come asking about a warranty. There ain't one. But send me (Michael Rothwell) patches and ideas if you'd like!

It's implemented as a single process server using the glib events system. Yeah, I know that using a GUI toolkit's libs to write a server app is kind of cheesy, but it's fast, and it works. I plan to add worker threads and non-blocking I/O of my own at some unspecified point in the future, probably after I add an option to change the font color. It does produce anti-aliased type, though. :)


Config File Format
The config files are in XML format. Be sure to observe proper XML syntax when altering or creating a config file, otherwise your mileage will vary in a way you won't like. Be aware that all config options are case-sensitive.

The display option has two parameters, id and name. The ID is the VNC display number. This is port 5900+ID.

The background option has a single parameter, "file" -- which is a JPEG, GIF or PNG image, whatever GdkPixbuf can read, actually -- that will be painted as the backdrop for your camera frames.

The font option takes two paramters, "file" and "size". Size is in points. Use truetype fonts.

The camera option(s) take five parameters. Url is what it says. The value of "name" will be overlayed on the frame image using the specified font. X and y are the location at which the frame should be overlaid on the background image. This lets you make nice frames using Gimp or whatever. Jpegout, if specified, is the file into which the server will write the most current frame, post-processing, and without the background image. Rotate, if set to "true", will rotate the image 180 degrees. This is useful if you mount your cameras upside-down from the ceiling. you can have multiple camera sections, but be sure to specify different "jpegout" parameters or they will all overwrite each other. If you make the images overlap, their apparent z-order will depend on the order in which they are fetched and written, which will effectively be random. Text_x and text_y specify the position at which to draw the text. The box_? parameters specify the position, size and color (including alpha) at which to draw a box. This is used to draw a background for the text, so it is always visible. The alpha-blending of the box allows you to see stuff behind it, if you want to. To prevent a box from being drawn, with leave out the parameters, or set the box width and height to 0.

Here is an example config:

<vnccam>
<display id="25" name="Some camera"/>
<background file="cam-single-bkg.jpg"/>
<camera url="http://some-camera.com/fullsize.jpg?compression=low&axislogo=off&clock=off&rotation=normal"
name="some camera"
x="11" y="7"
text_x="10" text_y="10"
box_x="0" box_y="0" box_w="-1" box_h="20"
box_r="255" box_g="127" box_b="255" box_a="64"
jpegout="cam0.jpg"
rotate="true"/>
</vnccam>

Requirements
This uses glib 1.2.8, GdkPixbuf 0.90, libjpeg, freetype 2.0.1, liburi and Hermes. I wrote it on Linux (RH6.2), and deployed it on Linux, so it works there, at least. Let me know if it works anywhere else. :)
It's not too harsh on CPU. I've got five cameras being monitored by a P-200 with 48 MB of RAM. Each process (I have one per cam) uses less than 3MB of memory.


Building
Type "make." There is no "make install."


Installing
Copy the files somewhere. :)