Python libraries for playing MP3 files

Dave Brueck dave at pythonapocrypha.com
Fri Oct 1 21:41:18 CEST 2004


Timo Virkkala wrote:
> Dave Brueck wrote:
> 
>> Try looking at pygame's mixer_music module at www.pygame.org - it's a 
>> Python interface to SDL_mixer (which can support MP3/OGG/etc).
> 
> 
> Umm.. I looked at both Pygame's and SDL's documentation, and from what I 
> could find it only supports WAV. How do you get it to read MP3 or OGG?

Hmm.. not sure what pages you've looked at, but SDL_mixer's main page 
(http://www.libsdl.org/projects/SDL_mixer/) says:

"It supports any number of simultaneously playing channels of 16 bit stereo 
audio, plus a single channel of music, mixed by the popular MikMod MOD, Timidity 
MIDI, Ogg Vorbis, and SMPEG MP3 libraries"

Pygame's page here:

http://www.pygame.org/docs/ref/pygame_mixer_music.html

mentions both MP3 and OGG specifically.

HTH,
Dave




More information about the Python-list mailing list