Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Best Practices for a Lossless Music Archive?

Cliff posted more than 7 years ago | from the we'll-all-have-terabyte-RAID-arrays-in-5-years-anyway dept.

Music 176

Sparagmei asks: "I'm a big music fan, and I like listening to the music I own on various pieces of digital gear. Right now, my library's at about 20,000 tracks, ripped from CDs to MP3 at 256kbps (enough that I can't tell the difference on my low-end playback gear). However, with the MP3 judgement rippling through the world, I'm interested in perhaps moving to a different compression standard. Before I do that, I'd like to ask a question: what lossless format would you recommend for making a digital 'master library' that could be (relatively) easily down-sampled to a compressed format?"

Important factors would be true losslessness, filesize (smaller than PCM WAV would be nice), embedded metadata (ID3v2-like), existence of automated ripper software, and (to a lesser extent) an open-source implementation of such software. Widespread playback implementation of the lossless codec is not an issue for me; the lossless library would likely be burned to archival DVD media and stored after being down-sampling with the chosen compressor. The reason I ask is this: I've got a 20,000-track re-ripping job ahead of me. I'd like to do that just once, lossless, so that years from now, when I decide to jump from Vorbis to 'komprezzor_2039_1337' or whatever, I don't need to drag out the old plastic discs. Thanks!"

cancel ×

176 comments

Sorry! There are no comments related to the filter you selected.

FLAC. (5, Informative)

Whiney Mac Fanboy (963289) | more than 7 years ago | (#18384885)

The Free Lossless Audio Codec [sourceforge.net] sounds perfect for you.

(all answers below are quoted from wikipedia's FLAC [wikipedia.org] page).

Important factors would be true losslessness,

A digital recording (such as a CD) encoded to FLAC maintains the quality of the audio perfectly.

filesize (smaller than PCM WAV would be nice),

Audio sources encoded to FLAC are typically reduced in size 40 to 50 percent.

embedded metadata (ID3v2-like),

with support for tagging, cover art and fast seeking.

existence of automated ripper software,

Yup, lots [wikipedia.org] .

and (to a lesser extent) an open-source implementation of such software.

See above.

Widespread playback implementation of the lossless codec is not an issue for me

Well, bad luck, you're going to get it anyway :-) Both hardware [wikipedia.org] and software [wikipedia.org] support.

Also, consider SHN [wikipedia.org] , (although it seems superceded). I'll also mentiuon wave pack [wikipedia.org] - because it uses an interesting approach (splitting the file into a small lossy standalone & a lost bits diff). don't bother with Apple's lossless format [wikipedia.org] - it's going nowhere.

Re:FLAC. (5, Interesting)

Anonymous Coward | more than 7 years ago | (#18385261)

I've built this kind of system for the record company i work for and our digital distribution needs.
I've used FLAC - it just works. Also I like the Application Metadata blocks you can put into the FLAC files. I use this to store the full logging information from cdparanoia. It allows me to perform a quality analysis of the rip and look for jitter, skips etc. If i find a certain pattern which leads to audible artifacts I can just go back through the archive of tracks and perform an automated analysis of anything else which mught show the same problem.

Because of the amount of metadata which we need to store for business reasons (P&C, ISRC, barcodes, etc) I have developed an XML based format for entering the info - you wouldn't need this on a personal system I don't suppose.

For work it's great because I can encode to AAC/MP3/WMA for retailers. At home i use it to export to Ogg because we have an iAudio player, but it's trivial to export to MP3 or AAC instead if we got another device.

I store all the files in a flat system - each track has a unique ID generated when it was ripped - when I export out to the encoded versions I use the tags to create a Artist/Album/Track hierachy which again can be changed at at time fairly trivially.

Periodically rsync the exports out to my gf's machine and i've got the collection whenever I want it :)

Re:FLAC. (1)

NayDizz (821461) | more than 7 years ago | (#18385331)

Nuff said. Next question.

Re:FLAC. (3, Interesting)

19thNervousBreakdown (768619) | more than 7 years ago | (#18385437)

Just one thing... FLAC does not compress to 40-50%. More like 60(rare)-70-80%. That being said, no lossless codec does better than 60% occasionally. There's no point chasing a couple percent, even when we're talking about hundreds of gigs, because if you're archiving this how much would it suck if you went to recover this years from now, Windows XP and Vista was no longer available, Monkey's Audio went out of business in 2008 and never made a Vista version, which is the last "audio path" that's compatible with Windows '84. IOW, you're fucked.

What do I do?

  1. Rip twice fully with highest CDParanoia settings and drive offset corrected. Use a high-end drive like Plextor that doesn't allow unreported errors.
  2. Compare rips, with diff. One bit difference, and it's discarded.
  3. Same procedure with cdrdao to get the TOC. Don't rip with cdrdao, you need to edit the code to get highest paranoia settings and support drive offset. Did that once, couldn't apply my patch to the new version automatically, screw it, use both.
  4. Convert TOC to CUE to add to the FLAC.
  5. Encode to flac, embed the CUE (just in case, we still keep both TOC & CUE).

Actually, I started splitting my flacs with SHNsplit and putting in Vorbis tags, but if you're going to archive and never play the list is the way to go.

Re:FLAC. (0)

Anonymous Coward | more than 7 years ago | (#18385813)

Just a note. "Reduced in size to 40-50%" is different from "reduced in size by 40-50%". The OP said the former. You interpreted it and responded as if he said the latter.

Re:FLAC. (0)

Anonymous Coward | more than 7 years ago | (#18385939)

Oops. Reverse the 'former' and 'latter' in that statement. :-/

Re:FLAC. (1)

zippthorne (748122) | more than 7 years ago | (#18386465)

Indeed. However we should get out of the habit of referring to the "reduced by" metric. It makes sense if the reduction is small (say, the file size is 50-75% of the original). But when the reduction is great, it loses its usefulness.

There is a huge difference in the number of files you can store if you reduce by 99% vs. 99.99%, but at first glance, it looks like they're almost the same.

It would be better to say reduce by a factor of 100 and factor of 10,000 respectively or reduce to one hundredth and one ten-thousandth respectively. With the "reduce to" preferred as it is less ambiguous.

Pioneer PD-F1009 (0)

Anonymous Coward | more than 7 years ago | (#18385675)

Pioneer PD-F1009 [pioneerelectronics.com]

Or something similar should do the trick. I recall seeing a 500 disk model from one of the home audio manufacturers once.

It will save you the job of ripping all those tracks and keep your material safe, clean and organised ready for play whenever you like.

Re:Pioneer PD-F1009 (2, Insightful)

KevinKnSC (744603) | more than 7 years ago | (#18386081)

I have an old 400 disc CD changer from Sony, and as cool as the thing was at the time, I haven't used it to listen to music in years. When you can store that much music completely uncompressed on a $150 hard drive, it just doesn't really make sense anymore.

Not to mention how you can't take it with you, like you can with an MP3 player, etc.

Re:FLAC. (3, Informative)

WilliamTS99 (942590) | more than 7 years ago | (#18386059)

I also recommend FLAC, that is what I am ripping all of my CDs to. When you can get a 500gig HDD for under $140,it is worth every cent and more to do what you are doing. I have an Ubuntu [ubuntu.com] system set up for network storage so I can play my FLACs with my two Cowon iAudio [cowonamerica.com] (Highly Recommended) portable media players(support FLAC natively), streamed to my stereo through the Xbox media center( XBMC [wikipedia.org] , streamed to my computer, my daughters computer, or transcoded for other players. In my opinion FLAC is 100% the way to go.

Re:FLAC. (1)

ShaneThePain (929627) | more than 7 years ago | (#18386767)

I use Apple Lossless, its not a very good codec, but it serves its purpose. Rockbox wont work on my 5.5 gen iPod so I have to use the regular firmware. ALAC is my only real choice.

Re:FLAC. (1, Interesting)

Anonymous Coward | more than 7 years ago | (#18387279)

I've faced a similar problem deciding on how to make backups of my own CDs. I used FLAC because I wanted lossless audio. It wasn't until I realized I was doing way too much work. Why bother encoding it to anything when I can just rip the entire disc directly to ISO and leave it at that? I have found this to be the simplest solution by far. I can back up several ISOs onto a single DVD or just leave them on the HD (space is so cheap nowadays). If I need to burn a 1:1 copy of the original CD there's no need to take out the original because I already have the ISO available. Need to encode some tracks to mp3, ogg, or into some other format? Just mount the ISO and rip like a normal CD. The only drawbacks to using ISO is that it does take up more space than FLAC, but as I've said, space is cheap; you also don't have the convenience of metadata, but just make a text file with track info for each ISO or simply look on the back of your CD to see what's playing. There's no simpler way, you can count on ISO to work flawlessly on any OS and you'll never have to worry about re-ripping your entire collection if some better codec or improvements to FLAC comes along.

Me too (2, Interesting)

Overzeetop (214511) | more than 7 years ago | (#18384915)

I made the mistake of ripping my small collection to MP3 (some to MP3pro...please stop laughing) the first time. I made it about 1/2 way though the 300 or so CDs I have before I realized that I wan't happy with the format (could hear artifacts) and knew I wanted a lossless that I could transcode to the format du jour.

I went with FLAC, and ripped 'em all. I'm using media monkey as a filing system, and am transcoding as necessary for portable apps. I'm without media server at the moment, so I can't help with streaming and such, though I'm going to be interested to see what others are doing.

At the risk of asking a stupid question (4, Insightful)

Dogtanian (588974) | more than 7 years ago | (#18384947)

Bearing in mind that you're not going to save that much file size using lossless storage, and that you already have an "archive" of CDs in a box in your basement (or wherever), is it really worth the hassle of creating another lossless copy that'll take up even more space?

If you're planning on re-converting from these lossless copies, it sounds like you're going to be doing a *lot* of work based on some second-guessing of where you'll be in 5 years time; and things may have changed then.

Re:At the risk of asking a stupid question (4, Insightful)

MMC Monster (602931) | more than 7 years ago | (#18385003)

Well, a cabinet of CDs in the basement may just convert to a few drives in a storage area network. Network storage is getting cheaper every moment. Besides, he will have random access to his entire music collection (presumably well tagged) in lossless format, which really can't be beat.

Re:At the risk of asking a stupid question (1)

ZorbaTHut (126196) | more than 7 years ago | (#18385049)

Personally I convert to lossless for my own personal collection, and transcode when sending off to friends. If I had a portable music player I'd transcode for that also. However, it's far more convenient to keep lossless versions on my hard drive than have to dig out and re-rip three hundred CDs every time I want the music in another format.

(Yes, it takes time, but generally that's just "copy all the .flacs somewhere and then start a script to bulk-convert, come back in a day.")

Re:At the risk of asking a stupid question (4, Funny)

vakuona (788200) | more than 7 years ago | (#18385641)

This is the RIAA maths department calling.

We have done the math for you. (We will charge you for this service)

You have ripped 300 CDs and you admit sending music to friends. Well, 300 CDs at about 12 tracks per CD to on average 5 friends means you now owe us well, 5 * 300 * 12 * $0.99 so this comes up to $17,820.

For the hard math, we will charge you $1,000.

Please make out your check to RIAA-R-US.

Thank you for your cooperation.

RIAA

Re:At the risk of asking a stupid question (1)

Overzeetop (214511) | more than 7 years ago | (#18385313)

Not much size = 50%. That may not be much to you, but it's still a reasonable amount. Heck, you could buy enough HD space for the raw waves, encode the discs, and use the extra space for fault tolerance (i.e. two or more drives in raid).

It's not about the space or size, though, but the convenience. Having 1000+CDs is not convenient (presumptive for his 20k tracks), and if you decide to switch formats (for whatever reason) you have to go through a lenghty manual process to re-rip everything. With foobar, you can take that collection - or any subset - and do a custom recode. It may take a day or two, but its totally automated.

I'd rather do all the work now, and then never have to fool with it again.

BTW - I have converted to FLAC, and when I got an iPod for my wife I recoded all her stuff to ~160kb audio so it would all fit (only 8GB space on a nano). Simple. I even have a ~224 version of my collection on an old laptop drive in an enclosure that I take to work with me. MediaMonkey will even auto-transcode during a sync operation, so when I add a new FLAC disc, it will auto-sync to my portable drive. Haven't tried force-syncing into my wife's folder on the network...not sure if I could do it, or how iTunes would deal with that.

As for FLAC vs others, the codec is asymetric, so the decode takes significantly less time than the encode - which is good if you're transcoding. (It's also good for portables that support it because the load is low, but that's not much of a big deal for the consumer).

Re:At the risk of asking a stupid question (2, Insightful)

Dogtanian (588974) | more than 7 years ago | (#18385415)

Not much size = 50%. That may not be much to you, but it's still a reasonable amount.
Yes, but from that point-of-view alone, you're still having to do a lot of work to get it. And it's not 50%; it's 150%, unless he's binning his original CDs.

With foobar, you can take that collection - or any subset - and do a custom recode. It may take a day or two, but its totally automated.
I dunno; it kind of smacks of the geek tendency to spend a day automating a procedure that would otherwise take 15 minutes or so, and then using it 3 or 4 times before they decide they want things done differently and abandoning it. Can't beat that logic ;-) Maybe I'm wrong, of course, but I'm just getting that vibe; I know, because I've sometimes done it myself.

Re:At the risk of asking a stupid question (1)

Overzeetop (214511) | more than 7 years ago | (#18385483)

When I ripped, I used EAC which basically ripped and encoded each track as it went, so the effective space was only 50% of the raw data.

I'm with you on the automation flaw. Sometimes we do it because we can. It's been good for me though, and the formats seem to really be improving rapidly. There really are 48kb codecs that sound okay now on most music - not all, and not perfect, but good enough for my car. I like the flexibility of the online storage, and it has come in handy a couple of times already.

Re:At the risk of asking a stupid question (0)

Anonymous Coward | more than 7 years ago | (#18385991)

one note: CDs scratch. I have several possibly irreplaceable small label disks that have small data layer scratches, I believe in part due to budget pressing. If only I had FLACs

Re:At the risk of asking a stupid question (1)

Dogtanian (588974) | more than 7 years ago | (#18386425)

one note: CDs scratch. I have several possibly irreplaceable small label disks that have small data layer scratches, I believe in part due to budget pressing. If only I had FLACs
I assume you mean that the upper side has become damaged? If the scratch is on the underside it's normally fixable. Also note that you can rip the raw CD data using (e.g.) cdparanoia; but you have a good point- it hadn't occurred to me because AFAIK all of my CDs are easily replacable and I can't recall ever having one go bad.

FLAC (-1, Redundant)

Anonymous Coward | more than 7 years ago | (#18384981)

'nuf said [sourceforge.net] . (It's really the only conceivable choice. Supremely well specified (thus being the only lossless open codec which has hardware support), and gives between 30-70% compression, depending on type of music.)

Re:FLAC (3, Informative)

Anonymous Coward | more than 7 years ago | (#18385101)

Oh, and see the comparison [sourceforge.net] .

Ape (2, Interesting)

mobby_6kl (668092) | more than 7 years ago | (#18384993)

Since FLAC was already mentioned, I'll just suggest you try Monkey's Audio [monkeysaudio.com] . It's lossless, usually compresses better than FLAC, the source is available (not sure what license though), supports tags, and basically does everything you want. It's probably not as widespread as FLAC, but that shouldn't be a problem in your case.

Re:Ape (4, Informative)

TeknoHog (164938) | more than 7 years ago | (#18385105)

Ape compresses a few % better than Flac at the expense of much more CPU usage. When compressing lots of CDs at once, the difference is significant. Flac was designed to be light on resources to facilitate portable devices, but it helps with modern computers as well.

Also, Ape is not free software, despite the availability of source for certain versions. It's only officially released for Windows.

So, in line with most others, I'd recommend Flac, but you might also look into WavPack as it also seems to be free software.

Re:Ape (1)

omeomi (675045) | more than 7 years ago | (#18385303)

Also, Ape is not free software, despite the availability of source for certain versions. It's only officially released for Windows.

To clarify, Monkey's Audio is a free (as in money) application. Why some people refuse to call free software "free" unless it's FOSS continues to escape my understanding...If you mean FOSS, why not just say "FOSS".

Re:Ape (1)

Southpaw018 (793465) | more than 7 years ago | (#18385391)

It's a language problem. English makes no distinction between gratis, free as in money, and libre, free as in speech. The words are the same, but the meaning is different. In this case, the grandparent was noting that Ape is not free as in speech. They weren't stating one way or the other whether it is free as in beer.

Re:Ape (2, Insightful)

omeomi (675045) | more than 7 years ago | (#18386479)

The grandparent said it wasn't "free". He didn't specify which "free" he was talking about. Since it is "free" under at least one definition of the word free, his statement is incorrect. While one who knows a bit about FOSS could assume that they meant free as in speech, they didn't explicitly *say* that. And since the majority of the population means "free as in beer" when they're talking about whether software is free, people who insist on claiming that software isn't free if it's not free as in speech are only making a conversation more confusing in ways that have no bearing on the main point as a whole.

Re:Ape (1)

Your Pal Dave (33229) | more than 7 years ago | (#18386637)

What I want to know is where everybody's getting all this free beer!

Re:Ape (0)

Anonymous Coward | more than 7 years ago | (#18385417)

To clarify, Monkey's Audio is a free (as in money) application. Why some people refuse to call free software "free" unless it's FOSS continues to escape my understanding...If you mean FOSS, why not just say "FOSS".

Monkey's Audio is not free software, it is proprietary software available at zero price.

Re:Ape (1, Offtopic)

kilonad (157396) | more than 7 years ago | (#18385459)

Monkey's Audio is free software, but it does not have free source code. You are able to legally download and use it at no cost, which means that it fits the English language definition of the word free. Quit trying to redefine the word free.

Re:Ape (0)

Anonymous Coward | more than 7 years ago | (#18385583)

> Quit trying to redefine the word free.

We should just leave that to you? Free doesn't exclusively mean without monetary cost. [princeton.edu] Monkeys audio is not free software, [wikipedia.org] call it "freeware" [wikipedia.org] if you like.

But ignore the semantics, no right thinking soul would trust archival storage to a proprietary codec with ambiguous licensing terms.

Re:Ape (1)

omeomi (675045) | more than 7 years ago | (#18386551)

Free doesn't exclusively mean without monetary cost.

And it doesn't exclusively mean without restriction either. Saying something isn't free, but not specifying under which definition of free, is at best, just confusing.

Re:Ape (1)

omeomi (675045) | more than 7 years ago | (#18386501)

Monkey's Audio is not free software, it is proprietary software available at zero price.

Monkey's Audio is free software under at least one definition of the word free. The FSF can't just redefine or limit definitions of free.

Re:Ape (1)

CastrTroy (595695) | more than 7 years ago | (#18387529)

That's why I wish they would just drop the use of the word free, and go with "open". It's much less confusing this way. The word free gets used for a lot of "free" software, that isn't open, so I don't know why they continue to push the usage of this word.

Re:Ape (0)

Anonymous Coward | more than 7 years ago | (#18386411)

> Why some people refuse to call free software "free" unless it's FOSS continues to escape my understanding...If you mean FOSS, why not just say "FOSS".

Because "FOSS" means "Free or Open-Source Software," and that includes software for which source is available but doesn't meet the FSF's definition of "free software." Of course, FSF use the word "free" to mean "free of restriction," not "free of charge."

OSS is more inclusive and includes free software, but that means some software can be "FOSS" while not being "free software."

Re:Ape (1)

AdamInParadise (257888) | more than 7 years ago | (#18385525)

I second that. Ape is a bitch to work with compared with FLAC. There is no official spec, no official Linux version... Furthermore, unlike FLAC, Ape is probably not patent-free. This means that many players support FLAC, while none support APE. The only nice thing about Ape is that since it is lossless, you can convert it back to PCM WAV and reencode in FLAC without any loss in quality. Nuff' said.

So rght now FLAC is the way to go for lossless archives. And if a better codec comes round, you can always reconvert everything to this new format.

Re: Best Practices for a Lossless Music Archive? (0)

Anonymous Coward | more than 7 years ago | (#18385015)

Using a torrent client which has RSS support.

Next question?

As everyone's said, use FLAC. (2, Insightful)

eddy (18759) | more than 7 years ago | (#18385035)

FLAC doesn't compress the absolute best of the alternatives, but it's 'good enough' and is widely supported, even directly on some portable devices. You won't wake up one day to find out that FLAC support has all but disappeared because the original developer lost interest (since the source is out there, unlike many alternatives). You will also be able to trivially transcode FLAC to Vorbis with meta-data intact, and do it FAST. (not a unique property, but well supported with FLAC/oggenc2 [nifty.com] ).

Hydrogen Audio (3, Informative)

eddy (18759) | more than 7 years ago | (#18385073)

Forgot to mention that you'll probably want to go to hydrogenaudio [hydrogenaudio.org] instead of /. for these sorts of questions.

media type (1)

polar red (215081) | more than 7 years ago | (#18385061)

I suggest you back on a Hard disk; It's about the same price per Gigabyte, smaller, and i guess easier to maintain; Last but not least : it's more durable.

My advice (4, Funny)

adam1101 (805240) | more than 7 years ago | (#18385063)

Don't use FLAK or some other monkey sound formats. Go with a real standard, like Windows Lossless, or
Apple Lossless, they just sound sooo much better. But you do need high end Bose equipment and gold
plated Monster cables to really bring out the warmer and fuller mid-range and the increased bass response.

Mod parent troll (-1, Troll)

jetxee (940811) | more than 7 years ago | (#18385163)

Mod parent TROLL. Lossless formats == 100% of information preserved == they sound the same. Anything else is choice and flexibility of tools. And openness/stardartization of the format.

Re:Mod parent troll (1)

Anonymous Coward | more than 7 years ago | (#18385217)

Parent was being sarcastic, was it lost on you?

Re:Mod parent troll (5, Funny)

Anonymous Coward | more than 7 years ago | (#18385227)

He couldn't see the sarcasm because his monitor isn't using monster cables.

Re:My advice (0)

samwire (138557) | more than 7 years ago | (#18385233)

Don't use FLAK or some other monkey sound formats. Go with a real standard, like Windows Lossless, or Apple Lossless, they just sound sooo much better.
eh? You do understand what lossless means, right? What nonsense.

One other thing to bear in mind, is that CDs often contain more audio data than just what is marked as a track in the table of contents. Some of which can turn out to be hidden tracks:

http://en.wikipedia.org/wiki/Hidden_track [wikipedia.org]

You will miss these, if you just rip the individual tracks. For a complete archive of everything that a CD contains, you probably want to use something like abcde (command-line front-end CD archiving tool) to get cdparanoia to rip the entire audio stream off the CD, then store it as FLAC with an embedded cue sheet containing the original table of contents and CDDB disc-id ... You can also embed cover graphics as well.

This process is the only sensible way to ensure you've archived absolutely everything off the CD. That said, support for playing direct from FLACs with embedded cue sheets isn't as widespread as general FLAC support, so it's best to transcode to a more portable format for actually playing ...

As someone else already mentioned, the hydrogenaudio forums are the best place for this sort of discussion.

Sam.

Re:My advice (0)

Southpaw018 (793465) | more than 7 years ago | (#18385251)

Yes, because permanently locking down your entire media collection with a proprietary codec stored in a proprietary format is exactly where everyone should go.

Dude, I'm a Windows sysadmin, I like Windows and use it exclusively, I have no in depth Nix knowledge (though I can get around okay), and even I know .wma isn't the way to go.

My suggestion is FLAC, as many have noted here.

Re:My advice - use PKZIP for DOS (4, Funny)

Anonymous Coward | more than 7 years ago | (#18385343)

Yes, I agree with the parent. Use those most excellent formats for storing your music or else use PKZIP for MS-DOS and then copy the ZIP file to a IOMEGA ZIP drive for safekeeping

Let me just say...Woooooosh! (2, Informative)

Overzeetop (214511) | more than 7 years ago | (#18385359)

Everybody sit down. Did you see the line about Monster cables and Bose?

Parent was trying to be funny. He wasn't, but don't go off the deep end.

Overrated is more appropriate, though Troll probably will be the choice of the Mac fanbois for the Apple Lossless dig he included.

Re:My advice (1)

DavidTC (10147) | more than 7 years ago | (#18385505)

You should just transfer your collection to vinyl if you Care About Music(TM). Although that's kinda hard.

And Apple Lossless sounds so much better than Windows Lossless, you're obviously a troll. And you've forgotten to mention that they should sit on their own hard drive, because putting them on a hard drive used for other things will result in the audio files getting dirty.

Re:My advice (0)

Anonymous Coward | more than 7 years ago | (#18385885)

D00d, forget those other formats... true audiophiles store everything in uncompressed WAV files. There are tons of compression artifacts when these other lossless kodiaks are decompressed. It's because the processor on your computer needs to work harder to do the decompression. It's not perceptible on low-end speakers, but the machine's hum actually goes up several pitches when under load. This affects the audio quality perceptibly.

 

Re:My advice (1)

Dragoon235 (1051296) | more than 7 years ago | (#18386169)

BOSE = Blatently Overpriced Speaker Enclosure.

But you do need high end Bose equipment and gold plated Monster cables to really bring out the warmer and fuller mid-range and the increased bass response.
Translation: You have to spend the most money possible because obviously, the most expensive thing has to be the best.

itunes and apple lossless (0)

Anonymous Coward | more than 7 years ago | (#18385085)

I had a similar problem - a huge library of CD's ripped to lossy mp3, which I decided to re-encode. I used iTunes and Apple lossless (ALAC), for iTune's excellent interface, search and catalog facilities and to access CDDB data. I can play the files on my iPod and the codec is widely supported (by either Quicktime or libavcodec on Linux) on the desktop through iTunes and Mplayer or VLC. For archival, simply copy the iTunes database file (or the xml copy) and the individual files to DVD to preserve the files and other data. Most files are in the region of 50% of size of an uncompressed file which is comparable to other lossless codecs (and impossible to exceed for truly random data).

Hardware based FLAC players? (1)

httpamphibio.us (579491) | more than 7 years ago | (#18385201)

Sorry to jump on somebody elses post... but can anyone speak to the quality of hardware based devices that can rip CDs straight to FLAC format such as the products offered by olive.us?

Most hardware devices I've seen either a) can't rip, b) can't convert to FLAC, c) can't burn CDs from FLAC, or d) are just wireless devices to send the audio back to your computer's crappy speakers.

Anyone know of any other great sounding devices that rip, convert, and burn?

Re:Hardware based FLAC players? (2, Insightful)

DavidTC (10147) | more than 7 years ago | (#18385521)

Anyone know of any other great sounding devices that rip, convert, and burn?

Dozens of manufacturers have a device that can do that. I believe they're called 'computers'.

True Crypt? (-1, Offtopic)

Anonymous Coward | more than 7 years ago | (#18385267)

'Nuff said. Posting anonymously for obvious reasons :P

The best practice (0)

Anonymous Coward | more than 7 years ago | (#18385301)

Don't lose it. No matter what Eminem may tell you.

Backups (1)

dour power (764750) | more than 7 years ago | (#18385339)

The last word in lossless archiving...

Best lossless archive? (0)

Anonymous Coward | more than 7 years ago | (#18385341)

My suggestion is to rip each CD to a bin/cue type format (with toc) and then burn your archives onto some fairly cheap optical media. I suggest CD-R. Then, if you ever need to restore the files, just insert the discs and use some ripping software to extract the data again. As an added bonus, your archival copies will play in a wide range of audio equipment. Glad I could be of assistance.

FLAC works for me (1)

turgid (580780) | more than 7 years ago | (#18385363)

I've been ripping all my CDs using cdparanoia and encoding with FLAC. I keep two copies of all the FLAC'd suff on separate hard disks, and verey year or two, when I buy new hard disks, I migrate the data to the new disks in case the old ones fail.

There's no point in burning to DVD for "archival" since DVD is too unreliable. Anecdotally, DVDs seem to last only a few months to a year or two. Perhaps good quality tape archival would be good if you need the security? But really, hard disks are so cheap nowadays, it's feasible to have many PeeCees with new, high-qulaity disks in your house and to have multiple copies of the data.

Through the magic of bash scripting, I can produce ogg/vorbis and mp3s of all my music whenever I like. My old Athlon XP 2000+ used to do this really quickly. I haven't tried it on my new box yet.

Re:FLAC works for me (1)

Sandman1971 (516283) | more than 7 years ago | (#18385531)

A couple of suggestions. Instead of copying to 2 separate harddrives and replacing the HD every year or 2, I would suggest a mirrored RAID instead. You only need to replace a drive once it fails, with very little chance of both drives failing. That said, if its very important to you to keep these files, you should either burn them to archival DVD or portable HD and keep them offsite (IE: at your office, your parents' house). You never know when you might lose your PC to a fire, theft, flooding, rare chance of both drives failing, etc...

Re:FLAC works for me (1)

turgid (580780) | more than 7 years ago | (#18385673)

I don't do RAID at home since it's too complicated and ropey on Linux(*). The advantage of it being on non-raided separate drives is that they can be spun down when not in use, they can be different sizes and different manufacturers. They can even be on different interfaces i.e. IDE, SCSI and SATA.

* I say that as a Linux fanboi since 1995. I do Linux RAID at work :-( I like to upgrade my kernels at home quite frequently. There is no guaranteeing that a RAID from one kernel version will work on the next. This, folks, is the wonder of the Linux development model.

I'd rather have two different hard disks in two separate machines than a Linux RAID on the sort of hardware that I can afford.

Re:FLAC works for me (1)

turgid (580780) | more than 7 years ago | (#18385705)

Actually, maybe I'm being a bit harsh on the Linux RAID stuff. Some of our machines at work have months of uptime.

The thing is, I haven't got the time or money to do RAID on Linux at home.

WTF? (OT) (1)

metamatic (202216) | more than 7 years ago | (#18385857)

I do RAID on Linux all the time, and I've never had problems with kernel versions causing incompatibility, or system flakiness. What kind of RAID are you using?

Re:WTF? (OT) (1)

turgid (580780) | more than 7 years ago | (#18386911)

Sorry, I work for a dreadful company and it's causing me much bitterness. Please, pay no attention to my rantings.

Re:FLAC works for me (0)

Anonymous Coward | more than 7 years ago | (#18385941)

DVD unreliable? Say what? I've got hundreds of DVD+R's and DVD-R discs. Had 'em for years. Not a single one has gone bad so far.

I'd trust DVD over tape any day of the week. Tape is way too touchy. You have to keep it at a consistent temperature and consistent humidity or you're looking at data loss.

Re:FLAC works for me (1)

TeknoHog (164938) | more than 7 years ago | (#18386135)

There's no point in burning to DVD for "archival" since DVD is too unreliable. Anecdotally, DVDs seem to last only a few months to a year or two. Perhaps good quality tape archival would be good if you need the security? But really, hard disks are so cheap nowadays, it's feasible to have many PeeCees with new, high-qulaity disks in your house and to have multiple copies of the data.

I've been archiving music on DVDs for a couple of years, and just this week I decided to get an external hard drive instead. I figured the price per GB is almost equal; in Finland there's the 'tax' on blank DVDs, but not (yet) on hard drives.

Of course, a hard drive is more versatile and portable. My only worry so far has been that a broken DVD is much less of a loss than a broken HD.

There's only one choice... (1)

evilviper (135110) | more than 7 years ago | (#18385433)

In my opinion, there is no other choice for lossless audio compression than FLAC. Since it was BSD licensed a couple years ago, it has been rapidly taking over the world.

It appears to have overtaken all other lossless formats in popularity online, in a short time.

It is the only one seeing significant adoption in multiple brand of hardware (MP3) players.

I'd say it has a brighter future than Vorbis, even though it is at a several year disadvantage.

I've found that just about every audio program I use, has silently added FLAC decoding support while nobody was looking.

With all of it's positive attributes, and support, FLAC is well on its way to becoming ubiquitous, and actually replacing WAV/AU/RIFF/AIFF/etc. files as the standard lossless storage and interchange audio format.

flac (1)

jroesner (200756) | more than 7 years ago | (#18385479)

I use flac because my Squeezebox supports it. So does XMMS. So does Winamp. Nero and Roxio support burning audio CDs from it (with appropriate version/plugin).

I'd been down the mp3/Ogg Vorbos road but found myself transcoding from one lossy format to another which had to stop. With flac I have the lossless copy to transcode from. I rip on Windows using dBPowerAmp and with AccurateRip I feel that when it says it's accurate, it is. I've seen people start to rate dBPowerAmp as good or better than Exact Audio Copy.

My wife has an iPod and I finally have her ripping to Apple Lossless. I figure Apple Lossless is better than lossy AAC, even if it is proprietary.

Re:flac (0)

Anonymous Coward | more than 7 years ago | (#18386139)

The thing about dbPowerAmp is that the free version does not do the "secure ripping" for which the software is so revered. The real question is, how well does the FREE version of dbPowerAmp rip compared to EAC?

For your iPod (1)

bigfleet (121233) | more than 7 years ago | (#18385509)

Check out Flac2MP3 [robinbowes.com] which I'm using to generate a metadata-complete MP3 image of my FLAC files. Whenever I add a couple of new albums to my archives, I run a shell script and the MP3's are available for my iPod. Album covers from Amarok don't transfer over, but it's a plenty good system for me.

You've already lost, you just don't know it (2, Insightful)

Gothmolly (148874) | more than 7 years ago | (#18385517)

Use of the term "best practices" indicates that you've already assumed that whatever you're doing is wrong, and that whatever someone else tells you to do is right.
"Best practices" is to IT what the "zero tolerance" concept is to schools - no questioning, no thought required, simply doing whatever the current meme dictates.

Re:You've already lost, you just don't know it (1, Insightful)

Anonymous Coward | more than 7 years ago | (#18386021)

Gosh, I hope you don't brush your teeth twice a day simply because "best practice" would indicate that it would be wise for you to do. For those of us that don't have time to rederive everything under the sun/re-invent the wheel constantly, "best practices" provide a noticeable improvement in either efficiency or quality of output, while requiring a significantly smaller investment in time than rederiving the optimal solution. Sure, I had a grand time re-deriving some of the integral tables in the back of my calc books, but that's because I was interested in doing so. I DON'T have any interest in tracing circuit diagrams and computing SNR to see which audio setup is the best for my computer. I leave it to someone who really cares.

what's the point? (2, Insightful)

coaxial (28297) | more than 7 years ago | (#18385611)

Seriously. What's the point? What are you trying to accomplish? You can't hear the difference at 256kps lossy versus lossless, so why waste you're life converting your already lossess music archive from CD form to harddrive form? It's not like you're going to be transcoding all that often, if at all. I encoded my entire CD collect 7 years ago as 320kbps constant MP3. I'm thinking about re-encoding it, because there's no point in having the files that big. 256kbps variable mp3 is would probably still be more than enough. And if you think that someday you can transcode to something higher than 320kbps, I doubt you'll be able to tell the difference if that ever happens, because your hearing naturally gets worse over time.

Futhermore, if you think Alcatel-Lucent v Microsoft is going to change anything, you're delusional. MP3 is going to stay. Just like how LZW patent did nothing to GIF. No one is going to abandon MP3, because the public isn't going to buy a device that can't play their MP3 collection. Nothing will change, and FLAC and Ogg will remain forever an asterisk.

Re:what's the point? (2, Insightful)

Ant P. (974313) | more than 7 years ago | (#18385829)

You can't hear the difference at 256kps lossy versus lossless, so why waste you're life converting your already lossess music archive from CD form to harddrive form


Maybe because at some point he'd like to upgrade from the low-end gear he said made the difference inaudible? Even on $30 headphones the difference between MP3 and lossless is clear as day.
Or maybe because he wants a backup copy to rebuild from in case the CDs get scratched? Not everyone has an audio CD collection made entirely of titanium and diamond discs.

Re:what's the point? (1)

/dev/trash (182850) | more than 7 years ago | (#18387713)

Really?

Re:what's the point? (0, Offtopic)

tomaasz (5800) | more than 7 years ago | (#18386125)

Indeed, the only meaninful use for an archive of losslessly compressed (or uncompressed) music is for reselling it. Otherwise it's a waste of disk space, waste of time converting them AGAIN if you want to give someone with an iPod a copy and a waste of time even thinking about it.
If you want this archive for your listening pleasure only, go with VBR MP3s. They will usually have an average bitrate of around 200kbps so you can fit many times more on a single harddrive.

Re:what's the point? (0)

Anonymous Coward | more than 7 years ago | (#18386205)

it's because he's one of those fags who cries and moans about patents and such. he knows it's never going to cause him any troubles but he just wants to grandstand and act like he's all techo-conscious. it's crap like this that makes me sick.

Re:what's the point? (2, Insightful)

tmasssey (546878) | more than 7 years ago | (#18386295)

Seriously. What's the point? What are you trying to accomplish? You can't hear the difference at 256kps lossy versus lossless, so why waste you're life converting your already lossess music archive from CD form to harddrive form?

There are so many thing wrong with this statement...

1) Hearing artifacts at 256kbps. I will agree that even with decent speakers you may not be able to hear them. But with good gear, it's *noticable*. I used to have a pair of B&W DM602-S3 speakers as my mains and MP3's were fine. Then I upgraded to the 704's. All of a sudden I had to throw away my entire collection of MP3's: the artifacts just slapped you in the head.

2) Why have your media on hard drive? Why *not* have your media on hard drive? And if you're going to go through the work of ripping them, why not rip them *once* (to a lossless format) and be done with it? To save a few gig of hard drive space? Let's assume 1,000 CD's. Is that enough? An audio CD holds Seeing as a 400GB hard drive is going to cost less than $200 ($400 if you mirror them), what is the point of "saving space"? Especially when you figure that those 1,000 albums cost probably $10,000 - $20,000? And what did your time cost to rip 1,000 albums? At $5/hour and 10 minutes per album, you spent over $800 just to do the ripping! So why in the world would you want to do it *twice*, just so you can save a little bit of storage?

Of course, there's also the very real possibility that IHBT... :)

Re:what's the point? (1)

Overzeetop (214511) | more than 7 years ago | (#18386629)

$1 or $1.50 is about right. I think squeezebox will do it for you for about that price.

What's worse than his comment about high bitrate MP3s is that he's planning on transcoding from lossy to lossy. The artifacts get multiplied each time. Disclaimer: I can't tell the difference with MDR-V6 cans or my e3cs (both are decent, though neither are made with snake oil) above ~200kb, and have been stumped by less than 96kb on certain content with advanced mp4 encoding.

*shrug* As I've said - rip to FLAC, transcode to whatever you want.

Re:what's the point? (0)

Anonymous Coward | more than 7 years ago | (#18386847)

Storage is cheap. My computer plays FLAC. In fact, using Linux, a FLAC encoder is much more common than an MP3 encoder because of patent restrictions. Squeezebox streams FLAC to my high end audio equipment. My iAudio x5 portable player decodes FLAC natively. Or I can install Rockbox firmware on an iPod, iRiver, iAudio, or Archos portable which will support FLAC. FLAC is much less likely to introduce audio artifacts. There are a whole bunch of car audio solutions that support FLAC that I'm not fully versed on because I haven't gone there yet. If you're so hard up on a particular format, FLAC can be transcoded to any other format any number of times relatively quickly with no quality loss using a small batch script. Why not use FLAC?

I know I don't have a reason not to. If you do then don't fucking use it.

Re:what's the point? (1)

Dragoon235 (1051296) | more than 7 years ago | (#18387497)

You can't hear the difference at 256kps lossy versus lossless, so why waste you're life converting your already lossess music archive from CD form to harddrive form?

I agree, for certain styles of music: rock, metal, jazz, anything loud with a simple sound.

But, you, my friend, have never listened to classical, or opera in lossy format. It stands out like a sore thumb. The crystal sound that comes from many instruments (especially strings and any moderately high/low tones), including voice, becomes what I like to call, "pixelated", and filled with artifacts.

Conversion question (1)

astrashe (7452) | more than 7 years ago | (#18385799)

Is there any linux software that will convert flacs to mp3s and preserve the tags?

Re:Conversion question (2, Informative)

mahonri5 (708013) | more than 7 years ago | (#18386407)

Oggify [freshmeat.net] was designed to handle flac to mp3 or ogg conversion in bulk, while preserving the tags. I've been happy with it (not that I'm biased or anything), and so have a number of other people. It's open source, free, and in Perl.
You should try it.

Re:Conversion question (1)

astrashe (7452) | more than 7 years ago | (#18386595)

I will definitely try it -- thanks a lot, that's really helpful.

Judgement? (1)

Threni (635302) | more than 7 years ago | (#18385859)

Dunno what judgement you're on about mate, but MP3 is free for personal use.

I'd use FLAC - 20,000 tracks isn't really all that much, and storage is only going to get cheaper. Pulling numbers out of my arse gives me 300 meg or so per CD using FLAC, so assuming you've got 10 tracks per CD that's 600 gigs. That'll fit on a couple of hard disks for £150 or so (UKP), although you might want to back up your stuff onto DVD also. Or you might want to find a backup medium which has some chance of being readable in a few years. Assuming you actually bought the CDs the data came from you might be better off hanging onto them and just having the FLAC files on your hard drive. You can play them as-is using VLC or probably get plug ins for Winamp if you like bloat and non-standard interfaces.

EAC & Hydrogen Audio Forums (1)

yoth (862235) | more than 7 years ago | (#18385865)

You should really look at http://www.hydrogeaudio.org/ [hydrogeaudio.org] to answer tons of questions. I personally am using EAC with a React add-in that allows me to rip to FLAC and AAC at the same time. Tags and organizes in folders all at the same time. The nice thing about EAC (or Exact Audio Copy) is that you know you are getting an excellent rip without listening through your hundreds or thousands of tracks for quality control.

wav? (1)

VoiceOfRaisin (554019) | more than 7 years ago | (#18385871)

ive always wondered why people dont just use drive/folder compression and keep them as raw wav files? no special codecs needed. no converting. its just there in its original form, and im sure the compressed size must be similar? anyone do this?

Re:wav? (1)

pipatron (966506) | more than 7 years ago | (#18386057)

No, because lossless compressing of audio, video, executables and text files require different compression algorithms if you want a decent compression ratio.

FLAC, but consider ALAC (1)

HeelToe (615905) | more than 7 years ago | (#18385879)

I'm using flac for our entire library. However, I'm at the point of seriously considering a switch to ALAC. I use some custom scripts for ripping the tracks on OS X, tagging them with audiotag (http://www.tempestgames.com/ryan/), and then some mirroring scripts that check filestamps and output a mirror of a selected portion of the flac tree in a lossy format.

I'm possibly switching to ALAC because iTunes will play it back natively, and I can use it under FrontRow in a Mac OS X media center frontend. The only reason I haven't switched is because I'm currently combining aacgain and the open source alac decoder to create alacgain. Once I've tested that iTunes actually obeys gain tags on ALAC, I'll move ahead with development.

Lossless? (1)

cpct0 (558171) | more than 7 years ago | (#18385949)

I will go with the flow and say Flac is the most used open source format for lossless. However I will digress from the flow and say most MP3 players don't support Flac. Since the widely used iPod is really here to stay, I have to say Apple Lossless is a good solution. No the compression is not as good, but it's more convenient, like it or not. And the compression not being as good doesn't mean there's a difference in output quality, it's lossless or it's not? :) So the super file format for losslessness should be on what is convenient to you, not what takes more or less room. If your players support lossless in Flac, then go ahead. Just pick what you want.

After having ripped most of my collection in Lossless, I however can safely say one grow tired of it. Some materials, you want in lossless, but I do not think it's practical to have everything in lossless. I got a lot of ripped CDs and a lot of ripped vinyls. I start by doing them in lossless, I archive them 10-15 CDs in one DVD in lossless (no not in the best Flac compression, something that compresses quickly please, as long as it's smaller than raw), then I switch the heck out to some other format (Mp4 vbr 128+) for me, Ogg if you want to go other ways, again what suits your particular players)

To rip CDs, please no normalization. Please. No volume change whatsoever, no "post-processing" of any sorts. Once you convert from lossless to your other format, you can then decide to apply some or not, at your leisure. But I see little point in using lossless format to change the volume of your tracks. And please use some software that correctly checks your rip. Exact Audio Copy for Windows is a good choice, and say you are not afraid of waiting. If there were errors, clean up your CD then try again. If your CD doesn't support basic functionality to properly rip with your software, consider buying a new CD player that supports everything. The worst thing I couldn't hate more are clicks and ticks (or worse, garbage fits).

For Vinyls, I clean up the vinyl as best as I can with demineralized water and cotton cloth, then I record it at its proper speed (or else you will not get the same frequency response) at -6db peak volume, make it go through a de-popper (very lightly, more you remove, worst it sounds), make it go through a de-noise algorithm (using the ending groove for my 500ms sample of noise, as it's usually quite clean, again very lightly, like a -3db reduction, or else it makes everything sounds electronic), I remove the DC (there's one with your equipment unless it's gigantically pro), remove 50Hz frequencies at -6db (depending on the frequency response of your cartridge and equipment, my Grado limits at 50Hz) and maximize the volume with a different volume for every side of the vinyl (as every side is engraved differently at usually different volumes), just enough to get some limiting on maximum a peak per 2 minutes.

I guess that basically covers my processes and what I would do (and don't do) for a collection.

Re:Lossless? (0)

Anonymous Coward | more than 7 years ago | (#18386309)

iPods have support for FLAC via rockbox firmware. I do agree that normalizing or altering the gain defeats the purpose of ripping to a lossless format. Conversely it's required for portables, they usually lack the gain for albums with RMS down at -18db (early CDs) and compression artifacts sound (W: sarcasm) better when the dynamic range is completely removed and everything has been normaled to 0db.

Re:Lossless? (1)

Fweeky (41046) | more than 7 years ago | (#18386687)

Of course if you're using Rockbox, you can just use ReplayGain, which is supported by pretty much any format imaginable. Nicer than either normalizing the raw data or constantly reaching for the volume control. Of course, Apple have something like this too, though as always they decided to forgo the whole "use an established standard" thing and do their own inferior version which only they support.

Re:Lossless? (0)

Anonymous Coward | more than 7 years ago | (#18386429)

To rip CDs, please no normalization. Please. No volume change whatsoever, no "post-processing" of any sorts.

Thank you. I'm glad somebody mentioned this. Something that bugs the hell out of me is people that normalize each track from an album during ripping. Nearly all CDs are mastered to be one cohesive unit. Some tracks are supposed to be quieter than others. Normalizing each track removes that unity. If any normalizing is done at all, it should be the same across the whole album.

Re:Lossless? (1)

cpct0 (558171) | more than 7 years ago | (#18387001)

Amen :)

Some of my friends haven't understood that. I go to their homes, listen to a mixed tracks CD and the volume is all out of the place. Also what I hate about normalization is a single event near clipping (like a badly ripped CD - see my previous rant in parent) will make ONE track sound very thin and everything else horribly loud.

Anyways, like I said, one can have fun with volume AFTER they have safely secured their original version on a DVD.

CD is already lossy (1)

ljw1004 (764174) | more than 7 years ago | (#18386195)

CD is already lossy. It truncates the audio to just 44khz 8bit stereo.

Re:CD is already lossy (0)

Anonymous Coward | more than 7 years ago | (#18386505)

16bit.

Disk Image (1)

amper (33785) | more than 7 years ago | (#18386869)

I'm not sure if this is the best thing to do, but I decided to just make disk images of my CD's, and store them on an external HDD. Then I use iTunes to rip them to 192Kbps AAC format for my iPods. I figured out that I could fit about 400 CDs, more or less, along with the ripped files, on a 250GB drive.

The disk image files themselves are made with Roxio Toast in Digidesign's Sound Designer II format. Yes, it's proprietary software and a proprietary format, but the likelihood that this format will be readable for a long time to come is high. And if it isn't, I can always remount the images and convert to another format.

I'm pretty sure that when I originally started doing this, I tried it with Apple Disk Utility, and had unsatisfactory results (though of course, I can't remember why).

I think it's important to get an image of the CDs as they actually shipped. If someone an suggest a more open method of doing the same thing, I'd appreciate it. The only reason I'm doing it this way is because it was easy for me to get started. I got to about 150 or so CDs, starting with my newest albums, before I realized that most of the rest of the older stuff I didn't care so much about, anyway. My CD collection isn't very large as it is, so I'm not especially worried.

I don't ditch the CDs. I do this so they can be stored and I don't have to handle them so they won't get damaged. Now if only I could do this as easily with DVDs!

Anal Retentive MP3 (1)

notanatheist (581086) | more than 7 years ago | (#18387159)

FLAC should be your first choice but if you go mp3 I prefer LAME using VBR @ 'q 0'. Average bitrate on my library is between 240 and 280Kbps. Playing through my Squeezeboxes on any system from low to high I can NOT tell a difference. I have even tested a variety of interconnects including making my own. Of course you still need to downsample for most portable. Decoding high bitrate VBR files will suck your battery dry.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>