FLAC Compression ratios |
![]() ![]() |
FLAC Compression ratios |
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 |
|
|
|
Jan 18 2011, 18:53
Post
#2
|
|
![]() Group: Super Moderator Posts: 9261 Joined: 1-April 04 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.
-------------------- Everything sounds the same until it is proven otherwise.
|
|
|
|
Jan 18 2011, 18:55
Post
#3
|
|
|
Group: Members Posts: 675 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. This post has been edited by mixminus1: Jan 18 2011, 18:57 -------------------- "Not sure what the question is, but the answer is probably no."
|
|
|
|
Jan 18 2011, 19:01
Post
#4
|
|
![]() Group: Developer Posts: 2980 Joined: 2-December 07 Member No.: 49183 |
|
|
|
|
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 |
|
|
|
Jan 18 2011, 20:32
Post
#6
|
|
![]() Group: Super Moderator Posts: 9261 Joined: 1-April 04 Member No.: 13167 |
I was going to mention the seek table, but figured it could be lumped under metadata.
-------------------- Everything sounds the same until it is proven otherwise.
|
|
|
|
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 |
|
|
|
Jan 19 2011, 12:25
Post
#8
|
|
|
Group: Members Posts: 3080 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. |
|
|
|
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. |
|
|
|
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 |
|
|
|
Jan 19 2011, 20:48
Post
#11
|
|
![]() Group: Members Posts: 399 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? |
|
|
|
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. |
|
|
|
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. |
|
|
|
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).
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
Jan 20 2011, 16:40
Post
#17
|
|
|
Group: Members Posts: 74 Joined: 11-February 05 Member No.: 19760 |
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 |
|
|
|
Jan 20 2011, 18:14
Post
#18
|
|
|
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. 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... |
|
|
|
Jan 20 2011, 20:49
Post
#19
|
|
|
Group: Members Posts: 4131 Joined: 2-September 02 Member No.: 3264 |
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. |
|
|
|
Jan 20 2011, 21:36
Post
#20
|
|
|
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. 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? |
|
|
|
Jan 20 2011, 21:58
Post
#21
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 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 -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Jan 20 2011, 22:28
Post
#22
|
|
![]() Group: Developer Posts: 2980 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 |
|
|
|
Jan 20 2011, 22:34
Post
#23
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
-------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
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 |
|
|
|
Jan 21 2011, 19:45
Post
#25
|
|
![]() Group: Members Posts: 512 Joined: 18-January 04 From: bethlehem.pa.us Member No.: 11318 |
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st May 2013 - 06:03 |