IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
Is FLAC really lossless? / Do compression settings make a difference?, [Was “Question Regarding Conversion of WAV/AIFF to FLAC”—TOS#6—Ask it]
xdesirex22
post Apr 20 2012, 00:41
Post #1





Group: Members
Posts: 25
Joined: 20-April 12
Member No.: 99005



Hello everyone, i have recently started converting all of my WAV/AIFF files to FLAC to save space, as i have read from various sources that FLAC is indeed true lossless. I am using XLD on Mac, with the settings seen here in this image:


XLD by tstirling7, on Flickr

Will these settings yield a true lossless conversion? I need to confirm because at some point i am going to be deleting my WAV/AIFF files, and i want to be completely sure that i am not making a mistake when i do this. I was listening to both the AIFF and FLAC of a track today, and i could've sworn the AIFF sounded a little bit louder and punchier, but i can be a bit paranoid (for lack of a better word) at times about things like this so i could've been hearing things.

Also, i have a second question. I read on a forum somewhere that audio conversion programs aren't perfect so with each conversion comes a small (possibly inaudible) loss in quality. This made sense to me. but my question is, How much does this loss in quality really matter? Is this even true with a program like XLD? thank you for your time.
Go to the top of the page
+Quote Post
RobertoDomenico
post Apr 20 2012, 01:07
Post #2





Group: Members
Posts: 87
Joined: 16-November 11
Member No.: 95208



If comparing AIFF and FLAC you must perform a ABX test otherwise you're falling to the placebo effect. Unless something went wrong with the conversion there is no way you'll be able to hear any different between lossless formats.

Your settings are fine. Your FLAC files will be perfect conversions.

This post has been edited by RobertoDomenico: Apr 20 2012, 01:28
Go to the top of the page
+Quote Post
xdesirex22
post Apr 20 2012, 01:09
Post #3





Group: Members
Posts: 25
Joined: 20-April 12
Member No.: 99005



Ah, that is wonderful news. You have no idea what a clear confirmation like that means to me. I would be crushed if i learned that i ended up destroying my entire lossless library.

What is an ABX test? Sounds like something i should know about wink.gif
Go to the top of the page
+Quote Post
tpijag
post Apr 20 2012, 01:16
Post #4





Group: Members
Posts: 2352
Joined: 19-May 08
Member No.: 53637



abx answer

This post has been edited by tpijag: Apr 20 2012, 01:28
Go to the top of the page
+Quote Post
RobertoDomenico
post Apr 20 2012, 01:29
Post #5





Group: Members
Posts: 87
Joined: 16-November 11
Member No.: 95208



There is a quick guide here that will be helpful to a beginner XLD Guide
Go to the top of the page
+Quote Post
Carledwards
post Apr 20 2012, 01:45
Post #6





Group: Validating
Posts: 30
Joined: 3-January 11
Member No.: 87003



QUOTE (RobertoDomenico @ Apr 19 2012, 16:29) *
There is a quick guide here that will be helpful to a beginner XLD Guide


Thanks for the link. Handy.
Go to the top of the page
+Quote Post
2Bdecided
post Apr 20 2012, 12:27
Post #7


ReplayGain developer


Group: Developer
Posts: 5138
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



You don't need to ABX lossless files - the process should be mathematically lossless. To verify, you just need to compare before and after file to ensure that they are bit-for-bit binary identical. No need to even listen to them.

Cheers,
David.
Go to the top of the page
+Quote Post
db1989
post Apr 20 2012, 13:08
Post #8





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (2Bdecided @ Apr 20 2012, 12:27) *
To verify, you just need to compare before and after file to ensure that they are bit-for-bit binary identical.
Compare the PCM streams that result from the two files, that is; don’t compare the raw WAV and compressed files, because that’s just asking for trouble. wink.gif
Go to the top of the page
+Quote Post
icstm
post Apr 20 2012, 13:49
Post #9





Group: Members
Posts: 121
Joined: 25-January 12
Member No.: 96698



Yes compare the PCM streams and realise that all this formats are is clever long-word algorithm compression techniques. Think ZIP for music. Even in ZIP you have compression factors that are to do with how much computation should be done, but how much of the original data should be lost.
Go to the top of the page
+Quote Post
db1989
post Apr 20 2012, 14:19
Post #10





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (icstm @ Apr 20 2012, 13:49) *
but not how much of the original data should be lost (because none ever is).
Fixed? wink.gif

In which case, yes, and it provides a further opportunity to reassure xdesirex22 that the compression level solely affects the computational power and techniques used during compression; this may create a different FLAC file, but the stream that you would get from decoding it (note: some formats decode more slowly files that were compressed to a higher degree) would be exactly the same as that from any other FLAC file and, by definition, exactly the same as the original uncompressed stream.
Go to the top of the page
+Quote Post
xdesirex22
post Apr 22 2012, 08:49
Post #11





Group: Members
Posts: 25
Joined: 20-April 12
Member No.: 99005



how can i compare pcm stream? is there a program that can do this?
Go to the top of the page
+Quote Post
db1989
post Apr 22 2012, 09:30
Post #12





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



foobar2000, load and select two files, right-click, “Bit-compare”.
Go to the top of the page
+Quote Post
skamp
post Apr 22 2012, 10:26
Post #13





Group: Developer
Posts: 1443
Joined: 4-May 04
From: France
Member No.: 13875



You'll need the binary comparator.

This post has been edited by skamp: Apr 22 2012, 10:27


--------------------
See my profile for measurements, tools and recommendations.
Go to the top of the page
+Quote Post
evereux
post Apr 22 2012, 10:39
Post #14





Group: Members
Posts: 907
Joined: 9-February 02
From: Cheshire, UK
Member No.: 1296



And a Windows PC or emulator since he is on a Mac.


--------------------
daefeatures.co.uk
Go to the top of the page
+Quote Post
Nessuno
post Apr 22 2012, 12:00
Post #15





Group: Members
Posts: 422
Joined: 16-December 10
From: Palermo
Member No.: 86562



QUOTE (evereux @ Apr 22 2012, 11:39) *
And a Windows PC or emulator since he is on a Mac.


This actually makes things easier: flac -d -c filename.flac | md5

If the computed values for both flac files are the same, so the decoded output streams are! smile.gif


--------------------
... I live by long distance.
Go to the top of the page
+Quote Post
Chinch
post Apr 22 2012, 12:25
Post #16





Group: Members
Posts: 98
Joined: 22-July 09
Member No.: 71664



First, to answer every question you have about this, reference my very detailed post regarding these very questions (including real life examples, results and even screenshots)-- I went into a lot of technical (well, technical to those needing to learn this stuff) points of the concept/process, but I like to think that I did it in a very easy to follow, elementary way. So I strongly urge you to read it, it may help you out tremendously; and who doesn't want to learn more about this stuff? Non-technophiles, but screw them!

Everything you ever cared to know about FLAC files, lossless encoding, proving the process is indeed LOSSLESS, including checksums/hashes (SFV, MD5, SHA-1, etc), bit-level comparison, and many more details that will make you a better person

Yes, agreed with the few above -- FLAC files have an internal MD5 signature that ONLY considers the AUDIO STREAM block of the file, and hashes on it. It discards any artwork, vorbis comments, cuesheets... so when comparing two FLAC files, and viewing the MD5 values, if they match, then you will have an equivalently reliable result to using the binary comparator (which, I use all the time just because it's quicker at times, nothing wrong with the plugin!)

Alternative way to the above post, just for knowledge... -d switch decodes the file and -c decodes it to stdout (standard output) then the output is piped, but you (speak up if I'm somehow wrong) could just as easily use the -t (test) parameter:

-t, --test Same as -d except no decoded file is written

Here's a test I did on a randomly picked album:

>flac -t Deftones - Diamond Eyes - 2010.flac

Deftones - Diamond Eyes - 2010.flac: ok


or for more information, if you want an output file, then you can use the -a switch, but I do not recommend it, because a) you're not going to understand it anyway b) the output will be a .ANA file, and it's gonna be huge:

-a, --analyze Same as -d except an analysis file is written

Do not forget, if you want to check that the file is encoded and written to disk properly during ENCODE, simply use the -V (verify) switch, which will encode a block, write to disk, then turn right around and decode that block and compare that value to the other value still in memory of the unencoded original content. If you're using any decent computer made within the last 10 years, just use -8 for compression... your encoding time is going to probably be the same, but you'll save several megs of HD space per file depending on size. Either way, it's the old storage vs. CPU/processing trade-off law. Except in this case, with the CPU time "sacrifice" being so negligible, your best interest is to save hard drive space, which yields you a greater value in the end. That's my reasoning for using maximum compression always. I always use -V -8 to verify the encode and compress it to the max. Again, don't forget to read the post in the link at the top. You'll see exactly how and why LOSSLESS is LOSSLESS. Compression does NOT mean loss of any original data, by very definition, lossless means NO LOSS of the original content. Same as a ZIP file or RAR archive. The files shrink in size, but you don't have corrupted files extracting always because it removed data from what was originally there...

This post has been edited by Chinch: Apr 22 2012, 12:44
Go to the top of the page
+Quote Post
Nessuno
post Apr 22 2012, 12:48
Post #17





Group: Members
Posts: 422
Joined: 16-December 10
From: Palermo
Member No.: 86562



QUOTE (Chinch @ Apr 22 2012, 13:25) *
Alternative way to the above post, just for knowledge... -d switch decodes the file and -c decodes it to stdout (standard output) then the output is piped, but you (speak up if I'm somehow wrong) could just as easily use the -t (test) parameter:


Yes, but if I'm not wrong, the OP wanted to test if different XLD flac encoding options (so different flac files from the same source) have any result on decoded stream, so my test involves an actual decoding to PCM phase.


--------------------
... I live by long distance.
Go to the top of the page
+Quote Post
Nessuno
post Apr 22 2012, 14:10
Post #18





Group: Members
Posts: 422
Joined: 16-December 10
From: Palermo
Member No.: 86562



QUOTE (Nessuno @ Apr 22 2012, 13:48) *
Yes, but if I'm not wrong, the OP wanted to test if different XLD flac encoding options


If instead he wants to compare PCM data between an AIFF or WAV file and a FLAC one on Mac, he can use the compare function of the shntool into xACT application.

This post has been edited by Nessuno: Apr 22 2012, 14:14


--------------------
... I live by long distance.
Go to the top of the page
+Quote Post
greynol
post Apr 22 2012, 17:08
Post #19





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



QUOTE (Nessuno @ Apr 22 2012, 04:00) *
This actually makes things easier: flac -d -c filename.flac | md5

metaflac --show-md5sum


--------------------
I should publish a list of forum idiots.
Go to the top of the page
+Quote Post
Nessuno
post Apr 22 2012, 19:17
Post #20





Group: Members
Posts: 422
Joined: 16-December 10
From: Palermo
Member No.: 86562



QUOTE (greynol @ Apr 22 2012, 18:08) *
QUOTE (Nessuno @ Apr 22 2012, 04:00) *
This actually makes things easier: flac -d -c filename.flac | md5

metaflac --show-md5sum


Ok, we both know such a test is useless because FLAC is lossless, period.

The one showed by metaflac is a value computed at compress time, possibly from the input stream itself, and stored into the file, so stricto sensu not a fingerprint of the resulting stream after the decode process, as seen by an "external observer".


--------------------
... I live by long distance.
Go to the top of the page
+Quote Post
xdesirex22
post Apr 22 2012, 20:14
Post #21





Group: Members
Posts: 25
Joined: 20-April 12
Member No.: 99005



ok, a lot of this went over my head. are these tests necessary? I just want to make sure that im not screwing up my files. Im literally just opening them in XLD with the conversion options shown in the original post. I can't download Foobar because i am on a mac.

Is xact a comparable program? im downloading that right now.
Go to the top of the page
+Quote Post
greynol
post Apr 22 2012, 20:25
Post #22





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



QUOTE (Nessuno @ Apr 22 2012, 11:17) *
Ok, we both know such a test is useless because FLAC is lossless, period.

Why then is this discussion being fueled with paranoia?

This post has been edited by greynol: Apr 22 2012, 20:28


--------------------
I should publish a list of forum idiots.
Go to the top of the page
+Quote Post
db1989
post Apr 22 2012, 20:28
Post #23





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (xdesirex22 @ Apr 22 2012, 20:14) *
ok, a lot of this went over my head. are these tests necessary?
Not really, unless you’re someone who makes a point of always testing/verifying everything for yourself and/or doesn’t trust the concrete mathematics and testimonies of countless other users!

QUOTE
I just want to make sure that im not screwing up my files.
You’re not. Lossless is lossless. Again: Compression level affects computation and file-size, not quality.
Go to the top of the page
+Quote Post
xdesirex22
post Apr 22 2012, 20:34
Post #24





Group: Members
Posts: 25
Joined: 20-April 12
Member No.: 99005



QUOTE
You’re not. Lossless is lossless. Again: Compression level affects computation and file-size, not quality.

i see. so if that's the case, then why wouldn't one always opt for the highest compression level?
Go to the top of the page
+Quote Post
garym
post Apr 22 2012, 20:39
Post #25





Group: Members
Posts: 514
Joined: 16-September 06
From: United States
Member No.: 35261



QUOTE (xdesirex22 @ Apr 22 2012, 13:34) *
QUOTE
You’re not. Lossless is lossless. Again: Compression level affects computation and file-size, not quality.

i see. so if that's the case, then why wouldn't one always opt for the highest compression level?


probably no reason not to these days. But in the not so distant past, there were a few players that would choke a bit on the processing required to decode the -8 compressed FLAC file. For example, Some Squeezebox players used to choke a bit on 24/96 FLAC files if they were maximum compression, but not at -5 compression. Nothing to do with lossless, just the processing power within the Squeezebox players. Since then, a firmware update has solved this problem.
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th September 2014 - 08:40