An Overview of Apple Lossless Compression Results

I recently pointed out that the Apple Lossless codec has gone open source, meaning that this lossless codec can now be freely used in both hardware and software. The Apple Lossless codec (also known as ALAC) is similar to FLAC, and offers the same advantages. When you compress files in a lossless format, you lose absolutely none of the original data. Just as when you compress a text file using zip compression, decompressing returns all the original letters and characters, lossless music compression provides the full fidelity of the original audio you compressed.

It’s interesting to look at the sizes of files compressed in Apple Lossless format. (These file sizes are similar for other lossless formats, such as FLAC, SHN and APE.) I took a handful of CDs, and ripped some tracks to show how the amount of compression can vary.

When comparing file sizes, the easiest way is to look at the bit rate that displays in iTunes. (Comparing file size is more difficult, as the different files used would have to be the same length for this to be valid.) This is an average bit rate, but it gives an idea as to the amount of compression that was achieved. Different types of music, notably with different instruments, result in compression rates that vary widely. Compare the bit rates below to the bit rate of uncompressed music on a CD, which is 1411 kbps.

Here are some examples:

  • A solo harpsichord work by Johann Sebastian Bach: 902 kbps
  • A solo piano work by Johann Sebastian Bach: 554 kbps
  • A movement of a string quartet by Ludwig van Beethoven: 565 kbps
  • A choral work by Johann Sebastian Bach: 690 kbps
  • A piece for jazz piano trio by the Brad Mehldau Trio: 687 kbps
  • A live recording of a song by the Grateful Dead: 796 kbps
  • An excerpt from Steve Reich’s Music for 18 Musicians: 597 kbps
  • A movement of a symphony by Franz Schubert: 645 kbps
  • A song for male voice and piano by Robert Schumann: 446 kbps

Again, these figures are in no way absolute, and for each piece of music, the resulting level of compression could be different if the tempo, volume or instrumentation varied. But what they do show is that some types of music – notably solo harpsichord, which has a high level of harmonics at high frequencies – compress less well than, say, solo piano or voice and piano. The range of compression for these examples is from 36% to 68%, with the majority of the examples clustering around the 50% level.

Note that I haven’t tested much rock music, and especially not much recently recorded rock or popular music. With many recent recordings having high volume and using compression (not the type that reduces data size, but the kind that reduces the dynamic range of music), file sizes can be much larger. If you listen to recent recordings of such music, you’ve probably noticed that they are often very loud, compared with, say, recordings from a couple of decades ago, and these will result in higher overall bit rates when using lossless compression.

iTunes and 24-Bit Music Files?

A report from CNN suggests that Apple is moving iTunes toward 24-bit music files. What this means is that, instead of using 16-bit CD-quality files (AIFF or WAV files) to convert to the AAC format that iTunes sells, they would use masters which are recorded at 24 bits. But this makes little sense, if Apple were to simply continue to sell files in compressed AAC format.

24-bit files offer only one major improvement over 16-bit files: an increase in dynamic range, or the difference between the softest and loudest parts of music. This difference would, however, be lost if the files were compressed. So the only way that Apple could offer improved quality in the music files they sell is if there were to provide them in Apple Lossless format.

Apple Lossless format does support 24-bit audio, but given the quality of digital-analog converters (DACs) in most computers – Macs included – listeners would not notice much of a difference. While many audiophiles swear by lossless formats, the only possibility to hear a difference between them and lossy formats at decent bit rates is with very expensive audio equipment. (And even then, the placebo effect certainly comes into play.) Users who have an external DAC that supports 24-bit files might see a small improvement, at least as far as the dynamic range is concerned, but other than that, there aren’t many advantages to selling this format for use on computers and iPods. (Some may find this forum post and thread interesting for a heated discussion of the differences between 16- and 24-bit audio.)

The differences between 16-bit and 24-bit files can be somewhat complex, and 24-bit files can take up as much as three times as much disk space as 16-bit files. While Apple may want to get into the “studio master” market – a number of classical labels sell files in 24-bit / 96 khz format – it is likely that only a very small percentage of users would buy such files. The audiophile market is a niche market to start with, and files in this type of format won’t attract many listeners.

This said, if Apple were to offer files in Apple Lossless format as on option, this could attract a group of listeners who refuse to buy compressed music. With file sizes (at 16 bits) of a bit less than twice the size of Apple’s current 256 kbps files, they don’t represent a huge leap in bandwidth and storage space requirements. When burned to CD – if anyone still does that – they reproduce the exact data that was on the original CD. And, since they require more space, it’s possible that users would buy larger capacity iPods.

The trend in music downloads, at least for classical music, is toward lossless files (generally in FLAC format). Apple is a laggard in this respect, despite the fact that they offer their own lossless format. It’s obvious that Apple will make this step one day, but going to 24-bit would be only for a limited number of tracks, and most likely only for those tracks that would attract audiophiles. Lady Gaga in 24 bits still sounds the same.

One more thing: the Apple Lossless format supports 5.1 audio tracks. I’d be far more interested in surround sound than 24-bit audio. While I could only play it on my living room stereo, assuming that it could be correctly streamed through my Apple TV, this would be something that might be more popular. Though not many albums are available in 5.1 mixes yet.

Reflections on iTunes Bloat

Is iTunes Bloated? That’s a question I asked on this site back in June. I got some answers, responded to them, but I wasn’t convinced by much of what people were saying about iTunes bloat.

I’ve written an article for TidBITs called Is iTunes Bloated?, examining some of these points, rebutting many of them, and pointing out where iTunes could be changed, and where it can’t be. I’m sure many people will disagree with me on this, because this seems to be a question where people have entrenched ideas.

I admit that I know iTunes pretty well, and am not daunted by its many features. I’ve just written about them in Take Control of iTunes 10: The FAQ, for those who want to learn more about using the program.

iTunes and Large Libraries: Still Slow, Slow, Slow

I have a lot of music: my iTunes library currently contains about 40,000 tracks. I buy a lot of CDs, buy music from the iTunes Store, listen to audiobooks, and download podcasts. This library increases in size as I rip more music, and it has gotten to the point where performance is very, very poor.

I have a Mac Pro (with four cores) that has 4 GB RAM and plenty of hard disk space, so I’m clearly near the high end of potential performance. But as iTunes has progressed, it has not improved its performance; whenever I make any changes in my library (change tags, add tracks, download podcasts), it takes about 5 seconds for the program to become responsive. I get a spinning beach-ball and the program simply pauses (though, to be fair, in most cases it continues playing music if I’m listening to something with iTunes).

I first saw performance problems when ripping CDs, a bit more than a year ago when I bought my Mac Pro. I had hoped it would be faster than my previous computer, a G5 iMac, but it was only marginally more rapid. So I bought a second optical drive: a 52x CD-only drive (the Mac Pro has a superdrive which reads CDs slower than that). This improved ripping speeds a bit, but I finally got fast rips when I created a second iTunes library just for ripping – this proves that the problem is the library size, not the program itself, my optical drive, or my Mac. I can get up to 40x rips now, at the ends of CDs, compared to a max of around 22x with the superdrive.

My iTunes Library file is large: 68 MB. My guess is that iTunes, when working with a file this size, has to write the file anew each time there is a change, and that this is what slows down the program. I see 5-second delays when I simply download a podcast (at the end of the download, when, I assume, the file’s information is written to the library file), or when I uncheck tracks from smart playlists that contain only checked tracks. Any operation that leads to changes in the library file seem to cause the program to hang for five seconds.

I don’t see any solution, other than Apple improving the performance of iTunes and its library files. As people use iTunes more, they are likely to increase the number of tracks they have, and their performance will degrade, so more users will be seeing these problems, especially with slower computers.

At each release of an iTunes update, I hope that Apple will resolve this problem. Alas, after yet another update today (7.7.1) it seems to be even worse when ripping CDs.

UPDATE: When Apple release iTunes 8, responsiveness improved greatly, but there are still lags when tagging files and when importing. It is better, but it’s still far from perfect.

Getting the Most out of Classical Music with iTunes and the iPod

[Update, September 2006. Apple introduced gapless playback to iTunes 7 and to the latest iPods, making the questions of joining tracks, as explained below, moot in many cases. See this article for an explanation of gapless playback.

However, if you have an older iPod (older than the iPod video or nano), you won’t benefit from this feature. In addition, you may still want to join tracks to be able to play music at random, playing entire works, rather than disparate movements. So much of this article remains valid today.]

While Apple is aggressively marketing its iPod to the younger generation, through its ads and commercials featuring black silhouettes dancing to hip-hop and rock music, the iPod is also a valuable device for listening to classical music. However, to get the most out of this type of music, you need to reconsider the way you rip your CDs.

I’ve got eclectic musical tastes. My iPod contains music by the Grateful Dead, The Durutti Column, The Clash, Brian Eno, moe. and Widespread Panic, as well as Bach, Haydn, Handel and Schubert. I’ve long explored all types of music, and the capacity of my iPod lets me carry a diverse selection of tunes with me.

Read more