PDA

View Full Version : Lossy vs lossless formats - total newbie question



Dan Goodinson
2005-11-08, 05:53
I've not researched this _at all_ and I'm sure I could find the answers
on Google within a few mins. But just wanted to get some opinions from
some audiophiles...

I've always used MP3, and on my cheap-ass stereo it sounds fine.
Personally, I actually thought MP3 was fine so long as you went for a
higher quality (e.g. 320kbps vs 92kbps - I normally use 160 due as a
trade-off between filesize and quality). But I only just realised from
reading the mailing list that FLAC is superior to MP3.

So FLAC is lossless? And MP3 is lossy? Can you encode to FLAC with
different levels of quality in the same way as with MP3? (e.g. will a
320kbps MP3 be better than a low quality FLAC, or doesn't it work like
that?)

I've never used FLAC before, but wondering if I should start re-ripping
my music collection... Clearly it wouldn't make a difference right now
but it would benefit me once I get round to getting a proper stereo
system...

Cheers!
Dan.

ChrisB
2005-11-08, 06:25
Yes, FLAC is lossless - so no option of different levels. It's also
produces files that are a lot larger than even the highest quality MP3.
So it _would_ make a difference, to the size of your library.

Chris

-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Dan
Goodinson
Sent: 08 November 2005 12:54
To: Discuss (AT) lists (DOT) slimdevices.com
Subject: [slim] Lossy vs lossless formats - total newbie question

I've not researched this _at all_ and I'm sure I could find the answers
on Google within a few mins. But just wanted to get some opinions from
some audiophiles...

I've always used MP3, and on my cheap-ass stereo it sounds fine.
Personally, I actually thought MP3 was fine so long as you went for a
higher quality (e.g. 320kbps vs 92kbps - I normally use 160 due as a
trade-off between filesize and quality). But I only just realised from
reading the mailing list that FLAC is superior to MP3.

So FLAC is lossless? And MP3 is lossy? Can you encode to FLAC with
different levels of quality in the same way as with MP3? (e.g. will a
320kbps MP3 be better than a low quality FLAC, or doesn't it work like
that?)

I've never used FLAC before, but wondering if I should start re-ripping
my music collection... Clearly it wouldn't make a difference right now
but it would benefit me once I get round to getting a proper stereo
system...

Cheers!
Dan.

mflint
2005-11-08, 06:29
I've not researched this _at all_ and I'm sure I could find the answers
on Google within a few mins. But just wanted to get some opinions from
some audiophiles...

I've always used MP3, and on my cheap-ass stereo it sounds fine.
Personally, I actually thought MP3 was fine so long as you went for a
higher quality (e.g. 320kbps vs 92kbps - I normally use 160 due as a
trade-off between filesize and quality). But I only just realised from
reading the mailing list that FLAC is superior to MP3.

So FLAC is lossless?
Yep.

And MP3 is lossy?
Yep.

Can you encode to FLAC with
different levels of quality in the same way as with MP3? (e.g. will a
320kbps MP3 be better than a low quality FLAC, or doesn't it work like
that?)
Kinda. You can enforce different levels of compression, reducing filesize, but compressing the data will take more processor power. The format remains lossless, though, whatever the compression setting. (The processing power needed to /decompress/ FLACs is independent of the compression level used)

I've never used FLAC before, but wondering if I should start re-ripping
my music collection... Clearly it wouldn't make a difference right now but it would benefit me once I get round to getting a proper stereo system...
It's up to you.

The big win with FLAC is that you can rip once to flac, then convert those FLAC files to MP3 or OGG or whatever the lossy-format-du-jour is. Then, when you buy a new Digital Audio Player in ten years' time, you can convert the FLACs to whatever whizzy new audio format it uses... without having to rip from CD again.

mherger
2005-11-08, 06:37
> I've not researched this _at all_ and I'm sure I could find the answers
> on Google within a few mins. But just wanted to get some opinions from
> some audiophiles...

There's even an audiophiles list, if you want to meet the cracks ;-)

> So FLAC is lossless? And MP3 is lossy? Can you encode to FLAC with
> different levels of quality in the same way as with MP3? (e.g. will a
> 320kbps MP3 be better than a low quality FLAC, or doesn't it work like
> that?)

Now, lossless means lossless. Always the same quality as no information is
lost. There are different compression parameters but they don't influence
quality, only time vs. filesize.

--

Michael

-----------------------------------------------------------
Help translate SlimServer by using the
SlimString Translation Helper (http://www.herger.net/slim/)

Dan Goodinson
2005-11-08, 07:00
Cool. Thanks everyone. It's a bit of a daunting task to re-rip all my
CDs, but certainly the most interesting thing is that once I've ripped
them to FLAC, I shouldn't need to rip them again.

In fact, I kind of thought that was what would happen with MP3s. I've
already ripped around 95% of my CDs, and a large percentage of them are
now in the attic in boxes. Sigh :(

If higher compression rates require extra processing power, I should be
set for that. We've got several PCs in the house, but one in particular
is still a pretty good spec (even though it's now a year old). I think
it's time I bought the boxes of CDs down from the attic, bought a few
new hard disks, and started ripping to FLAC ;)

Another quick question though...

I've spent ages (literally _years_) getting my MP3 tags correct. It's
an on-going project, and I chip away at them every once in a while -
still a lot of work to do. How does tagging work with FLAC? Is it
possible to "map" the ID3 tags from MP3s into equivalent tags in FLAC
format? In an ideal world, there'd be a utility I could use to point at
my MP3 library (less than 5000 MP3s) and it would work out what tags I
wanted for FLAC files and do all the work for me. That would be kind of
ideal. What are my chances?

(Does FLAC actually have "tags" as such, BTW??)

Jim
2005-11-08, 07:24
If higher compression rates require extra processing power, I should be
set for that.
The problem is your specs...how long can you stay awake, changing CD's etc... to feed FLAC! It doesn't take that long encoding. If you're going to rip with FLAC then you may as well go the whole way and use EAC to rip them, which can take a while...


We've got several PCs in the house, but one in particular
is still a pretty good spec (even though it's now a year old).

Any PC as long as the CD Drive is good would be worthwhile to use in combination with others for ripping.



(Does FLAC actually have "tags" as such, BTW??)
Does Amazon have books :D

FLAC's tagging system is another reason why it's so great. You can call your tags absolutely what you want, have as many of them as you want per file, and put whatever lenght of data you want in them.

Though I'd recommend using ARTIST/ALBUM etc as SlimServer won't like it.

Fifer
2005-11-08, 07:27
In fact, I kind of thought that was what would happen with MP3s. I've already ripped around 95% of my CDs, and a large percentage of them are now in the attic in boxes. Sigh :(
At least you can be sure that, as long as your ripping process is robust, this will be the last time as you will have all the data that's available from your source. There is no more to get.

If higher compression rates require extra processing power, I should be set for that. We've got several PCs in the house, but one in particular is still a pretty good spec (even though it's now a year old). I think it's time I bought the boxes of CDs down from the attic, bought a few new hard disks, and started ripping to FLAC ;)
The trade off with MP3 is file size vs. quality. With FLAC it's file size vs. decoding processing power required. Bear in mind that this processing power matters more at playing time (which you do often) than ripping/coding time (which you do once). Also, the range of file sizes isn't great (the biggest isn't a lot bigger than the smallest for the same song) and finally, you may not be decoding on your PC. For example, the Squeezebox decodes FLAC natively, as do other digital players. They might not all have the processing power of the original ripping PC.

Does FLAC actually have "tags" as such, BTW??)

Yes, FLAC supports tags just like MP3. I'll let someone else answer the question about transferring your edited tags over to the FLAC versions. It's a very good question ...

Jim
2005-11-08, 08:02
I'll let someone else answer the question about transferring your edited tags over to the FLAC versions. It's a very good question ...
Ooops. Missed that bit, sorry !!! Good question indeed and not very easy.

The way I would do it is as follows..... (if you needed further help I'd be willing to help with the command-line stuff in further detail).

Edit: First clean up your MP3 folders....make sure the only files in there are MP3's, anything else has been deleted or somethig such as coverart is somewhere else (you can even clone the folder tree again for stuff like this - see below).
Ensure your multi-disc album MP3's are temporarily at least in different folders.


Map my artist/album folders to be exactly the same for the MP3 and FLAC root folders, e.g.

C:\MP3
\Beatles
\Help!

C:\FLAC
\Beatles
\Help!

I obviously wouldn't do this manually, so luckily if your using Windows you can simply do XCOPY /T /E C:\MP3 D:\FLAC which will copy the directory structure.

Then I'd do a full dirlist of my MP3 folder just as a backup so I knew what things were called and knew where I started at.

Then I would use the program MP3Tag to extract a report of all of my MP3's tags into a CSV file. Call this Original.csv and do not touch it.

I would then do a batch rename of every single MP3 file removing everything but the track number, so it would be something like 01.mp3, 02.mp3, 03.mp3 etc... (you did say they were tagged!). MP3Tag can do this renaming automatically. Then make another CSV extract with MP3Tag, this is the file you will be editing to setup the FLACs.

It would be a manual process for each disc loading it in anyway, and I'd recommend ripping as WAV to encode later. All you'd have to do is remember to save it to the specific artist/album folder in the FLAC folder tree. You would set it up so that the filename was just the track number, e.g. 01.wav

Encode all the .wavs into FLAC ignoring tags to avoid confusion.

So you'd end up with these files:
C:\MP3\Beatles\Help!\01.mp3
C:\MP3\Beatles\Help!\02.mp3

C:\FLAC\Beatles\Help!\01.flac
C:\FLAC\Beatles\Help!\02.flac

Go into your CSV file, find and replace all occurences of ".mp3" with ".flac" and all occurences of \MP3\ with \FLAC\. Reimport the taglist back into MP3Tag and it should process all of the FLAC files with the tags from the original MP3's.

I'd certainly recommend printing off a list of all your albums and using a tickbox system to say "Extracted"...."Encoded To Flac"....."Tags Imported"..."Checked" so you know where you are at, maybe it would be best to do the conversion each time you change artist as you must rmemeber WAV files are big so you couldn't do it all at once. Once you'd done an artist, have a quick check to make sure the number of MP3's matched the number of FLAC's...listen to one in each album (thus checking the tags)...then you may as well delete all his MP3's.



There's probably a few other methods you could use, but the one above is failsafe as long as you don't make any mistakes!

You could use a program like MusicMatch to make some sort of audio-analysis code of your MP3's. You would have to rely on the equivelent FLAC having the same code, which probably wouldn't happen. Your tags wouldn't be trusted, so you'd end up having to check everything.

You could work out some code to go through every single MP3 and calculate the exact size in samples (not seconds) of each MP3, ignore leading/trailing silence. This is because leading silence/trailing silence would be unreliable against your FLAC/EAC properly ripped music. Equivelent analysis is performed of the FLAC files ignoring size of the leading/trailing silence. In theory would work, but you're a bit screwed if it doesn't !! Need to know how reliable original MP3 encoder was and perform a bit of pre-testing.

Actually just thought of another idea !!! Do the above but calculate number of seconds for the whole album. That should definitely match them up.

Dan Goodinson
2005-11-08, 08:18
Excellent stuff - thanks for the help.

In fact, I'm already part way there if I follow a process like the one
you suggest... I already have a backup of my tag data in CSV format.
And since my library is comparatively small (less than 5000 MP3s) it
only occupies around 30GB: I've got a couple of portable bays and so
could (in theory) just place them onto a single disk and stash it safely
away in the attic with the CDs (or whatever).

My MP3s are currently named using convention <artist> - <title>. So my
library is like this:

D:\Music\Underworld 1992-2002 (Disc 2)\
Underworld - 8 Ball.mp3
Underworld - Born Slippy Nuxx.mp3
Underworld - Cowgirl.mp3
Underworld - Jumbo.mp3
Underworld - Moaner.mp3
(etc)

I use mp3tagtools or mp3tag so could batch rename them to include the
track number. Then I could use the method you detail to transfer the
tags from MP3 to FLAC.

Looks like it's time to buy some more hardware to accommodate these new
files...

Thanks everyone for the help: much appreciated ;)

Point taken, also, about the processing time vs. listening time (e.g. a
one-off hit for during encoding vs. benefits every time I listen to it).
The only think I need to do now is get a new stereo and some new
speakers :) I'd better start writing my Christmas list for my
girlfriend :) :)

mrfantasy
2005-11-08, 08:20
First, I'll engage in a little heresy and say if all your MP3s are > 192Kbps, and you never plan on transcoding (even to lower bitrate MP3) then you'll probably not notice moving to FLAC unless you have a decent stereo and are particularly sensitive to such things. If you have an SB2/SB3 it's simple to rip your favorite album to FLAC and do some A/B comparison (best if you can make it double blind!)

I went with FLAC from the "Rip once, done forever" standpoint. I have almost 1000 CDs taking up about 320GB of drive space. I ripped them on a 266 MHz PowerPC-based Kuro Box (basically a Buffalo LinkStation) and it took about 2 months doing 15 CDs a day. I had automated the entire process so I could just pop the CD in and pop in the next when it ejected without typing and doing anything (caveat--I have several (less than 50) CDs I have to redo because freedb was down or they weren't in Freedb and came up as unknown. I logged enough to be able to figure out where they were, since I store my CDs alphabetically and ripped them in order.)

I think you'll find that the server CPU isn't as critical for FLAC as for MP3, and that your limiting factor, as said before, will be the amount of time you can sit around popping CDs in and out of a drive. I tried getting our robotic CD duplicator at work to autorip but the APIs to program it weren't readily available.

I blogged about my experiences at http://chairthrower.org/blog/.

Jim
2005-11-08, 08:29
One more point.

Remember to use EAC, people might say it's overkill but this is a 1 time thing.

Now I wish I had done this next thing.....

Even if they are OK, keep a copy somewhere of all cue sheets/log files EAC generates - you'll never know when these might be handy.

mflint
2005-11-08, 08:31
Bear in mind that this processing power matters more at playing time (which you do often) than ripping/coding time (which you do once).
... which is why FLAC was designed to be expensive (processor-wise) when compressing data, but cheap when decompressing. The designers (rightly) assumed that compression is generally performed by a more powerful machine than the one doing the decompression.

Dan Goodinson
2005-11-08, 09:10
Thanks again, all.

And @Jim: I currently use EAC to rip to MP3, so it's no major hassle to
use this to rip to FLAC instead. In fact, I didn't know that I could
rip to FLAC with EAC, but will investigate further :)

Dan.

-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of mflint
Sent: 08 November 2005 15:32
To: discuss (AT) lists (DOT) slimdevices.com
Subject: [slim] Re: Lossy vs lossless formats - total newbie question



Fifer Wrote:
> Bear in mind that this processing power matters more at playing time
> (which you do often) than ripping/coding time (which you do once).
.... which is why FLAC was designed to be expensive (processor-wise) when
compressing data, but cheap when decompressing. The designers
(rightly) assumed that compression is generally performed by a more
powerful machine than the one doing the decompression.


--
mflint
------------------------------------------------------------------------
mflint's Profile: http://forums.slimdevices.com/member.php?userid=2102
View this thread: http://forums.slimdevices.com/showthread.php?t=17998

street_samurai
2005-11-08, 15:23
First, I'll engage in a little heresy and say if all your MP3s are > 192Kbps, and you never plan on transcoding (even to lower bitrate MP3) then you'll probably not notice moving to FLAC unless you have a decent stereo and are particularly sensitive to such things. If you have an SB2/SB3 it's simple to rip your favorite album to FLAC and do some A/B comparison (best if you can make it double blind!)

Personally, if I was in your position (having ripped to MP3 my whole collection and re-tagged everything) then I'd seriously considier doing some listening tests to make sure all the work of re-ripping is worth it. Several blind tests have found that Lame MP3s with an alt.preset setting can not be differentiated from the original (or FLAC). If it doesn't sound better to you then its not worth it. A decent stereo probably less to do with it than how good your ears are... and clearly thats a personal choice.

Having said that, I also use FLAC as I don't want to rip my CDs ever again... and space is cheap.

For future reference (especially if ripping straight to Mp3), you're better off editing your tags in EAC before you rip. Then if you need to re-rip again in the future, EAC will remember the updated tags for that CD.

ss.

pfarrell
2005-11-08, 15:34
On Tue, 2005-11-08 at 14:23 -0800, street_samurai wrote:
> mrfantasy Wrote:
> > First, I'll engage in a little heresy and say if all your MP3s are >
> > 192Kbps, and you never plan on transcoding (even to lower bitrate MP3)
> > then you'll probably not notice moving to FLAC unless you have a decent
> > stereo and are particularly sensitive to such things. If you have an
> > SB2/SB3 it's simple to rip your favorite album to FLAC and do some A/B
> > comparison (best if you can make it double blind!)
>
> Personally, if I was in your position (having ripped to MP3 my whole
> collection and re-tagged everything) then I'd seriously considier doing
> some listening tests to make sure all the work of re-ripping is worth
> it.

True, proposing anything other than FLAC is a sin.
And I ripped my whole collection into flac from the beginning.

But if I had done it once in high quality MP3, I would
think long and hard about redoing some groups of CDs
(i.e. genres where sound quality is not all that important),
just to avoid handling all the blasted CDs again.

For me, a lot of pop/rock doesn't really need it.
but my jazz and classical does. Someone else might
have exactly the opposite view.


--
Pat
http://www.pfarrell.com/music/slimserver/slimsoftware.html

Dan Goodinson
2005-11-09, 03:54
street_samurai Wrote:

"Personally, if I was in your position (having ripped to MP3 my whole
collection and re-tagged everything) then I'd seriously considier doing
some listening tests to make sure all the work of re-ripping is worth
it. Several blind tests have found that Lame MP3s with an alt.preset
setting can not be differentiated from the original (or FLAC). If it
doesn't sound better to you then its not worth it. A decent stereo
probably less to do with it than how good your ears are... and clearly
thats a personal choice.

Having said that, I also use FLAC as I don't want to rip my CDs ever
again... and space is cheap.

For future reference (especially if ripping straight to Mp3), you're
better off editing your tags in EAC before you rip. Then if you need to
re-rip again in the future, EAC will remember the updated tags for that
CD."

>>

When I first started ripping my collection, I was using the Creative
software that came with my soundcard. It was Creative PlayCentre, or
something. I got through well over half my CDs with this software
before being shown the light, and then using EAC. Editing tags was, of
course, possible with PlayCentre just as it is with EAC. But at the
same time a great many tags got through the net with both PlayCentre and
EAC. The main problem, I guess, is that I wasn't organised before I
started. So where a lot of music was tagged as "General Alternative" or
whatever, I hadn't thought of a decent system to categorise things in
the first place. Added to the fact that I've rebuilt my PC at least
once (possibly twice) since I began the ripping process and so EAC or
PlayCentre "memory" will probably be lost...

The major problem now is to try and rationalise all the genre tags. All
other tags are fine - I sometimes spot the odd error which I can easily
fix, but I would love to be able to heavily rely on genre tags. As an
example, I've got various Coldplay albums and also lots of different
Coldplay tracks from compilation albums. Currently Coldplay are
categorised in a number of different genres (Alternative, Pop, General
Alternative, Indie etc etc). It's a real pain to try and get everything
consistent.

Anyway. Thanks for the idea about the listening test. That's well
worth doing, so I'll give it a go before I re-rip anything...

radish
2005-11-09, 07:06
street_samurai Wrote:
The major problem now is to try and rationalise all the genre tags. All
other tags are fine - I sometimes spot the odd error which I can easily
fix, but I would love to be able to heavily rely on genre tags. As an
example, I've got various Coldplay albums and also lots of different
Coldplay tracks from compilation albums. Currently Coldplay are
categorised in a number of different genres (Alternative, Pop, General
Alternative, Indie etc etc). It's a real pain to try and get everything
consistent.

That kind of thing is actually pretty easy with the right tag editor. I use J River and it works great for normalizing names, artists etc.

Dan Goodinson
2005-11-09, 07:22
radish Wrote:

That kind of thing is actually pretty easy with the right tag editor. I
use J River and it works great for normalizing names, artists etc.

>>

Thanks radish - I'll have a look at J River :)

Fifer
2005-11-09, 07:29
The advice to listen before re-ripping is fair enough if you intend to stick with MP3. I don't think your MP3 files would be an adequate base for transcoding to another format from however. That said, you can wait till the need to transcode arises (if ever) and re-rip then.

jmpage2
2005-11-09, 11:07
The biggest advantage of switching to FLAC over MP3 would be the introduction of gapless (no silence) between tracks, which MP3 does not support natively (hardware can work around this to an extent).

The difference in audio quality between FLAC and a well encoded MP3 file (done using LAME VBR presets) is actually quite minimal, even on quality systems. Folks that would notice the most would be those that listen at high volumes in dedicated listening mode or with high end gear (really good headphones, etc).

While I <CAN> hear the difference between the two, I could not reliably pick between them at normal listening volumes.

street_samurai
2005-11-09, 12:09
When I first started ripping my collection, I was using the Creative
software that came with my soundcard.


I would definitely consider doing a listening test between the EAC and Creative rips also (perhaps rip the same CD that was ripped by Creative with EAC (I assume you're using Lame with EAC)) and see if you can hear a difference. I have no idea what Creative uses to create its MP3s but I'll bet its not that great of an MP3 encoder.

My suggestion for re-genring your collection is to re-organize your directory structure by Genre (ie. make a diretory for Jazz and put all your Jazz albums in it). Once you've got that done, then it should be simple with (say) Mp3Tag to add genres to all your stuff. Then, if you don't like the genre directories, put it all back the way you want.

Just a thought,

ss.

LavaJoe
2005-11-09, 14:49
I am a recent convert as well, and I am starting to re-rip my CDs (I had not yet ripped my entire collection anyway) in FLAC. It's nice at least knowing they are stored lossless.

As for the compression setting, don't worry too much. Think of it this way: you could always run a script over your collection later (handy also if FLAC compression is improved) that would re-compress all the music. Since it's lossless, there'd be no problem with doing this as many times as you like! I just use the default (-5), which is fast (and I tested -8, and that didn't shrink the file much).

For your tags, I saw some good suggestions here for Windows. I use Linux, and I have written several Python and bash scripts to deal with fixing tags, etc. (for example, one converts my iTunes .m4a files to FLAC, preserving the tags). What I would do is once you get a parallel directory structure with FLACs and MP3s, write a script (I'd use Python) to extract the tags from the corresponding MP3 file and set the tags on the FLAC file.

Remember that with FLAC, you need to remove the particular tag first (I use --remove-tag=<tag_name> --set-tag=<tag_name>=<value>), or setting it will make a duplicate tag with a the new value (and better not to have old invalid tags in the file). Let me know if you want some example code that will extract or set MP3 or FLAC tags using Python.

-Joe



Cool. Thanks everyone. It's a bit of a daunting task to re-rip all my
CDs, but certainly the most interesting thing is that once I've ripped
them to FLAC, I shouldn't need to rip them again.

In fact, I kind of thought that was what would happen with MP3s. I've
already ripped around 95% of my CDs, and a large percentage of them are
now in the attic in boxes. Sigh :(

If higher compression rates require extra processing power, I should be
set for that. We've got several PCs in the house, but one in particular
is still a pretty good spec (even though it's now a year old). I think
it's time I bought the boxes of CDs down from the attic, bought a few
new hard disks, and started ripping to FLAC ;)

Another quick question though...

I've spent ages (literally _years_) getting my MP3 tags correct. It's
an on-going project, and I chip away at them every once in a while -
still a lot of work to do. How does tagging work with FLAC? Is it
possible to "map" the ID3 tags from MP3s into equivalent tags in FLAC
format? In an ideal world, there'd be a utility I could use to point at
my MP3 library (less than 5000 MP3s) and it would work out what tags I
wanted for FLAC files and do all the work for me. That would be kind of
ideal. What are my chances?

(Does FLAC actually have "tags" as such, BTW??)