The Kaa Media Repository is a set of python modules related to media.
Kaa modules are based on parts from Freevo and modules created for MeBox. Kaa exists to encourage code sharing between these projects, and to serve as an umbrella for several previously disparate media-related modules in order to make them available from one (unique) namespace.
Kaa provides a base module that implements the common features needed for application development, such as mainloop management, timers, signals, callbacks, file descriptor monitors, etc. Kaa's other modules provide specific media-related functionality, such as retrieving metadata on arbitrary media files (kaa.metadata, previously called mmpython), Python wrappers for Imlib2, Xine, and Evas, and many other high level APIs for easily creating applications that deal with video and audio.
Kaa is named after the python character in the Jungle Book by Rudyard Kipling.
Contents
Download
Most of the modules in Kaa are in heavy development and have no releases yet. You can check out the current development tree of Kaa using subversion:
svn co svn://svn.freevo.org/kaa/trunk kaa
The following modules have been released:
Current Kaa modules
The maintainers for Kaa are Dirk Meyer (Dischi) and Jason Tackaberry (Tack). Some projects have special maintainers and creators; we only take care of the whole repository. If you have a module that fits into Kaa, let us know. If you find a bug or have a patch, send a mail to the freevo-devel mailing list.
Most documentation pages are not yet created. Feel free to add some information about the module and how to use it.
Base
This module provides the base Kaa framework and is an implicit dependency for all kaa modules. The kaa framework includes a mainloop facility with an API for signals and callbacks, timers, process and thread management, file descriptor monitoring (with INotify support), inter-process communication, as well as a rich, practically magical API for asynchronous programming (see SourceDoc/Async).
Some of the sub-modules in kaa.base have dependencies (such as kaa.db, which requires pysqlite and glib), and while these dependencies are required for those sub-modules, kaa.base itself does not require those sub-modules. Some of the other modules in Kaa may require these sub-modules, and in the case where the sub-modules have optional dependencies in kaa.base (see below), they will be explicitly listed as dependencies in the other modules. For example, kaa.epg requires both kaa.db and kaa.rpc, but only kaa.db will be listed as a dependency for kaa.epg because only it is optional within kaa.base.
The module also contains a main loop (notifier). Some kaa modules like kaa.display require the main loop to be running, while other modules such as kaa.metadata do not. The documentation of the module should explain if and why the main loop is needed. If you already have a main loop running, please read SourceDoc/MainLoop how to merge the main loop you use with the kaa main loop.
- Status: Working
Documentation: SourceDoc/KaaBase, SourceDoc/Async. For information on integrating Kaa into third-party mainloops, see SourceDoc/MainLoop
- Provides: kaa.notifier, kaa.utils, kaa.strutils, kaa.db, kaa.config, kaa.rpc, kaa.input
Dependencies: pyNotifier (optional), PySQLite 2.2+ (optional, but required for kaa.db), glib (optional, but required for kaa.db), PyLIRC (optional)
- Maintainer: Dirk Meyer, Jason Tackaberry
- License: LGPL
Imlib2
Imlib2 wrapper for python.
- Status: Working; 90% complete
Documentation: (TODO: SourceDoc/KaaImlib2)
- Provides: kaa.imlib2
Dependencies: Imlib2 1.2.1+ (required)
- Maintainer: Jason Tackaberry
- License: LGPL
Evas
Python bindings for Evas.
- Status: Working; 60% complete
Documentation: SourceDoc/KaaEvas
- Provides: kaa.evas
Dependencies: Evas 0.99.32+ (required)
- Maintainer: Jason Tackaberry
- License: LGPL
Display
Low level support for various displays, such as X11 or framebuffer. Provides X11Display and X11Window classes for managing X11 windows, with optional support for Imlib2 (render Imlib2 images to X11 windows), Evas (both software and OpenGL canvases), and pygame (render Imlib2 images to pygame surfaces).
- Status: Working; 80% complete (directfb needs work)
Documentation: (TODO: SourceDoc/KaaDisplay)
- Provides: kaa.display
Dependencies: kaa.imlib2 (optional), kaa.evas (optional), pygame (optional), X11 (optional)
- Maintainer: Jason Tackaberry, Dirk Meyer
- License: LGPL
Mevas
MeBox Canvas module with different image libraries (only imlib2 is working right now) and many different output displays like SDL, X11, mplayer. Objects like images can be put into containers and add and removed from the screen without taking care of the redraw. Mevas is handling all this.
- Status: Working but deprecated; slated for removal
- Documentation: None
- Provides: kaa.mevas
- Dependencies: kaa.imlib2 (required), kaa.display (optional)
- Maintainer: Jason Tackaberry, Dirk Meyer
- License: GPL
Canvas
A new canvas system based on kaa-evas.
- Status: Early stage, will be replaced by a new module called kaa.candy
Documentation: http://urandom.ca/mebox/canvas/
- Provides: kaa.canvas
- Dependencies: kaa.evas (required), kaa.display (required unless only buffer rendering is needed), kaa.imlib2 (optional)
- Maintainer: Jason Tackaberry
- License: LGPL
Metadata
A powerful media metadata parser. It can extract metadata (such as id3 tags, for example) from a wide range of media files. Attributes like codec, length, resolution, audio/video/subtitle tracks, and chapters are also returned. The module has support for the following formats:
- Audio: ac3, dts, flac, mp3 (with id3 tag support), ogg, pcm, m4a, wma.
- Video: avi, mkv, mpg, ogm, asf, wmv, flv, mov, dvd iso, vcd iso.
- Media: vcd, cd, dvd.
- Image: jpeg (with exif and iptc support), bmp, gif, png, tiff.
The module is the successor of MMPython created by Thomas Schueppel and maintained by the Freevo project for the last year.
- Status: Working; new parsers or enhancements to existing parsers are always needed
Documentation: SourceDoc/KaaMetadata
- Provides: kaa.metadata
- Dependencies: libdvdread (optional; for dvd parsing)
- Maintainer: Dirk Meyer
- License: GPL
The latest release is kaa-metadata 0.5.0. You can download it from the Freevo project page.
Beacon
A virtual file system based on a sqlite database. It is a merge of the current Freevo mediadb and vfs code. It is possible to get directory listings or query database by keywords. Based on an kaa.metadata and kaa.thumb, additional information about files / items can be provided. The module is based on a kaa.base.rpc client server architecture. It can also generate thumbnails for images and video files and read embedded thumbnails in mp3 files. Optional a fuse backend inside the client can be used to mount a query to a directory.
- Status: Working; 85% complete
Documentation: KaaBeacon, SourceDoc/KaaBeacon
- Provides: kaa.beacon
Dependencies: kaa.metadata (required), kaa.db (required), kaa.imlib2 (required), Epeg 0.9.0+ (optional), fuse (optional), inotify (optional)
- Maintainer: Dirk Meyer
- License: Client API LGPL, Server GPL
EPG
An EPG module for python. It stores data using kaa.db and provides a convenient interface to the different channels and classes. Data can be added to the database with source modules; currently there is support for XMLTV, VDR, and Schedules Direct. Although xmltv itself supports many data sources, native support for most popular sources is desirable and contributions would be appreciated.
- Status: Working; more data sources needed
Documentation: SourceDoc/KaaEPG
- Provides: kaa.epg
Dependencies: kaa.db (required), XMLTV (optional)
- Maintainer: Dirk Meyer, Rob Shortt
- License: LGPL
Xine
A xine-lib wrapper for python. xine-ui is intrusive for Freevo, and it is difficult to control as a slave application. kaa-xine will integrate with kaa-canvas to provide a simple and powerful API for playing movies.
- Status: Working; 90% complete.
Documentation: SourceDoc/KaaXine
- Provides: kaa.xine
Dependencies: libxine 1.1.1+ (required), kaa.display (required, used for video)
- Maintainer: Jason Tackaberry
- License: GPL
Popcorn
Generic player API supporting different backends. Right now mplayer, xine and gstreamer are supported.
- Status: Audio playback working, video needs more work
Documentation: SourceDoc/KaaPopcorn
- Provides: kaa.popcorn
Dependencies: kaa.xine (optional), MPlayer (optional), gstreamer-python (optional). At least one of the players must be installed.
- Maintainer: Dirk Meyer, Jason Tackaberry
- License: GPL
If MPlayer is available, it should be patched with the vf_overlay patch in order to provide full alpha-blended OSD and canvas integration. (Popcorn will support MPlayer without this patch, but will not offer OSD and canvas integration.)
Record
A module to record from different types of tv cards to different outputs. Right now it only supports recording from a DVB card into a file. It is also possible to convert the data on-the-fly from a TS stream into a "normal" mpeg2. It provides a record class which will schedule itself on the device. Possible future enhancements or IVTV support as input and a mbus interface (but maybe that should not be part of kaa.record and in the using application). Detecting of ads during recording would also be a nice feature.
- Status: DVB Working, rewrite based on gstreamer in progress
Documentation: (TODO: SourceDoc/KaaRecord)
- Provides: kaa.record
Dependencies: a tv card
- Maintainer: Soenke Schwardt, Dirk Meyer
- License: GPL
Future Modules
We have plans for the following modules to be part of kaa:
VDR
Python bindings to control VDR and get stuff like EPG data from it.
Project by Rob Shortt
Libvisual
Freevo now has a small module to interface with libvisual by create Imlib2 images. When kaa-evas is done, maybe the module can be converted to draw on an evas canvas object. There is some libvisual support in kaa.canvas now, so maybe this won't be needed at all.
Webinfo
Module to get metadata from the web, like searching IMDb or Amazon. The current version in kaa svn is based on pywebinfo from Freevo CVS, but it needs some more work.
