[Python-Dev] SoC proposal: multimedia library
l.mastrodomenico at gmail.com
Sun Mar 25 05:52:35 CEST 2007
I would like to participate as a student in google Summer of Code and
I'm interested in feedback on a multimedia library for Python.
The library I propose should have the following features:
* the capability to extract and decompress video and audio from a
few common multimedia file format;
* and, vice versa, it can create a compressed video file from a
series of still images and from uncompressed audio;
* it should have an interface as simple and pythonic as possible;
* it must be cross-platform, easy to extend and not be limited to
a single file container format or to some specific audio or video
* at least a subset of the supported formats should be available
without any external dependency.
I think this can be an useful addition to the standard library: the
goal isn't to reimplement a full fledged media player like mplayer or
VLC, but to offer, e.g., a very simple way to add multimedia
animations to a Tkinter application.
Or, for an application that generates animations, a simple way to save
them in a common file format that can be played by existing media
I know that this may sound like a project way too big for SoC, but I
think it may be feasible: I plan to split it in two parts.
A low level part responsible for splitting encoded audio and video
data from multimedia files (demuxing) and putting it together in new
multimedia files (muxing). I plan to initially only support AVI and
MOV/Quicktime files because they are relatively simple and well
documented (and I have already written Python programs for
manipulating these two formats, so I know them pretty well). New
container formats can be added later and, if the library interface
meets the requirements, existing application will be able to use them
without any modification.
The second part of the library is a collection of codecs for
compressing and decompressing audio and video streams. I don't plan to
invest too much time here: the idea is to write only a few ctypes
wrappers around existing libraries for common formats (e.g. MPEG4/XVID
and Theora for video and MP3 and Vorbis for audio) and/or use existing
third-part Python bindings. Again, new codecs can be added later.
There are already a number of multimedia libraries both inside and
outside of the standard library, but AFAIK they all have limitations:
* a lot of them are specific for a single container format or
codec (e.g. aifc, wave, oggpy, python-vorbis...);
* they aren't cross-platform (e.g. videoreader).
Is there any interest in a library of this kind (inside or outside of
E-mail: l.mastrodomenico at gmail.com
More information about the Python-Dev