I need an OpenSource API in Java, which can encode *.wav and *.au formats to MP3 and vice-versa.
I have evaluated Java Sound API and LameOnJ, but they do not meet my requirements and are not stable, respectively. Please suggest one that is free and platform independent.
There may not be an adequate answer for you, yet, as the MP3 format requires the authors of decoder/encoders to obtain a license from the Fraunhofer Institute.
I think the the LAME library is distributed from a country that does not respect these IP issues, but it took a considerably amount of legal hackery to get this far.
For any other libraries - for example one written in Java, the authors need to get a similar license. Where cost is an issue - e.g. in an Open Source project, then this is enough of a disincentive to starting.
For more details see this wikipedia article.
If LAME4J is not stable enough for you, then I'm afraid your options are probably:
Is has been some time, but Oracle/Sun has released MP3 support for JMF. This can be downloaded from the following url: http://www.oracle.com/technetwork/java/javase/tech/index-jsp-140239.html
Adding it to the classpath will enable playback via the AudioSystem api.
The LAME4J uses the free but time-limited license and the unlimited license will cost you some money.
I've found the Lamejb library on the SourceForge, which requires only the lame binaries and works well without any additional licensing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With