Search code examples
jlayer

jlayer increasing size of file when convert .mp3 file to .wav file


I am using jlayer to convert mp3 file to wav format. The code is working good but the size of wav file is increased about 5 times the size of mp3 file. For converting i have used the jar file provided by the jlayer.
Anyone please tell how to optimize the size of the file.


Solution

  • You cannot optimize the size of a WAV file, its size depends on the audio data written into it. The higher the quality of audio, the larger the file. The longer the length of audio, the larger the file.

    WAV files contain PCM encoded digital audio. The reason we use MP3 and other audio encoding formats is to reduce the file size, in exchange of quality.

    So when you convert a file from WAV to MP3, you get a smaller file but you lose audio quality.

    If you convert the resulting file from MP3 to WAV (which is what you do), you always get a larger file and you never get back to the original audio quality.