Help - Search - Members - Calendar
Full Version: FLAC at 24 bit = 95%+ compression ratio?
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
Subfader
Hi, i wonder why a wav recorded and mastered at 24 bits only causes a flac compression ratio of 95%+ while the same file at 16 bit is ~75% ?
I made a little test: i had a 24 bit / 48 kHz source file which i saved in 4 different wav's and encoded them in FLAC at level 8:

24/48 - 99,4% compression ratio
24/44 - 99,9%
16/48 - 72,4%
16/44 - 74,2%

was it just good mastering at 24/48 so it "comletely filled all bits"?
Wintershade
Did you do a bit-comparation after encoding? There might have occurred errors in encoding...

Personally, I trust FLAC only with 44kHz 16-bit audio (from CDs) and use Wavpack for everything above that.
Subfader
i had the [skipping unknown sub-chunk 'PAD'] error at all wav's i encoded above 50 MB filesize or sth, but i had that with the other 44/16 as well (which encoded normally).
wavepack is not a real option for me since it's not supported enough. but i cay play it yes so i'll try that. ta
Zao
Shouldn't there be more noise in the least significant bits of a 24-bit file than a 16-bit file?

Noise generally compresses badly.
adam917
QUOTE(Zao @ Dec 27 2005, 09:00 PM)
Shouldn't there be more noise in the least significant bits of a 24-bit file than a 16-bit file?

Noise generally compresses badly.
*

Yes, and noise = random, which = hard or impossible to compress good.
Subfader
alright, makes sense. thanks.
will no more encode 24 bit audio with flac, but i don't have much of that : )
jcoalson
if you upload a sample I can take a look.

Josh
Subfader
24/48 recorded wav sample (caused 97% here)

flac is compressing fine when you take a 16/44 source (eg CD), convert it to 24/48 and then encode it with flac. this will cause regulary ratios.
but when you record in 24/48 or24/ 44 from a mixer for instance then you'll get those big ratios of 95%+
jcoalson
I get this following that link:
CODE
Invalid Attachment specified. If you followed a valid link, please notify the administrator

Emanuel
No offense, but Flac has never been good at compressing 24 bit sound. For that, I'm stuck with Monkey's Audio - although I would prefer using Flac.

Will get samples up tomorrow that shows the difference.
Subfader
ups. same file
jcoalson
got it, will investigate.
Emanuel
I did a short test on a 24 bit clip, and it seems FLAC 1.1.2 is performing a bit better in comparison to for example Monkeys Audio 3.99F when using 96 kHz than on 44,1 kHz files.

This is just a 6 sec 24 bit clip from an analogue recording of an Tears for Fears maxi, but it shows the difference.

clip_24_44,1.zip (flac, ape + wav original)
CODE
Filename             Filesize   Percent
clip_44,1khz.wav     1560 kB    100%
clip_44,1khz.flac    1549 kB    99,3%
clip_44,1khz.ape     1261 kB    80,8%


clip_24_96.zip (flac, ape + wav original)
CODE
Filename             Filesize   Percent
clip_96khz.wav       3395 kB     100%
clip_96khz.flac      2433 kB     71,7%
clip_96khz.ape       2159 kB     63,6%
Subfader
same here. did a test for 24 / 96 tape recording and it was encoding fine. higher than wavpack but ok.
24/96 wav - 182 MB
24/96 wv - 102 MB
24/96 flac - 115 MB

so it seems flac has just problems with analog recordings in 24 bit / 44 and 48 kHz
SebastianG
Looks like FLAC is misinterpreting your audio signal and failing to predict the samples properly (just my guess).

If your 16/44 file compresses to 74,2% the 24 bit version (assuming the same "loudness") should have been compressed to something around (100%*8+74.2%*16)/24 ~= 83% or better.

Sebi
Emanuel
QUOTE(SebastianG @ Jan 2 2006, 11:24 AM)
Looks like FLAC is misinterpreting your audio signal and failing to predict the samples properly (just my guess).
*


Sounds reasonable.

Josh, we appreciate the amount of time you're putting in your project. Please keep us informed in how the 24bit issue is proceeding.

Regards,
rompel
QUOTE(Subfader @ Dec 27 2005, 03:02 PM)
Hi, i wonder why a wav recorded and mastered at 24 bits only causes a flac compression ratio of 95%+ while the same file at 16 bit is ~75% ?
I made a little test: i had a 24 bit / 48 kHz source file which i saved in 4 different wav's and encoded them in FLAC at level 8:

24/48 - 99,4% compression ratio
24/44 - 99,9%
16/48 - 72,4%
16/44 - 74,2%

was it just good mastering at 24/48 so it "comletely filled all bits"?
*


First, as Sebi indicated, a well-behaved codec would be expected to compress the 24-bit version somewhat worse, around 83% for the 24/44 file. However, the FLAC format suffers a limitation that severely limits its ability to compress "loud" 24-bit files: the Rice parameter is limited to the range 0-14. If the residuals for a subframe are too large, the encoder is forced to choose between a) using a suboptimal Rice-encoding with k=14, b) using SUBFRAME_VERBATIM (resulting in a slight expansion of the input), or c) using the Rice escape code, which will usually be somewhat suboptimal depending on the distribution of residuals.

A cursory examination of an encoding of the file you posted shows over half the subframes are of type SUBFRAME_VERBATIM, so you are clearly bumping into this limit. Also, the rest of the subframes all have partition_order=0 which is circumstantial evidence that they have saturated the Rice parameter.

Josh: I recall reading somewhere that the Rice escape was disabled in the reference encoder at some point. Can you confirm or deny this? If it was disabled, does the decoder still correctly handle it?

--John
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.