Why is a .wav file created from a .mp3 file much larger in size?

13,704

The way the two store audio is night and day different. Simply put, a WAV file (which is PCM audio) is storing much more data than the MP3 file is.

PCM audio quantifies the pressure at each sample. There are many samples taken. CD-quality audio uses 44,100 samples per second, per channel. The red lines here are samples:

enter image description here

Graph from: http://en.wikipedia.org/wiki/Sampling_rate

MPEG-1 Layer 3 (and many other lossy audio compression codecs) use a different method for encoding audio. Rather than measuring pressure over time, they measure frequency components over a time. MP3 encoders determine which frequencies are present in a signal for a short period of time, called a frame. A frame may be 576 samples or so long. For those samples, they playback a set of frequencies.

Now, all of this is overly simplified. MP3 has a lot of nice tricks to filter out frequencies that will be masked by others, and some nice smoothing of the playback to make it sound close to the original.

You might find my answer here a bit more in depth: https://video.stackexchange.com/a/635/129

Share:
13,704
sai
Author by

sai

Updated on June 04, 2022

Comments

  • sai
    sai almost 2 years

    It is well known that .wav is a format used for uncompressed audio files. On the other hand, .mp3 files are usually the result of audio files after compression. For instance, only the larger of two tones that are too close in frequency (so that they mask each other) are retained after compression. Also, quantization noise is introduced into parts of the time or frequency spectrum that are not perceptually important (such as frequencies that are too high or too low). Clearly, a lot of (perceptually) redundant information is discarded, which allows for the reduction in file size.

    My question is: why is a .wav file obtained from a .mp3 much larger in size than the .mp3 file? From an information-theoretic view, no additional information relevant to the song could have been added, so why the increase in size? Is it just a consequence of how data is stored in the .wav format? Any answers/references would be much appreciated. Thanks!

  • sai
    sai about 11 years
    Thanks! I have been studying about polyphase filters and psychoacoustic models to try and understand mp3. So you're saying that .wav is just inherently an inefficient way of storing audio since it works in the time-domain, while mp3 stores audio in the frequency domain - which allows it to get away with reproducing the music (the pressure levels) on the fly instead of storing it? In some sense, there is a tradeoff between storage and computation - wav requires less computation, while mp3 requires less storage?
  • Admin
    Admin about 11 years
    Good answer. This useful article ni.com/white-paper/3016/en#3 talks about sampling and frequency.
  • Admin
    Admin about 11 years
    @tai A re-sampled MP3 is going to be larger in PCM format. Obviously the greater quality of PCM (higher sampling rate) you choose the larger the file will be. So at a certain point PCM quality is wasteful as it doesn't improve the fidelity. The fidelity is limited by the MP3 itself.
  • Brad
    Brad about 11 years
    @sai, I would argue that PCM is not "inefficient"... just different! But yes, you have the right idea. PCM requires no computation. DACs convert digital sample values to analog voltage levels which go to an amplifier and drive speakers directly. MPEG decompresses to PCM. PCM is the more "native" way to represent audio digitally.