Audio file formats have given music wings. Encoding the zeroes and ones of digital audio into files turns computers and handheld devices into versatile music machines. But audio file formats differ in critical ways, including sound quality, compatibility, and storage efficiency. Because of this, it pays to learn a little about the alphanumeric gumbo of MP3, PCM, AAC, and so on.
How Audio Files Work
Like any other kind of file on your computer, an audio file is simply a container for data. To fill that container, a codec may be used to encode the data for storage and decode it for playback.
To make the most of limited storage space, the codec may eliminate some data. This "paring down" is what allows thousands of songs to be stored in a portable music player. Some codecs use psychoacoustic principles to determine which data can be discarded with the least impact on sound quality.
Codecs that reduce file size by eliminating data are known as lossy. Here are some examples of lossy codecs:
File Formats and File Sizes
Lossy codecs operate at differing data rates, also known as sampling rates or bit rates. Encoding more bits allows higher audio quality, while encoding fewer bits allows greater efficiency. So an MP3 encoded at 320 kilobits per second (kbps) will sound far better than one encoded at 128kbps—but it will also take up more storage space. Here are the file sizes for a three-minute song ripped in MP3 at different data rates. Data rates are in kilobits per second and file sizes are in megabits:
File Sizes and Storage Devices
How do these file sizes relate to the bit buckets that carry digital data—such as portable music players, computer drives, or optical discs? Let's use one of the most popular ripping options, MP3 at 192 kbps, to calculate song and album capacity for various storage devices (assuming a three-minute song and a 10-song album). The first is a hard drive built into either a portable music player, computer, or home server. The second is flash memory, either a flash-based music player or a thumb drive. The third is a recordable DVD, and the fourth is a recordable CD. This is how many songs and albums you can fit: