Green Did you know a TV, running 5 hrs a day, only uses $21.09 of electricity a year? http://t.co/p7Lgvi24
Video Gary Shapiro discusses the impact of government policies on the economy. http://t.co/KSVebGLZ
CEA Get the big picture with CEA's digital imaging benchmark http://sbne.ws/r/ahyp

Digital Audio 101: Everything you need to know about audio file formats

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:

  • MP3
  • MP3 VBR
  • MP3 Pro
  • AAC
  • WMA
  • More
 
Codecs that reduce file size while precisely reconstructing the original signal are known as lossless. Here are some examples of lossless codecs:
  • FLAC
  • OGG
  • WMA Lossless
  • More
 
File formats that don't reduce file size at all are known as uncompressed. Here are some examples of uncompressed file formats:
  • CDA
  • PCM
  • WAV
  • AIFF
 
More complete lists of file formats are available on the Wikipedia and Fileinfo websites. Those supported by iPods are listed on the Apple website.
 


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:
 

Codec Data Rate File Size
MP3 at 128 kbps 2.9 MB
MP3 at 192 kbps 4.3 MB
MP3 at 256 kbps 5.7 MB
MP3 at 320 kbps 7.1 MB
 
Lossless codecs take up more space than lossy ones, and uncompressed files take up the most space of all. Here are the file sizes for the same three-minute song ripped in lossless FLAC and uncompressed WAV.
 
Codec Data Rate File Size
FLAC Variable 16 MB
WAV Fixed at 1411 kbps 31.5 MB
 
As these numbers indicate, compared to MP3 at the lowest quality, MP3 at the highest quality takes up more than three times as much storage space, lossless FLAC more than five times as much, and uncompressed WAV more than ten times as much.
 


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:
 

Device Capacity Songs Albums
Hard drive 160 GB 37,209 1860
Flash memory 8 GB 1860 93
DVD-R 4.7 GB 1093 55
CD-R 700 MB 163 8
 
But what if you prefer to listen in a higher-quality lossless format, such as FLAC? You'll get about a quarter as much material onto each device:
Device Capacity Songs Albums
Hard drive 160 GB 10,000 500
Flash memory 8 GB 500 25
DVD-R 4.7 GB 294 15
CD-R 700 MB 44 2
 
Clearly there is a tradeoff between quality and efficiency. What is best for you depends on what kind of listener you are and what’s important to you. For the listener seeking the best listening experience, high-capacity devices make it possible to eliminate lossy codecs entirely while still storing a lot of material.
 


Playback and Copy Restrictions
 
Codecs can be open or proprietary. Open-source codecs are created to operate across multiple platforms and in many different devices. Some proprietary codecs—for example, MP3—operate the same way. But others are limited to approved devices. For example, if you download an AAC file from the iTunes store, it will play in approved devices such as iPods, but it may not play in other devices that do not handle AAC.
 
Proprietary codecs may have a layer of DRM—a kind of copy protection—to further limit their use to approved devices. Here are some examples of proprietary codecs and DRM that have been used in download services. These are subject to change:
 
Store Codec DRM
eMusic MP3 None
iTunes MP3 Fairplay
iTunes Plus AAC None
MusicGiants AAC Certified for Windows Vista
Napster WMA Lossless Certified for Windows Vista
Rhapsody WMA Certified for Windows Vista/none
Wal-Mart WMA/MP3 None
Yahoo Music WMA Certified for Windows Vista
Zune Marketplace WMA/MP3 Certified for Windows Vista/none
 
Before you pay for a download, check your music player's manual to verify that it handles the music store's chosen codec. Likewise, make sure any music player you buy can handle the bulk of the file formats in your music library. Some may need to be converted.
 
Music Library Software You can rip and organize your music library using any of several applications. Here are just a few major ones. Any of them will rip MP3s and some will also convert between listed file formats:
Software Supported Codecs
iTunes AAC, AIFF, Apple Lossless, MP3, WAV
Windows Media Player AAC, AIFF, Apple Lossless, MP3, WAV
WinAmp MP3, WAV, WMA
 
Some players may require a specific music-management application—for example, only iTunes will manage an iPod. Some players may be managed by Windows Explorer (the file manager built into every version of Windows), allowing easy drag-and-drop file transfer without need for other software.
 
To make music accessible through an interface—either a music player or computer software—you may want to edit the metadata, using tags to identify artist, album, song, track number, musical genre, etc., for each file. This can be done with any music management software including iTunes and Windows Media Player. You can also edit metadata directly through Windows Explorer by right-clicking the filename and selecting Properties.
 
Would you like to convert a vinyl library into digital form? There are three methods:
  • Use a turntable with built-in phono preamp and USB output
  • Use any turntable with separate USB-equipped phono preamp
  • Burn LPs or 45s to CD-R or CD-RW and rip the CD-R/-RW