Any good recommendations for MP3/Sound libraries for java?

roesslerj picture roesslerj · Sep 17, 2008 · Viewed 35.9k times · Source

I'm looking for libraries to:

  • read and write meta data (for example ID3v2 tags in mp3 and all)
  • convert compressed to to raw audio data and if possible raw audio data to mp3, ogg, aac, ...
  • digitally process the audio data (energy, timbre, Mel Frequency Cepstral Coefficients - MFCC, FFT, LPC, Autocorrelation, Wavelet, ...)

I already know and am not content with:

  • JMF: original from Sun, reads mp3 and turns it into WAV. But does not read meta data nor provide any advanced digital processing features.
  • FMJ: Alternative implementation to JMF with same limitations.
  • jAudio: Not stable and although potential, currently not well maintained.
  • Marsyas: In digital processing just what I had hoped for, but in C++. Maybe some port / integration already available?
  • JID3: API for meta data, but seems to be dead (last release 2005/12/10).
  • JLayer: API for reading and playing, also dead (last update 2004/11/28).
  • MetaMusic: API of the program is neat but no official standalone open source project. Therefore has no community, future support and all...
  • Light Dev: Some interesting features, but not at all complete.

This is what some of my own investigation has turned up. I would greatly appreciate all input, suggestions, critics, ...

Answer

64BitBob picture 64BitBob · Sep 17, 2008

JLayer should do everything you need. It's not dead, it's just stable. The author finished it up quite a long time ago and the MP3 format has not seen much change since. You'll notice that his MP3SPI codebase is a little more recent. What MP3SPI does, is that translates JLayer's abilities into JavaSound APIs. Thus you can take any JavaSound code, add MP3SPI to the classpath, and expect that MP3 files will start working. It's pretty nifty. :)