Lossy vs Lossless Audio Encoding
One of the main driving forces behind the rapid march of the digital music generation has been steadily reducing file sizes. Smaller file sizes ultimately offer convenience and speed, enabling you to compact your music collection into a 25GB iTunes library, for example, or reliably stream music across any internet connection, including slow cell tower service.
Audio file compression techniques can be split into two separate camps: lossy [MP3, AAC, OGG], which achieves the smallest file sizes while damaging audio quality, and lossless, which tends to offer big space savings over raw PCM [WAV, AIFF, SDII] data files but without sacrificing quality). Arguably, the most well-known lossy format is MP3, although there’s a growing movement towards other formats such as AAC (Advanced Audio Coding, identified with the .mp4 or .m4a extensions). This is the default format used by Apple’s iTunes and accompanying products. Streaming services like Spotify, Pandora, and Rdio use an open source lossy codec called ogg vorbis, using the .ogg file extension.
Lossy compression works via a form of perceptual encoding – effectively throwing away forever any information that the algorithm deems irrelevant to the human listening experience. The amount of compression is defined by the bit rate, with 128 or 256kbit/s (Kilo-bit per second) being widely regarded as acceptable standards for music reproduction. In comparison, CD files are measured at 1.5Mbps in streaming format. The result of lossy data compression is a dramatic drop in file size – a 700 MB CD, for example, can be reduced down to 50 MB, and to most listeners it will be almost indistinguishable from the original. At more extreme compression settings – under 160kbps – in our opinion, the compromises of lossy compression can become all too evident, and to trained ears, even high bit rates can still do unacceptable things to music.
Uploading these file types to YouTube gets yet another compression algorithm added (to reduce file size on their servers) and will really degrade your sound quality.
A more balanced solution to audio file size reduction is called lossless compression. This packs the source data in a more mathematically efficient way without compromising quality. You might be familiar with a type of this data reduction used across many file formats – ZIP compression. We call this lossless, because when you do the data compression, send the file to its end recipient, then expand it back to its original state: you have lost nothing.
In audio file formatting, the common lossless encoders used are ALAC (Apple Lossless Audio Codec – used exclusively by iTunes), and FLAC (Free Lossless Audio Codec, open source code by the same folks behind .ogg). These create a .zip-like compression format, which allow for full recovery of all data upon expansion, in real time!
Certainly, lossless compression currently seems to be the most exciting area of development for audio storage, with lossless codecs now being developed for many existing formats.
If you need to compress your file size, use lossless codecs!
Storage is so cheap now, there is really no reason to convert to a sub par audio format, and the advantages for use of the files at a later time outweigh the losses by using the lossy formats.