Pymedia on debian lenny

Pymedia is a Python module for wav, mp3, ogg, avi, divx, dvd, cdda etc files manipulations.
It allows you to parse, demutiplex, multiplex, decode and encode all supported formats.
It can be compiled for Windows, Linux and cygwin.
we will focus on how to install pymedia on a debian lenny

First install all the dependencies:
$ wget
$ wget
$ sudo apt-get install python-dev libogg-dev libvorbis-dev libfaad-dev libasound2-dev python-pygame
$ sudo dpkg -i libmp3lame0_3.98.2-0.4_i386.deb libmp3lame-dev_3.98.2-0.4_i386.deb

Extract a download of pymedia- and open a terminal in the extracted folder,
Edit the audio/acodec/acodec.c file and on line 31 insert the following :


So you should have:

#include <libavcodec/avcodec.h>
#include “libavcodec/dsputil.h”
#include “version.h”

So we can build pymedia:
$ python build

This should display:
Using UNIX configuration…
OGG : found
VORBIS : found
FAAD : found
MP3LAME : found
ALSA : found
Continue building pymedia ? [Y,n]:
If everything is found press Y

Finally install pymedia:

$ sudo python install