Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: flac compression/file size discrepancies (Read 7375 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

flac compression/file size discrepancies

So I was ripping an audio cd to FLAC using EAC and noticed that the percent compression was a lot higher than all the flac files I have downloaded in the past. As an example, a certain track that is about 4 minutes in duration, when ripped from the original cd, ended up being 12mb in size and 72% compressed. Most of the downloaded flac album tracks are usually about 20-30mb and only 25-35% compressed.

I downloaded the exact same track in flac format and it is 23mb and 46% compressed, which is quite significant. I know there are different compression settings for flac (from 0-8), but from what I read, it didn't seem like the difference could be this huge.

I took my ripped flac file, and the downloaded flac file, decoded both of them to wav, then used the same program to reencode both files back to flac.  basically the same discrepancy in percent compression and file size still exists.

I also ripped another track from a different cd to flac, and downloaded the same track in flac on a reputable website (transcoding is not allowed on this website so i know that isn't an issue), and had the same problem.  my file was 13.27mb (75% compressed) and their file was 25.87mb (51% compressed).  It seems that my ripped files are consistently more compressed and smaller in size, which would be great if they were truly lossless.  But I have hundreds of downloaded flac files and none of them are this compressed so I am a bit concerned here.

Any ideas on what may be going on here? Is it possible for two flac files of the same song, where one file is twice as big as the other (12mb vs 23mb)?  I would appreciate any comments or explanations for this matter! Thanks in advance!

flac compression/file size discrepancies

Reply #1
When you decoded to wav, did the 2 files check as equal?

flac compression/file size discrepancies

Reply #2
what do you mean if they checked as equal?  the file sizes were almost equal (maybe off by 10 bytes or so).  but from what i learned, this doesn't mean anything. 

i did a test.  i took a v0 mp3 and decoded it to wav.  then i took the same song that i ripped to flac and decoded to wav.  both files were nearly the same size as well.

flac compression/file size discrepancies

Reply #3
Maybe it was not the same source, maybe lossywav was used?

flac compression/file size discrepancies

Reply #4
i'm inclined to think it's the same source.  just because this private download site is very stringent on flac rips being from the cd directly (vs. transcoding from an mp3).  also, i ripped two different songs from two different albums to compare and both are discrepant. 

have you seen many flac files ripped directly from the cd being 70%+ compressed?  i mean there's this one track that's even 82% compressed.  i browsed through all my downloaded flac files and almost all of them are under 40% compressed.  i definitely don't see anything as high as my own rips, which leads me to question how i'm able to rip these cds and have the files end up being so compressed and so small.  i'm concerned about losing quality because the files are so small and compressed, even though i'm ripping the flac files directly from the cd, which is bizarre.

flac compression/file size discrepancies

Reply #5
Likely a different master.
Quote
have you seen many flac files ripped directly from the cd being 70%+ compressed?

Yes.
Quote
i'm concerned about losing quality because the files are so small and compressed

Then decompress the files from flac and compare with the ripped originals.
If they are identical, you lost nothing.

flac compression/file size discrepancies

Reply #6
Then decompress the files from flac and compare with the ripped originals.
If they are identical, you lost nothing.


what am i comparing exactly? just the file size?

 

flac compression/file size discrepancies

Reply #7
No, but binary content of the music part of the file (without file headers, just music). Foobar has excellent file compare function, which automatically checks only audio parts.
Rip the wav from CD, then leave it, don't delete it. Compress that wav to FLAC with settings you want. Load them both to Foobar. Select them both, right click / utilities / bit-compare tracks.
I don't know if that comparator comes with default installation, so you should check that out.

There is also probability that you are comparing original release with some remastered release. If the remaster is louder and brickwalled, it would be harder to compress.
Error 404; signature server not available.

flac compression/file size discrepancies

Reply #8
OP: You should be able to understand that compression ratio depends on source.

I have to go ahead and ask if you will provide the name/URL of your source of the downloaded material and your own source material.

The fact of the matter is FLAC (or any other reliable lossless compressor) will differ in file ratio IF the source material and/or compressor are not identical.

What is relevant is whether your source material decompresses bit-identical to FLAC decompressed, which it should by definition of lossless.

Good luck!
"Something bothering you, Mister Spock?"

flac compression/file size discrepancies

Reply #9
Take CD quality (16 bits / 44.1 kHz sample rate) as an example.
If you have a WAV of 1 Mb  and you convert it to FLAC size will be normally between 60-70%
If you convert to 320 kbs MP3 size will be approximately 25%

If you convert the FLAC back to WAV size will be 1 Mb
If you convert the MP3 back to WAV size will be 1 Mb
Simply because converting back to WAV is expanding the compressed format back to 16/44.1.

Obvious file size will tell you nothing.

If one compare the audio part of the original WAV with the FLAC converted back to WAV, the number of samples will be identical and the content of each sample will be identical simply because FLAC is lossless compression.

If one compare the original WAV with the MP3 converted back to WAV, the number of samples will be identical but the content of each sample will be different simply because MP3 is lossy compression. Due to the lossy compression information is discarded.


TheWellTemperedComputer.com

flac compression/file size discrepancies

Reply #10
No, but binary content of the music part of the file (without file headers, just music). Foobar has excellent file compare function, which automatically checks only audio parts.
Rip the wav from CD, then leave it, don't delete it. Compress that wav to FLAC with settings you want. Load them both to Foobar. Select them both, right click / utilities / bit-compare tracks.
I don't know if that comparator comes with default installation, so you should check that out.

There is also probability that you are comparing original release with some remastered release. If the remaster is louder and brickwalled, it would be harder to compress.


Thanks for the advice with foobar!  So I did as you asked, and compared the wav and flac files ripped from the original cd with foobar and the results came up as:

All tracks decoded fine, no differences found.  No differences in decoded data found.

So I guess that means even though this flac file is 75% compressed (compared to the one I downloaded, which was only 51% compressed and almost twice the size), there is absolutely no loss in data?

flac compression/file size discrepancies

Reply #11
The idea was to compare the two different versions of the song to see if they are the same. All you have done is verify that the decoded version of each files matches it encoded version.

flac compression/file size discrepancies

Reply #12
There is also probability that you are comparing original release with some remastered release. If the remaster is louder and brickwalled, it would be harder to compress.


Wouldn't it be the other way around? I would think that a highly compressed mastering would have much less audio information and therefore compress more.

flac compression/file size discrepancies

Reply #13
No, hlloyge is right.

flac compression/file size discrepancies

Reply #14
What would happen if, by chance, one rip was a mono signal with both channels identical? Would the Flac encoder take advantage of this and compress the mono WAV to a much larger degree? Or are the two channels completely independent?

flac compression/file size discrepancies

Reply #15
Yes, FLAC can of course increase its compression as correlation between the two channels increases; such is quite a fundamental feature of lossless audio compression. See various pages on the official site (e.g.) as well as a number of past discussions on the topic of mono or almost-mono FLACs, accessible via a search.

flac compression/file size discrepancies

Reply #16
I took my ripped flac file, and the downloaded flac file, decoded both of them to wav, then used the same program to reencode both files back to flac.  basically the same discrepancy in percent compression and file size still exists.

That's good that you did the re-encode, because it likely got rid of any differences in metadata. Cover art, in particular, can inflate the file size quite a bit, throwing off poorly calculated estimates of compression ratios (e.g. based on file size alone).

The nature of the audio in the files makes a difference. 4 minutes of silence compresses to almost nothing. 4 minutes of very loud, noise-like, stereo signal barely compresses at all. Depending on what encoder settings you use, near-mono content can be more efficiently encoded. The reference encoder's -0 through -8 settings are not controlling single variable on a scale of 0 to 8, but rather are aliases for different combinations of a variety of settings; file sizes aren't necessarily predictable based on compression settings alone.

Quote
I also ripped another track from a different cd to flac, and downloaded the same track in flac on a reputable website

You're sure it was from the same mastering of the same CD? And you removed/excluded cover art before blindly comparing file sizes?