Features
libavg includes a hardware-accelerated display mixer and screen layout engine and integrates high-performance video playback. It supports paragraph-level text layout and rendering as well as cameras. Nearly all parameters can be changed at runtime using python scripts. Input is supported using mouse and keyboard as well as standard touchscreens and multitouch surfaces. Among others, libavg projects have used motors, coin rejectors and relays attached to parallel and serial ports, worked with usb bluetooth dongles and integrated printing.
Screen Layout Engine
The screen layout engine is at the heart of avg. It is responsible for dealing with graphical elements (images, videos, text, camera output) in a generic way and for putting these on the screen. Among others, it supports:
- Hierarchial layouts
- Cropping
- Scaling
- Rotation
- Element-level transparency
- Image alpha channels
- Additive and subtractive as well as averaging blend modes
- Subpixel precision for smooth animations
- Hardware-accelerated OpenGL rendering
- Warping and mirroring of elements
Video Support
libavg video support means:
- Playback pause and restart, playback at user-determined framerates
- Complete display engine integration, including cropping, scaling, rotation and transparency.
- Videos with an alpha channel are supported.
- Very high performance: A Core 2 Duo system can play back two full HD videos at once with the right setup. That's 2x1920x1080 pixels at 25 frames a second.
- Seeks at interactive rates: Essentially, libavg allows random access to the frames of full HD videos without delays using mjpg files.
Text Support
Text rendering is supported with:
- Paragraph-level layout using html <div>-like syntax
- Bold/italic etc.
- Colored text
- Left-/Right-justified as well as centered paragraphs
- Kerning and antialiasing
- Full internationalization using utf8: Arabic, Chinese and Hebrew are all rendered correctly and can be mixed
- Layout - including font face and size - changes in mid-paragraph
Sound Support
libavg supports mixing of an unlimited amount of stereo sounds with a high-quality limiter to avoid artifacts on volume spikes. It supports alsa on linux and core audio on Mac OS X for low-latency sound output.
Camera Support
libavg supports a wide variety of firewire and Video4Linux cameras with resolutions up to 1024x768. Setting camera parameters such as brightness, exposure, saturation and gamma is also possible.
Animation
libavg has built-in support for smooth time-based animations. Any numeric attribute of a node - x, y, angle, etc. - can be animated with a single line of code to create linear and spline-based movements.
Tracking
libavg was used as the basis for the c-base MultiTouch Console MTC (http://www.multitouch.de) and thus supports camera tracking and multitouch surfaces built using firewire and Video4Linux cameras.
Authoring
All of python is available for scripting. libavg directly provides:
- Properties of display elements as python variables
- Full-featured event handling system
- Timers (setTimeout, setInterval)
- Support for logging
- High-level profiling to find performance bottlenecks
- High-precision frame timing and synchronization to vertical blanking for smooth animations

Showcase




