22C3 - 2.2

22nd Chaos Communication Congress
Private Investigations

Ulrich von Zadow
Tag 1
Raum Saal 3
Beginn 17:00
Dauer 01:00
ID 508
Veranstaltungstyp Vortrag
Track Hacking
Sprache englisch

Media System Deployment using Python

Using Python, a large variety of media-oriented systems can be scripted with very little effort. The talk will explore the available libraries for 2d and 3d graphics, video and sound and describe real-world experiences in deploying these systems.

Multimedia on linux has made great progress. A few years ago, video support was very limited, low-latency-audio was impossible, getting jitter-free performance was a nightmare and fonts were rendered with a quality that made any designer cringe. This has changed. One language that has been used successfully in many multimedia systems is python.

The talk will look at what is required to set up a multimedia system with python. While the focus will be on installations in public or semi-public areas (museums, showrooms, the c-base), many of the techniques can be used in other areas as well. Most of the talk will cover Linux-based systems, with some references to the possibilities of Mac OS X systems.

Among others, the talk will discuss the following libraries:

  • libavg: libavg (www.libavg.de) is a display mixer and general multimedia library/framework with a python interface. The goal of avg is to make it almost as easy to build installations as it is to build a web page. Designing interactive systems will still need some programming skills, but this should be kept to a minimum. An avg installation consists of one or more xml files that describe screen layout(s) and corresponding python code that describe the dynamics of the installation: What to do when a user interacts with the system, some time has elapsed or any other input has arrived. The result is a very high-level approach to screen-oriented multimedia that still allows for very competitive performance.
  • alpy: alpy (http://www.stolk.org/alpy/) is an incredible library that allows mixing of sound in 3d with a very high-level interface. It is based on OpenAL, the sound library that was used in games like Unreal 2 and Soldier of Fortune 2, among about 30 others. Sounds can be placed in a 3d space around the listener and moved in realtime with a few lines of python code. The system transparently determines the sound a listener would hear, taking into account distance, orientation and movement of the sound (doppler effects!) with respect to the listener.
  • pyopengl: This library (http://pyopengl.sourceforge.net/) exposes the opengl 3d api to python, allowing full low-level access to the capabilities of modern graphics cards.
  • pil: The Python Imaging Library
(http://www.pythonware.com/library/index.htm) adds image processing capabilities to python. It can be used as a supporting library for the other libraries described. In addition to the library features, the talk will cover areas like interoperability (which libraries cooperate well) and hardware support/ease of installation and configuration. Integration of custom hardware devices using serial/parallel ports ist covered as well. If there is interest, I intend to follow the talk with a hands-on workshop at the c-base on the following day. The workshop will be limited to ten participants, with five computers with preinstalled software available. Persons interested in the workshop can contact the speaker via coder@c-base.org.