pygame.error: Unrecognized music format - OSX 10.12

Issue #326 resolved
newan created an issue

Hello, i have an problem on my mac. i cannot play any mp3 file, ogg runs perfect.

import pygame
import time

    time.sleep(100)'Test.mp3') pygame.error: Unrecognized music format

I tested it in python 2 and 3.

  1. Step: brew install python3 hg sdl sdl_image sdl_ttf portmidi smpeg

  2. Step: pip3 install hg+

I also try to compile sdl_mixer by my own, like this issues:

tar zxvf SDL_mixer-1.2.12.tar.gz
cd SDL_mixer-1.2.12
sudo make install

Nothing solved my issues.

Comments (11)

  1. Thomas Kluyver

    In the output of ./configure, look for a line about SMPEG. Does it say it's found SMPEG? It needs to compile against that to support MP3.

  2. newan reporter

    i restarted it :

    checking for smpeg-config... /usr/local/bin/smpeg-config
    checking for SMPEG - version >= 0.4.3... yes
    -- dynamic libsmpeg -> libsmpeg.dylib
  3. newan reporter


    brew deinstall all.

    brew install hg sdl etc ...

    THEN compile sdl_mixer and then pip3 install pygame

    and it works!

  4. newan reporter
    • changed status to open

    sorry i must reopen this. It playes, but only same file - not all mp3s. But if an mp3 is not playing, no error message is showing? returns directly 0 ?

    Any Idea to fix it or to check it?

  5. Thomas Kluyver

    Sorry, no idea about that.

    For future reference, if you run into another problem, it's probably better to open a new issue rather than reusing one that you resolved. It's clearer for people following the discussion that way.

  6. newan reporter

    Thanks for Feedback,

    is there an alternative to smpeg oder another python lib to play all mp3´s. In my project is ogg no alternative, unfortunately

  7. Log in to comment