[sdlsound] playsound error:MPGLIB: Free format not supported.

Kevin Nowaczyk beakerboy99 at yahoo.com
Wed Jan 24 20:11:24 EST 2007

It's curious that SDL_sound uses mpglib from the
mpg123 project, yet mpg123 itself does successfully
play mp3s with ID3v2 tags.

mpg321, on the other hand, uses another GPL library,
libmad for mpeg decoding.  mpg321 also can
successfully play mp3s with IDv2 tags.

I'l just have to run `id3v2 -d` on all my MP3 files
for the time being.


--- "Ryan C. Gordon" <icculus at icculus.org> wrote:

> > Here is the output.  Note: I always see the
> > "audio_alsa: no cards found!" when playing ogg
> files
> > too, but the audio works.
> SDL is probably trying ALSA first, then falling back
> to the OSS driver 
> API or arts or something, so it found _something_
> that worked, just not 
> It really shouldn't write anything to stderr/stdout,
> since that's 
> impolite, but it might be alsalib doing that and not
> SDL or SDL_sound.
> > [kevin at pan SDL_sound-stable-1.0]$ sudo playsound
> > 01_-_Stay_Where_You_Are.mp3 
> > audio_alsa: no cards found!
> > Now playing [01_-_Stay_Where_You_Are.mp3]...
> > Error in decoding sound file!
> >   reason: [MPGLIB: Free format not supported.].
> mpglib is deeply unforgiving about file
> corruption...it gives up 
> immediately when it sees data it doesn't expect,
> which is a problem with 
> a lot of mp3s out there.
> Also, unfortunately, one of the things it doesn't
> expect is ID3v2 tags, 
> so that excludes the vast majority of mp3s created
> in the past few 
> years. This is fairly easy to fix, just no one ever
> has (for ID3v1, we 
> just look for the struct in the last 128 bytes of
> the mp3, and don't 
> pass it to mpglib if we see it. ID3v2's layout is
> somewhat more 
> complicated, but something similar can still be
> done). In a more ideal 
> world, someone would take the time to understand the
> mpglib code and 
> make it recover from bad data. Or replace it with a
> different mp3 
> decoder, but I haven't found one that isn't GPL'd.
> SDL_sound's SMPEG backend is more forgiving of
> strange data, but has its 
> own problems too. Use Ogg files if you control your
> content.  :)
> As you can tell by my long apology here, we're sort
> of at the mercy of a 
>   disproportionate amount of third-party code here.
> --ryan.

Get your own web address.  
Have a HUGE year through Yahoo! Small Business.

More information about the sdlsound mailing list