Building PyMedia on Ubuntu 9.04
Unfortunatly, pymedia not packaged in the Ubuntu repos at this time. If you're trying to use CMP on a Windows box, PyMedia has an installer for you. Other Linux distributions should be able to follow instructions similar to these in order to get it working.
Before you do anything, you'll need the python-dev package installed, which you can get by running this command:
sudo apt-get install python-dev
First, go to http://pymedia.org and download the latest version of the framework. You can extract it with the following command:
tar -xf pymedia-1.3.7.3.tar.gz
Now, the fun part. In order to build successfully under x86_64, you'll have to play with setup.py a bit. I'd provide a patch, but it probably won't work with the current version when you're reading this. First, you should delete the call to disable_fPIC() near line 229 (there's only one in the file at the time of this writing). You can do this by adding a # in front of it. Also, you'll need to change the HAVE_MMX define to 0 instead of 1 and change the line
FILES[ 'video.vcodec' ][ 'libavcodec' ]+= MMX_FILES
to
FILES[ 'video.vcodec' ][ 'libavcodec' ]+= NONMMX_FILES
You'll need to add a 'HAVE_LRINTF' define somewhere in the list (I did it right below the HAVE_MMX define), which will make that whole section look something like this
DEFINES+= [ ('PATH_DEV_DSP', '"/dev/dsp"' ), ('PATH_DEV_MIXER','"/dev/mixer"' ), ('_FILE_OFFSET_BITS',64), ('ACCEL_DETECT',1), ('HAVE_MMX', '0' ), ('HAVE_LRINTTF', '1'), ]
In order to build PyMedia, in the installation directory type
python setup.py build
PyMedia will tell you which codecs it finds, and which ones that aren't found. You might already have some codecs installed from some other application, but probably not. The codecs which you build PyMedia with are the ones which CMP will support, so you should add support for the file types you have in your media library (actually, I recommend adding support for them all). The codecs are all in the Ubuntu repositories, though, so you can simply run the following command to add support for them all:
sudo apt-get install libmp3lame-dev libvorbis-dev libogg-dev libfaad-dev
Then, to install, run:
sudo python setup.py install
Enjoy!