• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

WAV(PCM) vs FLAC

Dipypang

Member
Joined
Oct 21, 2019
Messages
25
Likes
9
CD ripped
Format: WAV(PCM)
Bit rate: 1411 kbps
Size: 47 MB

FLAC
Format: FLAC
Bit rate: 3342 kbps
Size: 112 MB

I googled for this and I found out that PCM files are 100% original uncompressed but why is a compressed lossless FLAC have bigger size file and bit rate...
From the comparison above, is it the FLAC file have better sound than the CD ripped? WHY?
Logically, that FLAC can achieve a higher bit rate was sampled up? A small file sampled to bigger file shouldn't have better sound than original?

Maybe we can barely hear the difference, but I need to choose which one to keep. A better one of course!

Thanks!

EDIT:
FLAC file was downloaded online.
CD file ripped from original disc I own.
 
Last edited:

frogmeat69

Addicted to Fun and Learning
Forum Donor
Joined
Apr 25, 2018
Messages
957
Likes
1,713
Location
Western New York, USA
Is the FLAC a "Hi-Res" file? Usually when I rip CDs to FLAC, the song files are a lot smaller in size than 112MB. The only ones I have that large are from places like HDTracks, which they claim are Hi-Res 24 bit.
 

dfuller

Major Contributor
Joined
Apr 26, 2020
Messages
3,407
Likes
5,256
CD ripped
Format: WAV(PCM)
Bit rate: 1411 kbps
Size: 47 MB

FLAC
Format: FLAC
Bit rate: 3342 kbps
Size: 112 MB

I googled for this and I found out that PCM files are 100% original uncompressed but why is a compressed lossless FLAC have bigger size file and bit rate...
From the comparison above, is it the FLAC file have better sound then the CD ripped? WHY?
Logically, that FLAC can achieve a higher bit rate was sampled up? A small file sampled to bigger file shouldn't have better sound than original?

Maybe we can barely hear the difference, but I need to choose which one to keep. A better one of course!

Thanks!
That FLAC likely has a higher sample rate and word length (bit depth) than the CD rip WAV. The math for uncompressed audio (i.e. WAV or AIFF) is sample rate * word length * channel count = bit rate. 44,100*16*2 = about 1,411,000 bits per second - or 1,411kbps. For FLAC, you'd need to take into account the compression ratio (which we don't know). But, for the sake of it, a normal 44.1/16 stereo FLAC is going to be somewhere between 500-750 (ish) kbps (it varies, as FLAC is VBR because it takes as many bits as it needs to encode the file losslessly).
 

DVDdoug

Major Contributor
Joined
May 27, 2021
Messages
3,031
Likes
3,991
the flac is 24/96
That's reasonable. 24bits x 96000 x 2 channels = 4808kbps (uncompressed). FLAC typically gives you a file about 60% of the original but it depends on the file. "Simple" sounds compress better (to a smaller file and corresponding lower bitrate).

MediaInfoOnline can give you the sample rate and bitrate of both files. (We already know the CD rip is 1411 = 16 x 44,100 x 2)

From the comparison above, is it the FLAC file have better sound then the CD ripped? WHY?
Bitrate doesn't ALWAYS relate to sound quality.

A FLAC has about half the bitrate (half the file size) of the original but it's lossless compression so when it's played it gets decompressed and you get all of the same-original "bits" back and the lower bitrate doesn't mean lower quality.

They can also be different masters, different mixes, or even different recordings. There was a recent post on the HydrogenAudio forum where a "HD" track was remastered with more ("worse") dynamic compression than the older CD. In this particular case, the more compressed file isn't louder. It has about the same loudness with lower (compressed/limited) peaks. (Don't confuse dynamic compression with file compression like FLAC or MP3. MP3 is lossy compression but it doesn't reduce the musical dynamics.)

Or if you up-sample you get a higher bitrate without changing the sound.

And in most cases you can downsample from "high definition" to "CD quality" and you can't hear a difference (n a proper blind ABX text). In many cases you can't hear the difference between a high-definition original and a good quality MP3 or AAC, or at least you might have to listen very carefully to hear a difference. (ABX tests can be humbling!)

BTW - When you compare the files make sure to volume-match because the tendency is to judge the louder one as "better sounding".

but I need to choose which one to keep. A better one of course!
If you can hear a difference, keep the better sounding one. If you can't hear a difference you may want to keep the FLAC (if larger file size isn't an issue). You can always keep the highest resolution file as an "archive" copy, and then optionally convert to MP3 or AAC for listening on your phone, or you can downsample and burn a CD, etc., or convert to any other lossless or lossy format any time in the future. The highest quality archive leaves you with the most options...
 
Last edited:
OP
D

Dipypang

Member
Joined
Oct 21, 2019
Messages
25
Likes
9
Do you know the sampling rate or resolution of the two files? They can be very different.
FLAC is 24 bits/96 kHz (72% of original [showed in foobar2000])
CD ripped is 16 bits/44.1 kHz (100% of original [showed in foobar2000])

Is the FLAC a "Hi-Res" file? Usually when I rip CDs to FLAC, the song files are a lot smaller in size than 112MB. The only ones I have that large are from places like HDTracks, which they claim are Hi-Res 24 bit.
FLAC is going to be somewhere between 500-750 (ish) kbps (it varies, as FLAC is VBR because it takes as many bits as it needs to encode the file losslessly).
FLAC file was downloaded online.
CD ripped was ripped from the original CD I own.

The flac is 24/96
Yes.

FLAC typically gives you a file about 60% of the original
This is what I am wondering... Not 100% Original but larger files, bit depth and sample rate... Maybe it was remastered just like you said?
 

anphex

Addicted to Fun and Learning
Forum Donor
Joined
May 14, 2021
Messages
683
Likes
912
Location
Berlin, Germany
When I saved some of my CDs to FLAC I noticed that in some cases FLAC doesn't achieve a big compression ratio and turns out to be a little less than the .wav size. So maybe your file is very complex audio data.
 

czt

Active Member
Joined
Jul 14, 2021
Messages
142
Likes
90
You will never hear any difference between "hi-res" 24/96 and CD 16/44 with the same track/mastering, so pointless to keep the larger file (for listening only).
 
Last edited:

Kal Rubinson

Master Contributor
Industry Insider
Forum Donor
Joined
Mar 23, 2016
Messages
5,303
Likes
9,867
Location
NYC
This is what I am wondering... Not 100% Original but larger files, bit depth and sample rate...
But it is 100% original to the source. FLAC is a lossless compression-decompression format.
Maybe it was remastered just like you said?
Not directly relevant to the issues of file size.
When I saved some of my CDs to FLAC I noticed that in some cases FLAC doesn't achieve a big compression ratio and turns out to be a little less than the .wav size. So maybe your file is very complex audio data.
One can choose the degree of FLAC compression over a range.
 

escape2

Addicted to Fun and Learning
Joined
Mar 8, 2019
Messages
883
Likes
944
Location
USA
but why is a compressed lossless FLAC have bigger size file and bit rate...
Because in the case of this particular FLAC file that you've downloaded, its source may not have been a CD but a higher res source, hence you really cannot compare the two.

If the source was CD, then WAV would be 1411 kbps while FLAC would typically be around 750-1000 kbps, give or take, depending on actual content and compression level used.
 

Leporello

Senior Member
Joined
Oct 27, 2019
Messages
411
Likes
812
But it is 100% original to the source. FLAC is a lossless compression-decompression format.

Not directly relevant to the issues of file size.

One can choose the degree of FLAC compression over a range.
The size of the resulting flac file seems to correlate somewhat with the amount of treble in the original. Davitt Moroney's Kunst der Fuge (Harmonia Mundi) is almost painfully bright and FLAC is able to compress the file size very little. 'Psychocandy' by Jesus and Mary Chain is another example.
 

Kal Rubinson

Master Contributor
Industry Insider
Forum Donor
Joined
Mar 23, 2016
Messages
5,303
Likes
9,867
Location
NYC
When I saved some of my CDs to FLAC I noticed that in some cases FLAC doesn't achieve a big compression ratio and turns out to be a little less than the .wav size. So maybe your file is very complex audio data.
The size of the resulting flac file seems to correlate somewhat with the amount of treble in the original. Davitt Moroney's Kunst der Fuge (Harmonia Mundi) is almost painfully bright and FLAC is able to compress the file size very little. 'Psychocandy' by Jesus and Mary Chain is another example.
It's possible but, also, testable by comparing the same PCM source compressed with/without severe HF roll-off.
 

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,485
Likes
4,111
Location
Pacific Northwest
... I don't recommend using FLAC 0 to 4 if you plan to use them for DJing purposes, because they can take too much time to decode and introduce delay issues.
Did you mean FLAC 5-8, the highest compression levels which take longer to encode & decode?
 

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,688
Likes
4,070
Did you mean FLAC 5-8, the highest compression levels which take longer to encode & decode?
Yes, my mistake. I recommend 0-6, but not to use 7 nor 8.
But I think 0-4 is useless, and 5 or 6 are the best compromise.
 

escape2

Addicted to Fun and Learning
Joined
Mar 8, 2019
Messages
883
Likes
944
Location
USA
True.
See these two examples: https://z-issue.com/wp/flac-compression-level-comparison/
It varies between 75% (track 1) and 54% (track 2).

I recommend using FLAC 0 to 6 if you plan to use them for DJing purposes, because at 7-8 it can take too much time to decode and introduce delay issues. (edited)
From the same link that you've provided:
There is a key misunderstanding about FLAC, you (at the of your published writing) may not be aware about. FLAC is asymmetrical in terms of encoding and decoding time. When FLAC was developed one of the goals was to make a lossless encoder that is asymmetrical. Encoding times are longer, but decoding times near real-time.

So, the compression level chosen during encoding should have no bearing on DJing since you are just decoding the audio and not encoding it.
 

threni

Major Contributor
Joined
Oct 18, 2019
Messages
1,281
Likes
1,532
Location
/dev/null
From the same link that you've provided:
So, the compression level chosen during encoding should have no bearing on DJing since you are just decoding the audio and not encoding it.
That's just saying decoding is quicker than encoding, not that the different compression levels are identical in terms of time/resources used to decode.
 

escape2

Addicted to Fun and Learning
Joined
Mar 8, 2019
Messages
883
Likes
944
Location
USA
That's just saying decoding is quicker than encoding, not that the different compression levels are identical in terms of time/resources used to decode.
Have there been any studies showing that decoding FLAC L8 takes longer?

Why do the encoder settings have a big effect on the encoding time but not the decoding time?

It's hard to explain without going into the codec design, but to oversimplify, the encoder is looking for functions that approximate the signal. Higher settings make the encoder search more to find better approximations. The functions are themselves encoded in the FLAC file. Decoding only requires computing the one chosen function, and the complexity of the function is very stable. This is by design, to make decoding easier, and is one of the things that makes FLAC easy to implement in hardware.


https://xiph.org/flac/faq.html#general__asymmetry
 

escape2

Addicted to Fun and Learning
Joined
Mar 8, 2019
Messages
883
Likes
944
Location
USA
Have there been any studies showing that decoding FLAC L8 takes longer?
Since I couldn't find any data on this, I did a quick unscientific test on my side. I took a 72-min long album in WAV and encoded it to FLAC L0 and FLAC L8. I then decoded these two FLAC files back to WAV.

FLAC L0 to WAV: 9 seconds
FLAC L8 to WAV: 8 seconds

I ran this test several times with similar results.

I used FLAC 1.3.3 20190804 in Foobar2000.

File sizes:
WAV: 732 MB
FLAC L0: 418 MB
FLAC L8: 382 MB
 
Last edited:
Top Bottom