IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
flac compression/file size discrepancies
nelce
post Nov 6 2011, 05:59
Post #1





Group: Members
Posts: 8
Joined: 29-April 07
Member No.: 42991



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!
Go to the top of the page
+Quote Post
kwanbis
post Nov 6 2011, 06:30
Post #2





Group: Developer (Donating)
Posts: 2362
Joined: 28-June 02
From: Argentina
Member No.: 2425



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


--------------------
MAREO: http://www.webearce.com.ar
Go to the top of the page
+Quote Post
nelce
post Nov 6 2011, 07:03
Post #3





Group: Members
Posts: 8
Joined: 29-April 07
Member No.: 42991



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.
Go to the top of the page
+Quote Post
kwanbis
post Nov 6 2011, 08:01
Post #4





Group: Developer (Donating)
Posts: 2362
Joined: 28-June 02
From: Argentina
Member No.: 2425



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


--------------------
MAREO: http://www.webearce.com.ar
Go to the top of the page
+Quote Post
nelce
post Nov 6 2011, 08:12
Post #5





Group: Members
Posts: 8
Joined: 29-April 07
Member No.: 42991



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.
Go to the top of the page
+Quote Post
_mē_
post Nov 6 2011, 08:31
Post #6





Group: Members
Posts: 231
Joined: 6-April 09
Member No.: 68706



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.
Go to the top of the page
+Quote Post
nelce
post Nov 6 2011, 08:34
Post #7





Group: Members
Posts: 8
Joined: 29-April 07
Member No.: 42991



QUOTE (_mē_ @ Nov 6 2011, 02:31) *
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?
Go to the top of the page
+Quote Post
hlloyge
post Nov 6 2011, 09:42
Post #8





Group: Members
Posts: 695
Joined: 10-January 06
From: Zagreb
Member No.: 27018



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.
Go to the top of the page
+Quote Post
Destroid
post Nov 6 2011, 10:54
Post #9





Group: Members
Posts: 550
Joined: 4-June 02
Member No.: 2220



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?"
Go to the top of the page
+Quote Post
Roseval
post Nov 6 2011, 12:02
Post #10





Group: Members
Posts: 482
Joined: 26-March 08
Member No.: 52303



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
Go to the top of the page
+Quote Post
nelce
post Nov 6 2011, 16:44
Post #11





Group: Members
Posts: 8
Joined: 29-April 07
Member No.: 42991



QUOTE (hlloyge @ Nov 6 2011, 03:42) *
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?
Go to the top of the page
+Quote Post
pdq
post Nov 6 2011, 16:59
Post #12





Group: Members
Posts: 3392
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



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.
Go to the top of the page
+Quote Post
JJZolx
post Nov 6 2011, 17:54
Post #13





Group: Members
Posts: 396
Joined: 26-November 04
Member No.: 18345



QUOTE (hlloyge @ Nov 6 2011, 01:42) *
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.
Go to the top of the page
+Quote Post
lvqcl
post Nov 6 2011, 18:43
Post #14





Group: Developer
Posts: 3361
Joined: 2-December 07
Member No.: 49183



No, hlloyge is right.
Go to the top of the page
+Quote Post
JJZolx
post Nov 6 2011, 18:54
Post #15





Group: Members
Posts: 396
Joined: 26-November 04
Member No.: 18345



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?
Go to the top of the page
+Quote Post
db1989
post Nov 6 2011, 22:19
Post #16





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



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.

This post has been edited by db1989: Nov 6 2011, 22:20
Go to the top of the page
+Quote Post
mjb2006
post Nov 7 2011, 01:38
Post #17





Group: Members
Posts: 786
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



QUOTE (nelce @ Nov 5 2011, 22:59) *
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? smile.gif
Go to the top of the page
+Quote Post

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: 27th August 2014 - 14:13