25 February, 2011

Why You Should Buy (and Sell) Music in FLAC

 Digital music formats examined


  Years ago some companies realized they can sell music online. They started selling music in lower quality formats
and never made enough effort to offer full CD quality audio, which is pretty much a standard we agreed on about 30 years ago. When some stores do offer CD quality, they often want more money for it, treating it as premium. I personally believe that CD quality should remain the standard for music even for online distribution and that a lower quality copy should only be there for convenience, for people who'd rather download smaller files. In my opinion the best format for delivering CD (or better) quality audio is FLAC.


But let's start with some technical basics. You should know that digital audio can be compressed in a lossy or lossless way. What's the difference?
With lossy compression (like MP3) you take the original audio (like a CD) and you use the bits of audio data that are most essential to still retain a good sound, while you throw away those bits that don't seem necessary. When you do this, you can determine how much audio data is kept and how much gets thrown away. The more that you keep, the higher the bitrate and the bigger file size of the MP3s. If you use a high enough bitrate you'll end up with a MP3 that sounds more or less like the original CD. If you use a low bitrate during compression, you'll end up with a worse sound quality, but also with smaller files.
With lossless compression (like FLAC) you take the original audio and you use _all_ of the musical data, without throwing anything away. WAV files are also lossless, with the difference being that FLAC uses non-destructive compression (like ZIP) and has better tagging options (showing artist, title and other information for songs). So the end result is that the FLAC files will sound exactly and precisely as good as the source, while being smaller in size compared to WAV files and better suited for music distribution.


Now that we know the basic theory behind those formats, let's discuss some practical aspects in use. Here are 4 examples that show how using MP3 instead of lossless can be less than optimal (the first two come into play even with direct listening, while the second two are related to further processing):
1. Lossy compression is designed in an intelligent manner, making compression artifacts mostly inaudible. But there are certain sounds, which don't "translate" well. You can find some threads with examples on hydrogenaudio forums (search for abx killer samples).
2. MP3s can in some rare cases have clearly audible artifacts on the transition from one song to the next, even with the highest bitrates. (some examples here). This is not a problem with albums which have pauses of silence between songs, but there are many albums with no pauses, such as for example "The Dark Side of The Moon" by Pink Floyd. 
3. Let's say you bought high quality MP3s (larger files) and now you want to fit them onto a portable media player with limited space. Converting them to a lower bitrate format seems like the best approach. But the problem is that since you're converting them from an already lossy source, you'll lose more quality than if you converted them from lossless and that is more likely to result in audible degradation. Converting to different formats is something that we'll always have to deal with in the future, when new formats emerge.
4. The same applies to the usage of your music for your own creative purposes. Let's say you're making a video that you'll upload online and want to add music to it. At the end of the process, you're most likely going to compress the audio track with lossy compression to achieve a smaller file size. If the source of your music is already lossy you'll run the risk of making it sound worse after additional audio processing and lossy compression. Another good example would be music making and sampling, where you also want to have the cleanest sound source to work with.

Let me make one thing clear, though:  the artifacts I mentioned are mostly very subtle (the exception being the transition pops). In fact, most of the time you probably won't hear any difference between a good MP3 and a lossless version of the same song. Still, the other points are valid in all cases and I believe that at least when you're buying music you should be offered something that's 100% flawless and future proof at no additional price. Then you can decide whether you want to use it or not - if not, you can just download the MP3 version and be done with it.

Besides the technical advantages a good thing about FLAC is that it’s not encumbered with any patents. It’s therefore free to use it for everybody, always. You're free to implement FLAC support in your device or distribute and sell music in FLAC without paying anything. MP3 (like some other formats) is actually patented and in principle you have to negotiate for a fee when you want to use it. Often the fees are not enforced, but still, it's better to avoid any possible complications.


Where to buy (or sell) music in FLAC?

It's a good idea to look for the artists' websites to see if you can buy music directly from them. But since not many artists have the means or technical knowledge to put up a good website, there are quite a few online stores that sell music in FLAC, in exchange for a certain percentage of the profits.
For now, I'll recommend two websites I actually used myself: Indietorrent.org and Bandcamp.com. When you buy music there you can choose between FLAC or MP3 (and some other formats) and you don't need to use any additional software to make the purchase. The album comes in the form of a simple download, which works in any browser. 
Musicians will also make more money using those stores instead of something like iTunes or Amazon. When you pay for music on Indietorrent or Bandcamp, the store takes 10-15% of the money for themselves. By comparison, iTunes and Amazon take 30% of the money, in addition to requiring a label/distributor to sell there, which has its cost as well. So if you want to support a musician (or get support as a musician) it's not a bad idea to keep this in mind.

Just for your convenience, I'll add links to some other stores that sell music in FLAC, although I haven't tried them yet: Zunior, Bleep, eClassical, Addictech, Boomkat, Mindawn, Linnrecords, Mergerecords, HDtracks, Pristine ClassicalQobuz. Some of these charge more for lossless copies, which in general is against my principles. But if it's a small price difference, I guess it's tolerable.


Two potential problems of using FLAC

1. Size - While being about twice smaller than uncompressed CDs or WAV files, FLAC files are still significantly bigger than, for example, MP3s. This is not much of an issue on PCs, since the prices of hard drive storage are so low nowadays, but it's still a relevant issue for portable players, if one wants to fit a lot of music. In that case the solution is to simply convert it to a lossy format for portable use. Since you have a lossless source you won't lose much quality.

2. Compatibility - Most music players on computers support FLAC natively, but some big exceptions (iTunes, WMP) still don't. They can be upgraded with plugins so that they do play FLAC and you can also look at many of the alternative music players. The situation is similar for portable devices and media players, where Apple and Microsoft (as of now) don't offer native FLAC support, although there are applications which can add such functionality to their devices.
Why do these two companies refuse to support it? Well, I think the simplest answer lies in the fact that they sell music in their own stores (iTunes, Zune) and want to keep users in their own "ecosystems". FLAC is a widespread format for CD backups, for p2p sharing and on some competing online stores, but if you're getting your music that way you're not making any money for Apple or Microsoft. They'd rather see you using their own stores and buy music there in their own formats, which work on the devices they sell.
Still, many other media players, phones and other devices support it. The latest Android phones support it by default and for other smartphones there are free applications which allow you to play FLAC, if you wish to do so.




Lastly, why do I support FLAC and not some other good and free format, like WavPack? The main advantage of FLAC is that it's already much more widespread than WavPack and other free lossless codecs and I believe it would be better to standardize on something, rather than have a fragmented lossless market, which could fall pray to some proprietary format that's not as accessible to everyone or is encumbered with DRM.
 

I also mention CD quality a lot, while there are some people who are trying to promote higher resolution audio (24 bit and whatnot). I generally don't think higher resolution audio is necessary, but I'll write more on that another time.

 
To wrap it up: 
Supporting FLAC and lossless distribution in general is not just about being a silly audiophile. It's after all about demanding the same CD quality audio we've been using for so long already, without ever compromising in terms of quality and with the same archiving and converting capabilities. Of course the industry will try to sell you the worst quality they can get away with, while possibly locking you into their own closed systems. Remember 128kbps songs with DRM? Know better and vote with your wallet. Demand lossless audio in a free format as the standard and lossy only as a convenience download format.