Thursday 30 June 2011

My FLAC vs AAC hobyhorse

I know I go on a lot about the huge use of lossy compression for audio music. That is MP3 and AAC. In the days when we had smaller broadband pipes and very limited download caps, and we had cheap MP3 players, and expensive iPods, these file formats grew exponentially. Threatening the CD for music sales. They enabled marketeers like Apple and Amazon to sell individual tracks, rather than an album CD, with perhaps one or two songs that were any good and a load of rubbish tagged along.

The problem

But the problem is that these file formats have worsened the audio quality and downgraded the public's appreciation of audio quality. The CD has balanced this by maintaining its uncompressed file format, and audience, but even it unfortunately often limits the audio (boosting soft sounds and cutting loud ones) to match the poor performance of domestic, cheap HiFi equipment, and young people's desire to have everything just plain loud. But the popularity of downloads and the iTunes store has promoted an explosion in AAC track sales.

Loss of quality

One thing must be made very clear, lossy formats like AAC spoil the audio quality - often in an unacceptable way. AAC works by what is called psycho-acoustic compression. Which means removing some of the information in the audio file which, in theory, the human ear cannot detect. It is a continuance of the false idea that to reproduce a music instrument it enough to capture only those dynamics and frequencies that humans can detect.

But have a look at these two spectra of music, from Wikipedia, one the original and one a compressed AAC file.

Original file The original file shows dynamics plus a wide spectrum of sound up to above 20kHz.

AAC compressed file This AAC lossy compressed file has lost the high frequencies, they have been cut off by a sharp filter at about 19kHz, but worse than that the dynamics of the sound have been compressed with a flat top and many individual peaks enhanced to the top. This is distortion.


If you believe you can't hear that then you should do two things, buy a better HiFi system and stop using iTunes. Buy CDs or better download HD audio 24bit/96kHz files from companies like Linn audio, HDTracks, etc

Consumers revolt

It is time to revolt and ask the record companies what the hell they think they are doing? Prices of tracks and albums have fallen through the floor, but they seem to have no quality strategy to build a more lucrative market. They even make things very much worse for themselves by selling their product through streaming sites like Spotify, which has a dreadful audio quality. Spotify may have 9million tracks and iTunes 18million, but who needs this much? The amount of tracks available is not the way to boost profits for artists. Better quality is.

They need to focus on offering a better product. That means better recordings, less limited and less compressed, in lossless file formats like FLAC or Apple's Lossless, with a wider dynamics from 24bit recordings and wider bandwidths from 96kHz sample rates (the CD is only 16bit/44.1kHz and it was invented 30 years ago).

Addendum

I found this explanation of lossy compression which seems appropriate:

Since small file size is so important on the Internet, practically all of the formats we're interested in employ lossy compression. Here's how it works. First, the client player decompresses the audio file as it downloads to your computer. Then it fills in the missing information according to the instructions set by the codec. To illustrate why lossy compression is so crucial, consider the phrase, "Now is the time for all good men to come to the aid of their country". One way to compress this would simply be to remove all the vowels and spaces: "Nwsthtmfrllgdmntcmtthdfthrcntry".

That cuts the message from 71 characters to 31, a 56% file savings, but of course our compressed message is unintelligible. Imagine that our codec, however, has appropriate rules for decompressing this message with minimal distortion. The conversion likely wouldn't be perfect, but it would be good enough to understand the message, something like, "Now's tha ti'm for oll gudm en to com to the aad of their country".

No comments: