MP3 decoders

Posted by: mschrag

MP3 decoders - 17/02/2003 13:43

Am I insane? I've been porting the MusicBrainz audio fingerprinting code to Java and it's mostly done, but i got to the point where I'm actually comparing them, and it turns out that the java MP3 decoder I'm using (javaLayer 0.2.0 from JavaZoom) is producing drastically different results than libMAD (which is what musicbrainz uses by default). Is this possible? Can two decoders play the "same music" (I know the java one works because I can play audio with it) yet produce very different sets of decoded data? It's very possible that I'm just misunderstanding one of the API's and what they're giving me, but I can't for the life of me tell what I'm doing wrong (there are always several layers of type conversion to get from C=>Java, so it's very possible I've done something wacky in the middle somewhere). The other possibility is that what I am perceiving as "drastically different" is pretty different at the lowest level but is not as different as I think when you step back to the frame level. I really don't want to port libMAD to Java ... that would ruin my week.
Posted by: wfaulk

Re: MP3 decoders - 17/02/2003 14:25

There should be no difference in the outputs of two different MP3 decoders decoding the same MP3 file, except, possibly, for compensating for blankness at the beginning and/or end of the audio and not understanding ID3, Xing, Lyrics, etc. metainformation.

There can be wildly different outputs when encoding, obviously.
Posted by: mschrag

Re: MP3 decoders - 17/02/2003 14:40

I guess that's good and bad ... good in that since i can play mp3 audio, this library must be working, bad in that I clearly am not calling the correct methods or I'm misinterpreting the return values...

thanks
ms
Posted by: wfaulk

Re: MP3 decoders - 17/02/2003 15:08

Of course, after saying that, I test it and it doesn't seem to be the case. But that doesn't make any sense to me.
Posted by: mschrag

Re: MP3 decoders - 17/02/2003 15:31

http://www.mars.org/home/rob/proj/mpeg/compliance/

seems to imply that there is some variance.. i haven't tested to see if the values I'm seeing are within these limits ... looking at raw pcm data can be deceptive, I think.
Posted by: wfaulk

Re: MP3 decoders - 17/02/2003 16:07

Hmmm. I guess I'm wrong.

Nevermind.
Posted by: mschrag

Re: MP3 decoders - 17/02/2003 16:16