portVideo camera framework

important note: the release packages provided on this page are rather outdated, although there has been ongoing development within the reacTIVision project. Please see the latest reacTIVision release for obtaining a more recent version of this software. We are planning to provide an updated release of PortVideo as soon as possible.
Aug. 12th 2009: A 0.4 prerelease including the latest updates from reacTIVision 1.4 is available in CVS


PortVideo is a cross-platform framework that provides uniform access to camera devices for video processing or display. It comes with a SDL demo application which compiles and runs on Win32, Linux and MacOS X systems and can address any USB, Firewire and DV camera that is supported by the host system. This software has been developed by Martin Kaltenbrunner as a part of the reacTIVision framework at the Music Technology Group in Barcelona, Spain.

This Framework is still in its early stages and basically has been built out of spare parts found in other open-source projects and currently provides a reasonably working software for the task. Its design is quite rudimentary and will therefore see some major improvements and changes in the future.

In general there is a simple wrapper class CameraEngine and various subclasses for each platform and camera type. The CameraTool simply returns the chosen or first available camera, initializes it with the desired width, height and color depth. Once started, a new RGB or grayscale image buffer will be returned every time you call getFrame(). See the provided SDL example for further information.

platform notes

Win32: On this platform we are using the DsVideoLib by Thomas Pintaric as a back-end to access the camera. This basically allows you to choose any WDM camera which is installed correctly, which means you can use basically any USB, Firewire or DV camera. The necessary SDL library as well as a Visual Studio .NET project is provided, so you should be able to compile the project right away. More Info on DsVideoLib can be found here.

Mac OS X: The camera back-end for Mac OS X is using QuickTime VideoDigitizer components. This code is based on the seeSaw example application by Daniel Heckenberg and uses a modified version of his vdigGrab.c file. We tested this code also with some firewire, USB and DV cameras and all of them worked satisfactory. An earlier attempt based on the SequenceGrabber component is also included. You can find the original seeSaw code here. There is an Xcode project included, which should also allow you to compile the code without problems, provided you have the SDL framework installed.

Linux: On Linux we currently support Firewire cameras and USB cameras based on Video4Linux. Firewire support is well tested, for the USB cameras we recommend a Philips ToUcam Pro (driver). There is currently no support for DV cameras. In order to compile the demo application type "make" in the "linux" folder". Make sure you have the SDL libraries and headers installed as well as the libraw1394 and libdc1394 libraries and headers.

demo application

There is a simple SDL demo application included, which shows the basic usage of this framework. If you want to start right away, simply implement and add a subclass of FrameProcessor. See the FrameInverter example source code for more information.

Upon startup, the application is looking for the first available camera on thte system. Under Win32 and MacOS X a dialog with the camera settings is shown. If you want to choose a different camera, set the V4L_DEVICE variable. If a camera is found and correctly initialized, the live image from the camera is displayed. Hitting 'T' will show the processed image, which in this demo is a simple imversion of the original. Hitting 'P' can pause the display and hitting 'ESC' will quit the application. You also can save a bitmap image by typing 'B' as well as a raw buffer image by typing 'R'.



This framework is free software, licensed under the GNU General Public License due to the GPL license of some of its subcomponents (DsVideoLib)