Sunday, May 17, 2009

Digital Audio: Why File Formats Matter

It's time to discuss the next of my nine suggestions for building a digital audio archive. Today, let's look at the process of choosing a permanent format for your ripped music tracks -- and at why that format should use lossless compression

'Lossy' Versus 'Lossless' Audio Formats

A lossless audio format does exactly what the name suggests: It creates a copy of a music track that contains the same amount of information as the original. Most CD ripping tools, for example, start by converting each audio track to WAV format -- an uncompressed, lossless format that enjoys nearly universal support.

The problem is that an uncompressed lossless audio track can be very large. A typical music track in WAV format, for example, often runs to 60 or 70 MB.

File compression helps to solve this problem. You already use file compression technology whenever you open a WinZip software archive or store digital photos in JPEG format. Whether a compression scheme works with software, images, audio, or some other format, it serves basically the same purpose.

Like other file compression methods, compressed audio file formats take two different approaches to getting the job done. Without getting too technical here, I think it's very important to understand how each of them works.

Formats that make a music file smaller by permanently discarding some data are known as "lossy." Lossy formats such as MP3 and Ogg Vorbis can shrink the size of an uncompressed music track by 90 percent or more.

Lossless compression formats, by comparison, shrink a music file by using special algorithms that don't actually throw away any data. These formats, including FLAC and APE, don't deliver the same amount of compression, but they can still shrink an uncompressed WAV file by 50 percent or more.

Lossy formats serve an important purpose. When you are using a portable music player, for example, storage is often at a premium; lossy formats allow you to pack as many tracks as possible into a limited amount of space.

When it comes to building a permanent, audiophile-quality digital music library, however, it's a terrible idea to rely on lossy audio formats.

Lossy Formats = Lost Opportunities

As I mentioned above, a "lossy" format makes audio files smaller by discarding a certain amount of digital data. Depending upon the format used, the compression tool, the playback system, and other variables, it can be very difficult to hear the difference between a lossy and lossless audio track.

This fact, however, doesn't outweigh the biggest drawback of any lossy audio format: It works by permanently throwing away data.

There are at least three reasons why this is a problem. First, keep in mind that technology will continue to evolve -- and improve -- over time. If a new and improved lossy format takes the world by storm in a few years, it won't do you much good if your music library is already compressed using one of the current lossy formats.

Here's the reason why: The process of converting, or transcoding, an audio track from one lossy format to another always degrades the sound quality. In many cases, transcoding between lossy formats even once will leave you with a track that sounds noticeably worse. Once this happens, you must either live with the degraded track or re-acquire it from a CD or other original source.

Second, storage capacity will continue to get cheaper and more plentiful. While most portable devices still don't include enough storage to hold a large number of lossless audio tracks, that will almost certainly change. Sooner or later, the biggest reason why people use lossy formats -- limited storage capacity -- will turn into a non-issue.

Finally, there is a philosophical issue involved here. It won't matter to a lot of people, but it should matter to you, since it cuts to the heart of what it means to build a truly first-rate, audiophile quality digital music library

A permanent archive, by definition, is something that will serve you tomorrow, next month, and even many years from now. Just as tearing pages out of books is a lousy way to make room in a library, ripping audio files using lossy formats is an inherently destructive, wasteful approach to building a permanent music archive.

Finding Lossless Music: Vote With Your Wallet

Are there exceptions to this rule? I can think of at least one.

Many online music retailers still sell a lot of music in lossy audio formats. Worse still, many of these lossy formats are proprietary and poisoned with digital rights management (DRM) schemes. (I'll explain in a future post why it's a mistake to buy music that uses DRM.)

The best way to avoid this problem is to buy or acquire only music that is available in a lossless, DRM-free format. If you plan to buy a whole CD, for example, consider buying (and ripping) an actual CD rather than buying the same tracks in a lossy format from an online retailer.

While some online music retailers now offer songs in lossless, DRM-free formats, they are still few and far between -- and they almost always offer lossless music only from smaller, independent record labels. The best way to change this is to vote with your wallets: When you buy online, try to do business with stores that offer music in lossless formats.

Why FLAC Is The Answer

From the start, I settled on a particular lossless, compressed audio format for my music library: FLAC.

In a recent post, I discussed why open-source formats like FLAC are a great choice for building a truly free, flexible long-term archive. Yet FLAC isn't your only option here; other lossless formats, including the Monkey's Audio APE format are also worth considering. I settled on FLAC because it is an open-source format, it delivers decent compression, and it enjoys relatively widespread hardware and software support.

(Hardware support for FLAC is getting especially good these days, especially compared to APE, which isn't quite as good at delivering on-the-fly track seeking and playback.)

If you own an iPod, a Zune, or some other popular digital music player, you will find that most of them only support proprietary lossless audio formats -- when they support any lossless formats at all. That is a minor inconvenience; as I will discuss in a future post, many music-management tools make it easy to generate lossy tracks on the fly for use in a portable music player.

Think of the difference this way. When you take a great digital photo and want to create a thumbnail image, would you throw away the original to do it? Of course not! While that thumbnail might be good for certain purposes, it would look terrible on a big-screen monitor or an expensive photo priniter.

Instead, you would simply make a smaller, low-resolution copy of the original. That's a good way to think of the difference between your lossless music archive -- tracks that sound great on even the most expensive stereo system -- and the lossy copies that you create for your iPod or other portable players.

Want To Know More?

I'm covering a lot of ground in this post, and I hope it's accessible even to non-technical readers. If you're looking for more detail on the concepts I discuss here and don't want to wait until I revisit them (hint, hint), here are some links to get you started.

- Wikipedia has a chart comparing every significant audio codec against a number of common criteria. Also check out these 2006 studies comparing the performance and efficiency of leading lossy and lossless audio formats.

- If you're looking for advice or disucssions on almost any audiophile-related topic, the HydrogenAudio forums are likely to have what you need. It's an immense and somewhat unwieldy resource, but it's also the best of its type on the Web.

- Finally, Start here if you want to know more about FLAC, including pointers to information about current software and hardware support.

NEXT TIME: Why Be Normal?

0 comments:

Post a Comment

I moderate all comments. Trolls will be hunted down and sold to black-market organ-harvesters.