How to Compress Audio

Luckily, there are many ways to compress digital data. Computer data files, for example, can be compressed with the popular ZIP format. The resulting zip file is usually much smaller than the original file and can be unzipped so that the original file is intact.
Compression formats which retain all of the original data are called 'lossless'. Certain types of files like audio, video and graphics can also be compressed by discarding some of the original data. This form of compression is called 'lossy'.
MP3 is a lossy format - there is no way to reconstruct an MP3 file to its original sonic quality. The advantage in this, however, is a much smaller file size.
The beauty of MP3 files is that they still retain acceptable audio quality while greatly reducing the size of the file. This is accomplished by discarding certain portions of the audio spectrum which are considered to be less important. This includes high frequencies and sounds which may be 'hidden' behind louder sounds.
Audio compression depends a lot on psychoacoustics - the study of how sound is perceived by the ear and by the brain. The compression codec uses a model that determines how a particular audio file is heard by the average person. This model can determine how much of the audio data can be removed while still retaining an acceptable sound.
There are various compression schemes, and each of them has their own model for determining which parts of the audio spectrum are removed. This results in different sound quality between MP3, WMA, Ogg Vorbis and AAC formats. Sound quality is subjective - some people may prefer one format over another.
Bitrate
Besides the actual algorithm used for compressing audio, the bitrate has the biggest influence on sound quality. Bitrate represents the amount of streaming audio data and is expressed as kilobits per second. The 'standard' bitrate for MP3 files is 128 kb per second, and this represents a good compromise between sound quality and file size.
Higher bitrates remove less data and therefore have a higher quality sound. WMA and AAC can achieve similar sound quality to MP3 at lower bitrates, so these formats produce smaller file sizes.
In the early years of MP3, all files were encoded at a constant bitrate (CBR). This means that a bitrate of 128 kb per second (for example) is used for every section of the music no matter whether it was silent or loud. Musical passages which are relatively dense, however, have more audio data than quiet passages, so variable bitrates (VBR) can be used to achieve a higher quality sound. As the music becomes more complex, the bitrate rises, and conversely when the music thins out, a lower bitrate is used.
If you are encoding your own music files it is useful and educational to try out various bitrates and file formats to see what sounds best to you. Keep in mind, however, that certain kinds of music may sound better with a particular codec. Ogg Vorbis, for example, is reportedly ideal for classical music.
© Mp3sDigitalMusic.com 2006