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
So long as you follow Mr Nyquists theorem, all will be well with your endeavour.
I've been ripping and encoding my CD's (~700) and I've used FLAC so that I won't have to do it again. I'm getting anywhere from 50% to 70% compression...so you will need a LOT of disk space. At the same time, I've also been encoding into Ogg Vorbis so I can stream them using a tool that acts as an encoder but calls other encoders (the name of which escapes me at the moment:-). I must say that the RIP takes a lot longer than either encoding step.
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.
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).
Write one yourself.
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
Okay, while we're on the audio topic - does anyone know of any car stereos that have a CompactFlash slot, or some other type of flash memory slot? I think Sony made some with MemoryStick slots, but I'm not sure they're doing that, anymore. It's hard to tell since they've ceded their car stereo section to Crutchfield's website (no kidding).
Monkey's Audio (APE) is open-source and multi-platform. It compresses better than FLAC or Shorten (SHN). Easy choice.
Too bad /.'s search function sucks ass, or I'd be able to find that previous story...
If you have the space, use raw PCM, otherwise known as .WAV (WAV's just a meta-format, but it usually means PCM). You can recode that to anything you want. FLAC is the current champion, but if something new comes along, it'll damn sure read .WAV as well.
Just rip it to whatever the format-of-the-moment is, and keep your originals somewhere safe. There is no sense in keeping terabytes of lossless-compressed music if it only serves as an intermediate format.
:)
I rip my music to MP3, `Lame --preset extreme` and it's fantastic ~230 kbps. Sounds great on my home system, sounds great in the car, and yes I have some pretty respectable sound in both places. If we ever invent a new format that compresses even better while retaining the same/better quality, AND is playable in a car deck, then I'll reencode.. I figure it'll be 2016 before that sort of thing comes about, so until then my discs are safe in a big brown box in the closet.
Sell off that encoding cluster and go buy some more albums
-Billco, Fnarg.com
I just use grip with the "rip only" option (no encoding). Metadata are stored .wav postpended. Works for me. One nice thing about WAV is that it's
at the filesystem level: the author's name as a directory, and within that
the album title as a directory, and within that the track name as a filename,
with
lossless. Another is that it's supported by, you know, absolutely everything.
Cut that out, or I will ship you to Norilsk in a box.
What the hell do you mean CODEC and LOSSLESS?
You guys make everything way too complex.
"Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
I hadn't heard of it since.
I suppose it's time to re-rip to .flac.
It goes without saying that I am only interested in lossless codecs.
You could've hired me.
PCM? Then you could store it all on CD!
Face it, when talking about lossless codecs, they all do the same thing: enable you to recreate the music without any loss. There's nothing to compare in terms of sound performance. You could compare encoding/decoding speed, file size, etc., but I personally think it's a wash. For me, compression or speed doesn't matter when I'm storing my entire collection and converting only an album here or there.
Your concern, then, should be how you want to manage and convert your music. If you use a Mac and like iTunes, use Apple's lossless codec. If you want to run on just about anything and do not want to be tied down to any OS or standard, use something like FLAC. If you think Monkey's Audio sounds cool, use that. If you like some other lossless program, use that.
I put everything into FLAC and wrote a script to process m3u files to turn the FLAC files into MP3s. I did this mainly because my music resides on a FreeBSD machine (on a RAID system). I can automatically convert all 3400+ songs into MP3, OV, whatever. Then, if a better lossy codec ever comes along, I can convert my entire library by editing one script. Sure, it will take a while, but it can run over the weekend.
-- Fugacity: Confusing chemists since 1908
While I haven't had too much experience with the format yet, wavepack might suit you dandy. (http://www.wavpack.com/). It's open, transcodable, and better yet, essentially has it's own immediate-conversion to the lossy-wavepack format (Because it's made up of two parts, a lossy "file" and a correction "file", and you can just splice off the lossy version, as far as I understand it).
[ you and I are ugly ]
Ok, Flac is the guy answer, but what would he use to transcode FLAC without loosing his metadata?
How does EAC compare with Linux tools like cdparanoia?
It would be shameful if Monkey's Audio's license became an OSI-approved license. It would point to a profound irony as well. Consider the situation from a business perspective and don't forget that the open source movement's chief audience is businesses.
According to the Monkey's Audio developer site: "If you're trying to make money, in any way, talk to me first.". This is a restatement of section 2 of the Monkey's Audio license ("2. The use of Monkey's Audio or the Monkey's Audio source code for any commercial purposes including, but not limited to, implementation in shareware packages is strictly prohibited without first obtaining written permission from the author.").
This means that you need additional permission beyond the license to do something you deserve the right to do--distribute modified or verbatim copies of the covered work for a fee; something you would have the right to do if Monkey's Audio license qualified as a free software license, which it clearly does not. The copyright holder could deny your business permission ad hoc. Choosing to deal with licensors like this means that you are choosing to build your business on sand (metaphorically speaking).
I can hardly believe I need to tell open source proponents about the value of paying attention to all computer users, including those in business. Semi-free software is insufficient. We should not exclude profit-minded users from free software. We should insist that everyone can enjoy the freedoms of free software.
So why is Monkey's Audio and so many of their users describing the software as "open source"? Because of a different shame, a failed attempt to supplant the free software movement by substituting a weaker definition tied to a different term that the OSI thought would address the ambiguity of the English word "free". Just like the FSF describes, "open source" here is probably being taken to mean the ability to view the source code. Anyone who has read the open source definition knows that merely seeing source code is explicitly not what the term "open source" means, yet this is the misunderstanding many come away with. So, now we have two movements: the older free software movement using an English word with multiple meanings provoking initial misunderstanding (which non-English speakers have no problem understanding to mean freedom not price). Free software is tied to the rights computer users need. The open source movement offers a misunderstood term (which remains misunderstood around the world), and which is tied to watered-down rights primarily aimed at benefitting businesses.
FLAC remains the easy choice primarily because it is free software. It might not compress best (but it compresses better than Shorten), but it works well enough and its inherent freedom offers a compelling case for long-term archiving.
Digital Citizen
There's just no alternative.
It's free. It's cross-platform. It's under active development and maintenance. It's technically sound - seeking, metadata, sane encoder/decoder applications. It's supported by at least one player manufacturer (rio). It's much smaller than uncompressed audio.
There really is no alternative; FLAC is the shit.
L
I drink 10 dollar wine too and you know what, there are a lot of good wines out there between 10 and 20 bucks. I am sure a wine snob would say different and I have had some very nice more expensive bottles of wine (mmmm Lewis Ethan). But frankly it is nicer to have a decent bottle of wine regularly than an expensive one occasionally. I think the same thing applies to music, it is nicer to have more variety then a small quantity.
I haven't seen any flash/SC stereos, but I know there are a couple of them that have a USB port. Haven't actually tried them, though.
Good luck.
"Good news, everyone!"
Well, one of the reasons why I have restarted a couple of times is that in The Beginning I would just rip 'em as they were; later, I would use CDDB to insert useful info; still later I started to use CDDB/FreeDB purely as a template, editing the info to ensure consistency and correctness. Then I decided to alter my "consistency default"...
Seems to me that once you've gotten the data off the disc, altering the data info in a structured, batchy way is nigh-on impossible.
Compared to choosing an audio format, it's at least as difficult to choose a "media library manager" that's smart about that additional info, instead of just a player that thinks of music as individual files.
I've found SnackAmp to be useful but (not very pretty), and JuK) to be prettier but not as useful. Comments?
"Good news, everyone!"
then http://www.dbpoweramp.com/ is what you want. rip to lossless FLAC with this or any other tool, and store on a big, cheap-ass IDE disk.
then use dbpoweramp to batch-convert (maintaining folder structure etc) to format of your choice for playback on whatever device you're using.
the advantage of this is that you rip once, and then batchconvert periodically overnight - so when you're using a small capacity MP3 player you can use 128 MP3s, and when you get an ipod you can rip to higher bit rates. all you need is a spare bit of IDE storage for your temporary lossy data.
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]
I've been ripping to MP3 since my Amiga days. ;)
You must be a die-hard amiga zealot. MP3 came up long after the amiga was gone.
Now what are good tools to encode large libraries of FLAC files. For windows, for linux?
JVC Arsenal KD-AR960, KD-AR5500, KD-AR7500 all claim to support SD cards.
The answer to this is simple. It has nothing to do with what is proprietry, what is open source etc. Pick APE, Wavpack, Flac, ALAC, Optifrog, whatever as long as it is lossless. Why? Simple. Say you pick Wavpack (which rocks) and then find that you are going to switch to another OS that may not support it. You simply reencode it to Flac. You later find that Wavpack suddenly gets portable support. You simply reencode back into Wavpack. All at no loss as they are lossless. And without having to rerip from CDs. Besides, it's good to exercise your CPU from time to time anyway!
In short, I do it myself. I have downloaded Shorten files (and, if possible, their WAV equivalents so I don't have to run the non-free shorten program) and then recompressed the uncompressed data with FLAC. archive.org carries a lot of Shorten files you can use for testing.
Every time I test this, I see that FLAC compresses more tightly than Shorten. But I'm told there are other lossless audio compressors out there that do a better job than FLAC. I've seen the results of some of them, but I don't know where to point you to to test this except to try making your own tests and compare file sizes and compression/decompression times.
It's not difficult to write a shell script to do this for you.
Digital Citizen
Much of your post is flamebait, but I'll note that Stallman has nothing to do with the open source movement. He has taken time to explain the differences between the movements. Stallman started the GNU Project to make the freedoms of free software real, and the rights free software confers upon the user are infectious--one can easily see how sharing and modifying software is critical to preserving freedom of speech, critical for restoring competition in the marketplace, and democratizing software development.
As for trying to use a license to prevent Nike from running a program because you object to their labor practices, you desire the kind of power over licensees that the Hacktivismo Enhanced-Source Software License Agreement tries to leverage. The FSF has explained why this license is a non-free license.
Unlike you writing and selling Harry Potter books (which, actually, I wouldn't object to you doing but given your writing sample here, I doubt you could match what fans of that series are used to reading), I need my computer to express myself politically in the way I choose to do and I use a computer to cooperate with other people in the way people in ethical societies should do. This includes distributing software for a fee, if I choose. Distribution is key to spreading copies of programs that help people, or spreading copies of improved programs. Distributing copies of a program for a fee is a great way to justify writing more free software. To maintain that I shouldn't be able to do these things is to advocate for a power we don't grant readers of books or other published works--I can buy and sell copies of other copyrighted works by leveraging my rights under the first sale doctrine. Ultimately, free software sets a better standard against which we can compare other software and see if the rights we have with free software are also granted to us. I'm not willing to give up these rights, so I place them high on my priority list when evaluating a program.
Digital Citizen