is there any example on how to use LameOnJ, Pure Java Mp3 Encoder etc. to encode WAV format to MP3 in java? Example code, tutorial anything would be great!
I'm fully confused in libraries right now; tried Tritonus lib but it gave me:
Error: Unsupported conversion: MPEG1L3 from PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
Maybe thats because I use Mac OS - but I followed Linux instructions as there's no MAC instructions available?! Any suggestions?
As an alternative, use JAVE (J ava A udio V ideo E ncoder) library:
The JAVE (Java Audio Video Encoder) library is Java wrapper on the ffmpeg project. Developers can take take advantage of JAVE to transcode audio and video files from a format to another. In example you can transcode an AVI file to a MPEG one, you can change a DivX video stream into a (youtube like) Flash FLV one, you can convert a WAV audio file to a MP3 or a Ogg Vorbis one, you can separate and transcode audio and video tracks, you can resize videos, changing their sizes and proportions and so on. Many other formats, containers and operations are supported by JAVE.