IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
FLAC Compression ratios
jjm
post Jan 18 2011, 18:29
Post #1





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



Hi all,

When running the FLAC encoder from different applications on the same file, I get different compression rations. The FLAC front-end gives the best results (batch conversion from WAV), followed by CDex (CD ripping to FLAC), then foobar2000 (batch conversion from WAV). The original WAV file was previously ripped to WAV with CDex.

Running decode from the front-end results in 3 identical files, all identical to the original ripped WAV file, at least in terms of size.

The configured compression level is always 8. I only have 1 copy of flac.exe throughout the entire system (XP).

Any idea why this happens?

Many thanks in advance.

JJ
Go to the top of the page
+Quote Post
greynol
post Jan 18 2011, 18:53
Post #2





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



How different are the file sizes? If you are using the same version of flac for each then the only differences you will see will be due to metadata.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
mixminus1
post Jan 18 2011, 18:55
Post #3





Group: Members
Posts: 684
Joined: 23-February 05
Member No.: 20097



Are you comparing the actual bits per second of the audio data, or just the overall size of the FLAC files?

There could very well be differences in how each application tags the resulting FLACs, and that would make a difference in the overall file size. For instance, by default, FLAC frontend doesn't add any tags, and would therefore produce the smallest file size possible for a given compression ratio.

Edit: 2 minutes! What greynol said. smile.gif

This post has been edited by mixminus1: Jan 18 2011, 18:57


--------------------
"Not sure what the question is, but the answer is probably no."
Go to the top of the page
+Quote Post
lvqcl
post Jan 18 2011, 19:01
Post #4





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



http://www.hydrogenaudio.org/forums/index....showtopic=54054
Go to the top of the page
+Quote Post
jjm
post Jan 18 2011, 19:32
Post #5





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



Thanks all,

I was comparing the raw file sizes, which are significantly different.

I will investigate further in the light of your answers and of the existing topic.

J-J
Go to the top of the page
+Quote Post
greynol
post Jan 18 2011, 20:32
Post #6





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



I was going to mention the seek table, but figured it could be lumped under metadata.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
jjm
post Jan 19 2011, 10:26
Post #7





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



Well, I've sorted out the situation with foobar (my output parameters were wrong), and these are the results I now get for a given file:
- WAV - 1411 Kbit/s - 45 840 524 bytes (for reference)
- FLAC from Front-end (batch conversion) - compression level: 8 - 512 Kbit/s - 16 643 150 bytes
- FLAC from foobar (ripping) - compression level: 8 - 512 Kbit/s - 16 636 729 bytes
- FLAC from CDex (ripping) - compression level : 8 - 558 Kbit/s - 18 138 714 bytes
- FLAC from Front-end (batch conversion) - compression level: 2 -559 Kbit/s - 18 167 598 bytes
- FLAC from foobar (batch conversion) - compression level: 8 - 694 Kbit/s - 22 554 703 bytes
- FLAC from Front-end (batch conversion) - compression level:0 - 587 Kbit/s - 19 074 076 bytes

Those results are somewhat mysterious to me, but thet are perfectly deterministic (i.e. repeatable), and all the FLAC files can be converted back to the original WAV size.

Rather than investigating for ages, I will now use foobar for ripping, and the front-end for batch conversions.

Thanks all.

JJ
Go to the top of the page
+Quote Post
pdq
post Jan 19 2011, 12:25
Post #8





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



Why wouldn't you use foobar for batch conversions too?

Personally I would use dbp for ripping.
Go to the top of the page
+Quote Post
jjm
post Jan 19 2011, 14:55
Post #9





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



Well, using foobar for batch conversions yields the worst possible results (see my figures).

With regard to dbp, I never heard of it before. Have you got a link, please?

Thx.
Go to the top of the page
+Quote Post
jjm
post Jan 19 2011, 15:20
Post #10





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



Sorry pdq, I just realize you were talking about dBpoweramp.

Thank you
Go to the top of the page
+Quote Post
Apesbrain
post Jan 19 2011, 20:48
Post #11





Group: Members
Posts: 453
Joined: 3-January 04
Member No.: 10915



QUOTE (jjm)
- FLAC from foobar (ripping) - compression level: 8 - 512 Kbit/s - 16 636 729 bytes
- FLAC from foobar (batch conversion) - compression level: 8 - 694 Kbit/s - 22 554 703 bytes

I just ripped (converted a random CDDA track to WAV and to FLAC -8) using foobar2000 1.1.2 beta 4 and then converted the resulting WAV file to FLAC -8. The two FLAC files are exactly the same size.

Do you have some kind of processing enabled in your foobar2000 conversion settings?
Go to the top of the page
+Quote Post
WonderSlug
post Jan 20 2011, 05:03
Post #12





Group: Members
Posts: 299
Joined: 6-February 08
From: San Diego, CA
Member No.: 51066



In Foobar2000, are you keeping the lossless sources at the same bit depth, and are you applying dither?

If you are applying dither, then the FLAC encodings will obviously be at a higher bitrate because of the added dither.

In my Foobar 2000 settings, I have Preferred Bit Depth set to "16", Dither "never", and the Keep Lossless Sources at Original Bit Depth box checked.

With this, and making sure that Foobar is using the same flac version as all my other encoding apps, the same WAV files produce the exact same size files (give or take a few hundred bytes due to tags) in all applications.
Go to the top of the page
+Quote Post
jjm
post Jan 20 2011, 10:30
Post #13





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



@Apesbrain
I can't find any specific settings for conversion. Where are they? By the way, I use v1.1.1, in case this might be a problem.
@Wonderslug
My settings don't look like yours. I have indeed chosen a 16-bit depth, but Dither is only a check box (unchecked) and I don't have a box called "Keep Lossless sources at Original Bit Depth". Mybe a version problem too?
Thx.
Go to the top of the page
+Quote Post
jjm
post Jan 20 2011, 10:40
Post #14





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



I forgot to mention I'm not willing to upgrade to v1.1.2 beta 4, because this will expire after 4 weeks (unless I misinterpreted something).
Go to the top of the page
+Quote Post
lordgibbness
post Jan 20 2011, 14:21
Post #15





Group: Members
Posts: 74
Joined: 11-February 05
Member No.: 19760



Perhaps you could strip out all of the tag metadata with mp3tag and then compare the file sizes again? That way the old data left in the file is audio data.
Go to the top of the page
+Quote Post
jjm
post Jan 20 2011, 16:35
Post #16





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



Of course, this could be done. But, as stated by WonderSlug, metadata should be no more than a few hundred bytes. And, as you may have noticed, the big differences I experience are due to the varying bit rates of the encoded streams. Therefore, as the other contributors rightly point out, I must have a problem with foobar (and CDex) parameters, but I'm unable to track it down right now.
Go to the top of the page
+Quote Post
lordgibbness
post Jan 20 2011, 16:40
Post #17





Group: Members
Posts: 74
Joined: 11-February 05
Member No.: 19760



QUOTE (jjm @ Jan 20 2011, 15:35) *
Of course, this could be done. But, as stated by WonderSlug, metadata should be no more than a few hundred bytes. And, as you may have noticed, the big differences I experience are due to the varying bit rates of the encoded streams. Therefore, as the other contributors rightly point out, I must have a problem with foobar (and CDex) parameters, but I'm unable to track it down right now.

You have a difference of about 1.4MB - could it be a jpeg or something in the tag? With mp3tag you can examine the extended tags to see exactly what is in the file metadata.

This post has been edited by lordgibbness: Jan 20 2011, 16:41
Go to the top of the page
+Quote Post
jjm
post Jan 20 2011, 18:14
Post #18





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



QUOTE (lordgibbness @ Jan 20 2011, 16:40) *
QUOTE (jjm @ Jan 20 2011, 15:35) *
Of course, this could be done. But, as stated by WonderSlug, metadata should be no more than a few hundred bytes. And, as you may have noticed, the big differences I experience are due to the varying bit rates of the encoded streams. Therefore, as the other contributors rightly point out, I must have a problem with foobar (and CDex) parameters, but I'm unable to track it down right now.

You have a difference of about 1.4MB - could it be a jpeg or something in the tag? With mp3tag you can examine the extended tags to see exactly what is in the file metadata.

The difference is very nearly 6 MB (16,6 vs 22.6 MB). I will take a look at the tags and keep u posted if I find anything. But we are talking about a CD track, ripped to FLAC directly, or ripped to WAV then converted to FLAC. Where would 6 MB of tags come from? I'm puzzled...
Go to the top of the page
+Quote Post
saratoga
post Jan 20 2011, 20:49
Post #19





Group: Members
Posts: 4718
Joined: 2-September 02
Member No.: 3264



QUOTE (jjm @ Jan 20 2011, 12:14) *
QUOTE (lordgibbness @ Jan 20 2011, 16:40) *
QUOTE (jjm @ Jan 20 2011, 15:35) *
Of course, this could be done. But, as stated by WonderSlug, metadata should be no more than a few hundred bytes. And, as you may have noticed, the big differences I experience are due to the varying bit rates of the encoded streams. Therefore, as the other contributors rightly point out, I must have a problem with foobar (and CDex) parameters, but I'm unable to track it down right now.

You have a difference of about 1.4MB - could it be a jpeg or something in the tag? With mp3tag you can examine the extended tags to see exactly what is in the file metadata.

The difference is very nearly 6 MB (16,6 vs 22.6 MB). I will take a look at the tags and keep u posted if I find anything. But we are talking about a CD track, ripped to FLAC directly, or ripped to WAV then converted to FLAC. Where would 6 MB of tags come from? I'm puzzled...


My guess is that you are applying dsp effects when converting files, but not when ripping.
Go to the top of the page
+Quote Post
jjm
post Jan 20 2011, 21:36
Post #20





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



QUOTE (saratoga @ Jan 20 2011, 20:49) *
QUOTE (jjm @ Jan 20 2011, 12:14) *
QUOTE (lordgibbness @ Jan 20 2011, 16:40) *
QUOTE (jjm @ Jan 20 2011, 15:35) *
Of course, this could be done. But, as stated by WonderSlug, metadata should be no more than a few hundred bytes. And, as you may have noticed, the big differences I experience are due to the varying bit rates of the encoded streams. Therefore, as the other contributors rightly point out, I must have a problem with foobar (and CDex) parameters, but I'm unable to track it down right now.

You have a difference of about 1.4MB - could it be a jpeg or something in the tag? With mp3tag you can examine the extended tags to see exactly what is in the file metadata.

The difference is very nearly 6 MB (16,6 vs 22.6 MB). I will take a look at the tags and keep u posted if I find anything. But we are talking about a CD track, ripped to FLAC directly, or ripped to WAV then converted to FLAC. Where would 6 MB of tags come from? I'm puzzled...


My guess is that you are applying dsp effects when converting files, but not when ripping.

This is a worthwile guess, but I don't know how to configure dsp effects for ripping vs converting.
In any case, I don' have any dsp's enabled under Preferences > Playback > DSP Manager.
Are there any other locations to look at?
Go to the top of the page
+Quote Post
Nick.C
post Jan 20 2011, 21:58
Post #21


lossyWAV Developer


Group: Developer
Posts: 1772
Joined: 11-April 07
From: Wherever here is
Member No.: 42400



For foobar 1.1:

Select track in foobar; right click to bring up context menu; Convert; "..."; Processing; then make sure that the Active DSPs box is empty....


--------------------
lossyWAV -q X -a 4 --feedback 4| FLAC -8 ~= 320kbps
Go to the top of the page
+Quote Post
lvqcl
post Jan 20 2011, 22:28
Post #22





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



QUOTE
then make sure that the Active DSPs box is empty....

and "Additional decoding" is off. (added: you will see it only if you have foo_hdcd or foo_input_dts installed).

Added 2: ...and replaygain is off, too.

This post has been edited by lvqcl: Jan 20 2011, 23:09
Go to the top of the page
+Quote Post
Nick.C
post Jan 20 2011, 22:34
Post #23


lossyWAV Developer


Group: Developer
Posts: 1772
Joined: 11-April 07
From: Wherever here is
Member No.: 42400



QUOTE (lvqcl @ Jan 20 2011, 21:28) *
and "Additional decoding" is off.
Oops....


--------------------
lossyWAV -q X -a 4 --feedback 4| FLAC -8 ~= 320kbps
Go to the top of the page
+Quote Post
jjm
post Jan 21 2011, 10:45
Post #24





Group: Members
Posts: 23
Joined: 18-January 11
From: Brittany, France
Member No.: 87431



Thanks, gentlemen, that was it.
But why the hell are conversion parameters identified by"..." in the context menu?????
This is not intuitive, to say the least.
Thanks again anyway.
JJ
Go to the top of the page
+Quote Post
Zarggg
post Jan 21 2011, 19:45
Post #25





Group: Members
Posts: 533
Joined: 18-January 04
From: bethlehem.pa.us
Member No.: 11318



QUOTE (jjm @ Jan 20 2011, 04:40) *
I forgot to mention I'm not willing to upgrade to v1.1.2 beta 4, because this will expire after 4 weeks (unless I misinterpreted something).

By that time, there will either be a new beta or the final version. That's how they handle development/releases.
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 April 2014 - 12:28