Tuesday, July 27, 2010

Does "lossless" REALLY mean lossless?

People, here at Chez Angus we are on a campaign to remove clutter. Target #1 is our CD collection.

I may be late to this party, but it now appears to me that you can finally have a truly high quality music system with a computer as the source.

I have gotten an asynchronous USB DAC, a quiet laptop, and a 1T external drive to store the collection on (yes, I got a LOT a rippin' to do).

But I am torn over what format to store the files. WAV or AIFF are uncompressed so they should be bit perfect copies (you can rip using an error correction package), but they are HUGE and we have a fair amount (>1000) of CDs.

Apple Lossless or FLAC are compressed but allegedly no musical information is lost in the compression. This to me sounds like the free lunch I've been warned against lo these many years.

Any thoughts or suggestions folks?

I guess I will try making a couple copies of some favored CDs in each format and listen to them "blind" letting Mrs. A choose the type of file to play.

19 comments:

Anonymous said...

FLAC

LoneSnark said...

FLAC

I am an engineer, and I have been trained to always seek the free lunch, as so many are to be found in my field. Oil was once useless, until an engineer discovered it could light homes. It was as if the world had no oil in it, then one day, bam, free oil to light your home was hidden by elves all over the world.

But you are right, it is good to remember that a free lunch can only ever be had thanks to new technology.

John Thacker said...

FLAC is lossless, at least compared to the original uncompressed (but sampled) CD data and any WAV or AIFF files that you would make. (Those themselves aren't perfect, but they're close enough for human ears.)

There is no free lunch-- the tradeoff involved is that it takes considerably more processing time to decode FLAC than an uncompressed format. However, processing speed is fast enough that the cost is trivial these days.

Dr. Tufte said...

FLAC

I've traded ROIO's for years, and the people that master them are ... um ... well ... a little uptight about sound quality. They do everything in FLAC.

You'll need something to rip with, do the conversion, and play them back. Try EAC for the first, Foobar2000 for the second, and the third one is really determined by how anal you are about the database underlying your library. Oh ... and you can store your backups in the cloud these days.

Les Cargill said...

FLAC is indeed lossless.

1000 800 Mb(yte) CDs fit on a 1TB drive.

And 320K .mp3 is very close to indistinguishable from .wav

Unknown said...

When FLAC came out I was VP of Engineering at EMusic.com, where we had ripped roughly 12,000 CDs and stored them as WAVs. And, lemme tell you, those terabytes were a lot more expensive back in those days (roughly 2001) - we were on the absolute cutting edge of cheap storage and we'd spent "only" $250,000 on the (as I recall) 14 TB array we put together (to leave some room for expansion). We'd ripped them as WAVs to leave room for the possibility we might need to reencode them quickly in the future as technology improved (at the time, we sold 128-bit MP3s - many of our customers were still on dialup).

In any event, as you might imagine, the thought of being able to double our storage space with a simple encoding to FLAC was a tempting one, so I tasked a programmer with determining whether or not FLAC really was "lossless" or not. He wrote a program to crawl the entire 12,000 CD archive, compress the file using FLAC, decompress it back to WAV, and compare the original WAV with the decompressed WAV. In every single case of the 12,000 CDs (roughly 120,000 songs), the files were bit-for-bit identical. So, I can confirm that, for at least that substantial sample, and the version that was available ten years ago, it was, in fact, lossless by any definition.

However, I'd also note that modern psychoacoustic encoding is *really* good. In double-blind tests on really expensive equipment, experts can't tell WAV from 192kbps VBR MP3 - which should be close in quality to 128kbps from more modern encodings. If you encode to even 384kbps, you won't be able to tell the difference double-blind.

I can certainly see going with FLAC to have the option of reencoding in the future (since reencoding 192kbps VBR MP3 to something else will sound terrible). But don't do it because you think you'll be able to tell the difference between AAC and FLAC - you won't. And, FLAC is certainly worth doing. It's no more a "free lunch" than ZIP is for text files - you're trading processing power and time for storage space. It's just that you have SO MUCH processing power it seems free.

E.D.M. said...

Angus,

For me it's iTunes, hands down, no contest.

1) Pop CD in, go do something else for a couple of minutes.

2) CD pops out, you hear a "Ding". Music is in iTunes library properly labeled and with album artwork.

3) Repeat.

The convenience of this far outweighs any loss in audio quality for me. You can blaze through a huge library of CDs in seemingly no time at all. iTunes also allows you to share music libraries with different computers (within a household).

For me the trade off is:

Lose: Some audio quality (that is un-quantifiable to me anyway).

Win: Dead simple organization, and access to my huge (17,000+ song) audio library.

To clarify where I am coming from, I don't have a proper stereo, just very nice self-powered (computer) speakers at home and at work. My iPod is always the audio source. Most of my music library came from my own CDs, I hesitated far too long in buying music directly from iTunes due to some perverse traditionalism on my part... I am sorry I waited so long... Instant access to an artist or album I just heard about is wonderful...

There are plenty of technical and audio-philic arguments for what codec is better. In my opinion a codec is no good if it isn't supported by the devices I want to listen on, for me, that is iPod and iTunes.

Good luck.

--Ed

Dirty Davey said...

The reason that "lossless" coding works is because WAV and AIFF files are completely uncompressed to begin with. For a given sampling rate, a ten-second snippet of WAV or AIFF will take up the same number of bytes whether it's complicated sound or dead silence. In the latter, trivial case, you could "compress" ten seconds' worth of silence into a very small instruction to "repeat this single silence data point to fill ten minutes".

What FLAC or AAC lossless does to the WAV/AIFF file is not so different from what a ZIP program does--represents the entire stream of data in a smaller number of bytes by eliminating redundancy.

The fact that WAV and AIFF are completely uncompressed formats (with no attempt to achieve storage space efficiency) is what makes it possible to have a gain from lossless compression.

(As an experiment, take one AIFF file and one MP3 file and make each into a separate zip file. The AIFF should zip into a markedly smaller file, while the MP3 will not.)

Anonymous said...

Not that I am adding much, but FLAC is loss-less and the way to go. Playback, though, it is less commonly supported than mp3s (which will be similar to the ear, but not in terms of data purity). It takes more processing power to decode/playback, and isn't standard yet. Still transactions costs will not be huge to find playing methods that meet your needs.

eightnine2718281828mu56 said...

EAC (Exact Audio Copy) can convert to:

FLAC for archival, critical listening
MP3 for mobile devices
and copy both to a backup drive

in one fell swoop using MAREO.

I'd recommend getting a second drive to backup all this stuff because it's painful to do that much ripping.

The Benchmark DAC is quite good.

http://www.benchmarkmedia.com/system1/digital-analog-converter/dac1-usb

eightnine2718281828mu56 said...

I attach my pc to my flat panel and use a bluetooth mouse/kb so I can use the mouse from the 'critical listening' position.

I also run an optical link from the pc to the dac to make sure there's no chance of electrical noise/ground loops between the pc and dac.

eightnine2718281828mu56 said...

---------- mareo.ini ------------





PaddingZeros = 3

DeleteWavFile = TRUE

CorrectionChar = _



EXECUTEIF = TRUE

FINALPATH = \_rip\flac\[ARTIST]\[ALBUM]\

FINALNAME = [TRACKPADDED]~[TITLE]

VFINALPATH = \_rip\flac\[ARTIST]\[ALBUM]\

VFINALNAME = [TRACKPADDED]~[TITLE]

EXTENSION = flac

ENCODEREXE = \_rip\eac\flac\flac.exe

PARAMETERS = -5 "[SOURCE]" -o "[DESTTMP]" -T artist="[ARTIST]" -T album="[ALBUM]" -T title="[TITLE]" -T tracknumber="[TRACK]" -T date="[YEAR]" -T genre="[GENRE]"

RENAME = TRUE



EXECUTEIF = TRUE

FINALPATH = \_rip\ogg\[ARTIST]\[ALBUM]\

FINALNAME = [TRACKPADDED]~[TITLE]

VFINALPATH = \_rip\ogg\[ALBUM]\[ALBUM]\

VFINALNAME = [TRACKPADDED]~[TITLE]

EXTENSION = ogg

ENCODEREXE = \_rip\eac\oggenc\oggenc2.exe

PARAMETERS = -q 7 "[SOURCE]" -o "[DESTTMP]" -a "[ARTIST]" -l "[ALBUM]" -t "[TITLE]" -N "[TRACK]" -d "[YEAR]" -G "[GENRE]"

RENAME = TRUE



EXECUTEIF = TRUE

FINALPATH = \_rip\mp3\[ARTIST]\[ALBUM]\

FINALNAME = [TRACKPADDED]~[TITLE]

VFINALPATH = \_rip\mp3\[ARTIST]\[ALBUM]\

VFINALNAME = [TRACKPADDED]~[TITLE]

EXTENSION = mp3

ENCODEREXE = \_rip\eac\lame\lame.exe

PARAMETERS = -V2 --vbr-new --ignore-tag-errors --ta "[ARTIST]" --tl "[ALBUM]" --tt "[TITLE]" --tn "[TRACK]" --ty "[YEAR]" --tg "[GENRE]" "[SOURCE]" "[DESTTMP]"

RENAME = TRUE



EXECUTEIF = TRUE

FINALPATH = \_rip\mp3\[ARTIST]\[ALBUM]\

FINALNAME = [TRACKPADDED]~[TITLE]

VFINALPATH = \_rip\mp3\[ARTIST]\[ALBUM]\

VFINALNAME = [TRACKPADDED]~[TITLE]

EXTENSION = mp3

ENCODEREXE = \_rip\eac\MAREO\doBackup.bat

PARAMETERS = "[ARTIST]" "[ALBUM]" "[VFINALNAME]"

RENAME = FALSE



-------- doBackup.bat --------
--------(copies to E drive)----------





set _p1=%1



SET _p1=###%_p1%###

SET _p1=%_p1:"###=%

SET _p1=%_p1:###"=%

SET _p1=%_p1:###=%



set _p2=%2



SET _p2=###%_p2%###

SET _p2=%_p2:"###=%

SET _p2=%_p2:###"=%

SET _p2=%_p2:###=%



set _p3=%3



SET _p3=###%_p3%###

SET _p3=%_p3:"###=%

SET _p3=%_p3:###"=%

SET _p3=%_p3:###=%





XCOPY "\_rip\flac\%_p1%\%_p2%\%_p3%.flac" "E:\_back\_rip\flac\%_p1%\%_p2%\"

XCOPY "\_rip\ogg\%_p1%\%_p2%\%_p3%.ogg" "E:\_back\_rip\ogg\%_p1%\%_p2%\"

XCOPY "\_rip\mp3\%_p1%\%_p2%\%_p3%.mp3" "E:\_back\_rip\mp3\%_p1%\%_p2%\"

Robert S. Porter said...

I still maintain that MP3's are good enough, but we've already had this argument. Go with FLAC.

I will, however, agree with eightnine2718281828mu56. Get a second drive. HD's are cheap and if you're going to spend hours ripping everything you want a backup.

Matt Gilliland said...

Unless you're listening through the best speakers money can buy (or exceptional headphones, though not necessarily the best), just use EAC to rip to 320k MP3s. If you have those fabled speakers, then FLAC is the way to go (also ripped through EAC).

Shawn said...

alright, you're not on a pc anymore (as far as I know), so you can't really use EAC. that said, if you CAN get access to EAC on a PC and have a disc to rip that you *know very well,* go ahead and rip a copy of the disc at -v0 (recommendations and explanations here), and see if you can ABX (double blind test) the difference between your CDs and the original or a FLAC/AIFF copy.

Following Mr. J. Simon (money where my mouth is), I'll bet you can not tell the difference b/t the original and a -v0 in a true double blind test in anything like a significant percentage of the time, plus the recordings will be about 1/5 the size. Granted, storage space is cheap these days, so it's not such a big deal, but fitting 5x as much on your portable player is worth it.

That said, if you're just dead set against using the mp3 format, I still recommend EAC--do some looking in to it, and you'll see that it's the far-and-away superior ripper/encoder. "Max," on mac, is a distant second, the last time I looked. EAC's claim to fame is that it rips a small chunk, rips it again, and then compares them to make sure it's got the correct data (no disk-wobble-induced skips or whatever).

I'd be happy to continue discussing this, but I have a feeling you're not even going to bother testing your audio-snob ears, and then your options are either to use AIFF (if you're going to be organizing your music for play via itunes) or FLAC (if you're not). Either way, it shouldn't matter in the future, as both formats are as lossless as digital gets (depending only on the quality of your rip--again, see EAC), so you should be able to go, essentially, AIFF/FLAC--->WAV--->FLAC/AIFF/whatever via a relatively easy script.

Finally, there are services that will rip your discs onto a drive for you, depending how quickly you want this done--you send them your discs and a drive, they rip 'em to the drive and send 'em back to you.

more info on what to use for ripping: Gizmodo post

Shawn said...

hmm. FLAC on iTunes. No clue if this is still working w/ the latest itunes, and it might break at any point, so if you're going to organize via mac, I'd still go AIFF.

Shawn said...

replace AIFF in my posts with AAC lossless. whoops. aiff ~= wav, and that's not what I meant to say--you can tell I never play w/ lossless encodings.

eightnine2718281828mu56 said...

---
Granted, storage space is cheap these days, so it's not such a big deal, but fitting 5x as much on your portable player is worth it.
---

That's why I rip to both lossless and lossy formats.

And if a new codec comes along, you can always batch process flac to the new format. Converting from one lossy format to another produces artifacts; flac avoids that issue.

At $60 for a 1T drive, price isn't an impediment.

YoKey said...

http://flacfox.blogspot.com/