Which Lossless Audio Codec, and Why?
deadsquid puts forth a worthy follow up question to last week's query on audio codecs: "I'm about to re-rip my entire CD collection for the fourth time. I don't want to do it again, so have decided to invest in a small(ish) array and use a lossless codec to create a reference set of my music. From the reference, I plan on transcoding to a variety of bitrates (depending on where the final product will end up) and whichever format of the week suits the device(s) the transcoded content will ultimately sit on. I don't particularly care about encoding time, but would like something that transcodes nicely to MP3, WMA, OGG, and other formats in a reasonable length of time. I would like to ensure that track metadata is maintained in the reference, and is easily transferable when transcoded. I also want something that's not proprietary to an individual's or small group's whims. I'm thinking FLAC, but was wondering if other people had better experiences with other codecs. If you were to use a lossless encoding format, which would you use, and why?"
I'm about to re-rip my entire CD collection for the fourth time.
;)
Thought I saw this story already this week, wierd.. But one question, why for the 4th time? I've been ripping to MP3 since my Amiga days.
And my Car stereo plays MP3s, I dont see me going to a different codec for awhile. A long while.
Flac would probably be the best to use for one reason. It's open source, no fuss no mess just open source. Plus I believe there are now portable music players that support flac.
I would definitely go with FLAC. No patent/IP worries, no licensing... its opensource... and it transcodes very nicely. I use it personally for my entire collection except what I switch over to my iPod, which is when I transcode it to 192Kbps AAC. Don't use Apple's Lossless, it has licensing issues and Linux decoders are buggy at best. Don't use RAW or WAV cause um... they're too big.
If you like what I've said here, and want to read more, go to http://www.krillrblog.com
.MIDI 'nuff said.
*ducks*
"Times have not become more violent. They have just become more televised."
-Marilyn Manson
Flac: Opensource, nonproprietary, cross platform, and has very good integration with ogg/vorbis.
As for metadata retention, that depends entirely on your encoder. I highly doubt you will ever find a WMA encoder that can retain the tags from a FLAC file, or mp3 for that matter. Oggenc (the vorbis encoder) does it by default:
This will create ogg/vorbis files with the same filenames and will retain all FLAC tags.
I have no idea about mp3 encoders, becuase I almost never use them. I can say that I would doubt that they can directly open a FLAC file, and I would also doubt they can retain the tags - to achieve this you would probably need some sort of intermediary script or program to handle the FLAC -> WAV -> MP3, as well as tag transiton. That being said, most of the good mp3 encoders are open source, so it could be possible that FLAC support could be hacked into them.
Another solution would be to rip to every format at once. abcde (a better cd encoder) has support for several types of output, while only ripping the CD once. In fact, I would reccomend abcde regardless of what you choose, because it is great for batch rips.
Just as a last note, why in hell would you want to use WMA? I can understand vorbis and I can understand MP3, but why WMA?
Beware he who would deny you access to information, for in his heart he dreams himself your master. -Anonymous
I made some comparisons of lossless compression techniques a while back. This web page contains the results of my own tests (for speech data) and links to the tests I found (for music). I use FLAC.
excerpt:
"I'm ripping my entire audio collection to lossless audio files and I need a cheap large-volume storage solution...."
Almost certainly FLAC will be what most people recommend. And it very well may be the correct choice for your situation. But I'd also take into account longevity of the codec. The fact that FLAC is open source, patent-less, etc is only a buffer against obsolescence, not a guarantee. WAV's, for example, have been around forever and are so entrenched that you can be certain that support for them isn't going anywhere. FLAC, on the other hand, has only been around for about 4 or 5 years.
Sorry, but I'm an avid audiophile, and just because all lossless audio codecs generate digital output streams identical to their digital input streams does not mean that they sound the same! We must verify that those bits still sound the same via our one way gold plated speaker cables!
The world will not get better through technology. We must seek to be better people.
Considering he wants to back up his music in lossless form from a digital media source, Nyquist's theorem has nothing to do with it unless he's having to resample the CD through his audio card's input (an extra ADC->DAC step), which I would strongly advise against.
All he wants is a lossless audio codec which will take 44100Hz 16bit stereo as input, and encode it that way. FLAC sounds perfect for the job.
Today's weirdness is tomorrow's reason why. -- Hunter S. Thompson
Let me sum up this entire thread so far and everything that will eventually be added for you:
FLAC blah blah blah. Blah blah Monkey's Audio. Blah blah FLAC blah. Blah blah SHN! Blah. WAV. Blah blah OptimFROG blah blah blah. Blah blah. WMA. WMA?! Blah! Monkey's Audio blah. Blah blah FLAC.
There you go: FLAC.
But I have to say this:
;)
The audiophile with the biggest flamethrower is going to win out on this article.
Karma: Chameleon (mostly due to the fact that you come and go).
I invested in a good-sized array (5 250g drives in a RAID-5), and I'm in the middle of reripping my entire collection.
The format I am using is BIN/CUE... I'm trying to take a perfect copy of the actual CD, so that I can recreate it when I wish. My original goal was to copy every bit on the CD.
From what I have found, however, none of the CD image utilities out there make a bit-perfect copy of audio CDs. I have tried Alchohol, Blindwrite, and something else, and NONE of them result in bit-perfect rips with EAC from the image afterward.
The only way I found I could get bit-perfect copies of the music was to use EAC with its AccurateRip database. EAC won't copy anything but sound, so I'm losing the 'extra' content that comes on some CDs. However, what I really care about is the music, so if I have a bit-perfect copy of that, I'm happy.
There are two major ways to make BIN/CUES... separate wav files, or a single wav file. Both require a CUE sheet to reassemble into a CD image. I chose the single-wav format, because this makes tagging when I actually extract the data into whatever I want to use easier. The separate wav file approach would allow you to more easily access the individual files with a script. I suspect this may be a technically superior approach. But I'm using single WAVs anyway, even though it takes more work.
My actual rip process:
Buy a really good CD drive to rip with. I'm using a Plextor Premium.
Install CYGWIN or find some other way to script a quick 'diff'. (I'll put my tiny script at the end).
Install Daemon Tools to mount images.
Run EAC (I have installed the AccurateRip database as well)
Set EAC to rip to Track%N.wav when extracting.
Rip CD to individual WAVS on the C drive, ensure that everything is either bit perfect or the CD is unknown. AccurateRip only understands individual tracks, so this is the only way I've found to verify that my original CD is perfect.
Have EAC create a separate-files CUE sheet 'with leftout gaps'.
Edit CUE sheet to remove anything but INDEX 00 lines. Remove all PREGAP and INDEX 01 lines. (This was the only way I could get bit-perfect second-generation rips.)
Mount CD image. Rip again to a single-file BIN/CUE image. (this is very fast, 30 seconds to 1 minute on my system) (this will be what you keep)
Mount new image. Rip AGAIN to individual files in a separate directory. (again very fast)
Run a 'diff' between the first generation rips and the final generation. If they're exact copies, then you have a bit-perfect BIN/CUE.
Copy BIN/CUE to server.
Delete everything and start on the next CD.
It would be perfectly possible to skip the second and third-generation rips, since you know you got a good copy the first time, but I prefer the single-file approach... I don't want to work with the wav files directly because I don't have tag info for them in that format. And it doesn't take very long to create the single-file image, so I go ahead and do it that way.
Then the next step is to mount the images and rip with whatever software you want to use. I'm using iTunes. I just mount the images with Daemon Tools off the server and rip with iTunes, which always seems to recognize the CDs. I also found that if I bump iTunes' priority down to Below Normal, my rips go ENORMOUSLY faster... they jump from about 8x (dismal) to about 45x. I assume Daemon Tools isn't running at very high priority and iTunes interferes with it... by bumping iTunes down, it doesn't interfere as much and rips faster.
Oh, iTunes also didn't like the 'Generic' label that Daemon Tools uses by default, it seems to be coded to explicitly not recognize a drive with that label. I changed mine to be a 'Pioneer' 'DVR-1X' during the Daemon Tools install, and then iTunes used it fine.
Once you're done ripping, then script something on your server to compress your WAVs with whatever compressor you want. You won't be able to mount them without uncompressing them again, but you'll save a lot
Monkey's Audio (APE) is open-source and multi-platform. It compresses better than FLAC or Shorten (SHN). Easy choice.
PCM? Then you could store it all on CD!
What the hell do you mean CODEC and LOSSLESS?
You guys make everything way too complex.
There are two methods for compressing data:
1) Lossless compression: Think zip/rar/sit/tar.gz etc. These output the source file bit for bit when decompressed.
2) Lossy compression: Think JPEG/MPEG/MP3 etc. These output with a lot of data stripped off, the best lossy compression attempts to remove as much as possible without affecting quality too much.
Just because something is compressed doesn't mean anything is lost.
Can I get an eye poke?
Dog House Forum
Refer to the lossless codecs comparison on Hydrogen Audio.
Personally, I'd go for Wavpack due to its excellent compression, non cpu-intensive decoding, cross-platform support, active development and open license. If the Rockbox project succeeds, I'll be able to play them on my iRiver.
Use ISO 8601 dates [YYYY-MM-DD]