Compression Level in FLAC

Posted by: Rockingdoc on 29 January 2011

dBpoweramp, and I suppose other rippers, offers a choice of compression applied in FLAC. The default is set in the middle at "5". Any ideas what level of compression we should use?
Posted on: 29 January 2011 by garyi
Its not really that important, I guess you could eek like a meg in every 100 to save your harddrive but hardly worth the effort.
Posted on: 29 January 2011 by likesmusic
The more compression you go for, the longer it takes to compress - the differences are quite considerable, and you don't save a vast amount of storage. Decode times stay low and almost constant - sometimes higher compression is actually quicker to decode, just depends on the type of music. So 5 is reckoned to be the best blend of encoding effort  and space saving.

Here is the official FLAC site's comparison table:

http://flac.sourceforge.net/comparison_all_ratio.html
Posted on: 29 January 2011 by Graham Russell
I set Flac compression level to 0. When I tested different Flac compression levels last year I heard a difference between 5 and 0, with 0 sounding fuller and more dynamic.

Mathematically there shouldn't be a difference between levels as it is a lossless compression, however, there is an impact on the decode hardware streaming in real-time.

I also store Wav versions of everything too. On the KDS Wav sounds better than Flac.

Happy playing

Graham
Posted on: 29 January 2011 by likesmusic
According to the link to some tests I posted above from FLACs own official site, the total decode time for some test pieces compressed to level 5 is actually LESS than the same pieces compressed to level 0; 5:23.16 for Level 5 as opposed to 5:37.51 for level 0.

In terms of  CPU time alone FLAC 0 was slightly quicker than FLAC -5; 2:16.09 compared to 2:22.41, but if this very slight increase in CPU time has an audible effect in your system, then surely something is terribly wrong.
Posted on: 29 January 2011 by garyi
Graham you need to get real man. We cannot put the same bullshitometer of audiophile language into computer files. We just cannot allow ourselves to do it. The rest of the internets will laugh at us.
Posted on: 30 January 2011 by Rockingdoc
and that's only if they don't notice the spirit-level topic first
Posted on: 30 January 2011 by Simon-in-Suffolk
To the comment on CPU load, one effect you can hear is that increased CPU activity can more noise on the power rails in the device. Unless really diligently decoupled this noise will couple to the clocking circuitry and start to cause increased jitter and/or analogue noise. I read somewhere that Naim were mindful of this in the design of the HDX. I suspect it is this that is heard with some devices on different FLAC compression settings.

Posted on: 30 January 2011 by likesmusic
But the increase in CPU load between FLAC 0 and FLAC -5 is,  on average, a negligible 3%. So if that 3% causes an audible problem because of noise on the power rails, then by the same token the other 97%-ish  common to decoding either must be be putting vastly more noise on the power rail, and so if the DAC is susceptible to such noise whether it is decoding FLAC 0 or FLAC 5 makes not much difference, it is just not up  to the job either way.

Since FLAC is designed to be easy and fast to decode even for modest devices, I would have hoped that a £10k product like the o/p's KDS should be able to do so easily without any issues.

If it can't, what chance has it got with hi-res?
Posted on: 30 January 2011 by Simon-in-Suffolk
Hi - I can't disagree with your conclusion

Simon
Posted on: 30 January 2011 by james n
I found this comment on the Linn Forum from one of its engineers which you may be interested in

We have done extensive measurements on power supply disturbance recently, and have compared results for both FLAC and WAV streaming. Our findings are as follows :

1. If we measure the power rail that feeds the main processor in the DS we can clearly see identifiable disturbance patterns due to audio decoding and network activity. These patterns do look different for WAV and FLAC - WAV shows more clearly defined peaks due to regular network activity and processing, while FLAC shows more broadband disturbance due to increased (but more random) processor activity.

2. If we measure the power rails that feed the audio clock and the DAC we see no evidence of any processor related disturbances. There is no measurable difference (down to a noise floor measured in micro-volts) between FLAC and WAV in any of the audio power rails.

3. Highly accurate measurements of clock jitter and audio distortion/noise also show no difference between WAV and FLAC.

The extensive filtering, multi-layered regulation, and careful circuit layout in the DS ensure that there is in excess of 60dB of attenuation across the audio band between the main digital supply, and the supplies that feed the DAC and the audio clock. Further, the audio components themselves add an additional degree of attenuation between their power supply and their output. Direct and indirect measurements confirm that there is no detectable interaction between processor load and audio performance.

One thing that isn't mentioned is internal screening around the board itself. On the KDS this is taken very seriously with internal areas milled into the casing for the processor / audio / psu sections, unlike the ADS / MDS. So there is still the issues of radiated noise from various components affecting others.

James
Posted on: 30 January 2011 by likesmusic
So .. there you go .. more facts.  If your player is designed right, FLAC shouldn't be a problem. And choosing between FLAC 5 and FLAC 0 or any other level should be down to whether you want to trade the extra encoding time for the space saving.
Posted on: 30 January 2011 by james n
Although just to throw a fly in the ointment, from Naims white paper on the NDX

Uncompressed audio data will always give better results than compressed. Even lossless compression may not reproduce audio with equivalent quality to the uncompressed original as the processing required to uncompress the data increases the computational load. This raises the power supply noise floor, which detracts from the sound quality.

Posted on: 30 January 2011 by likesmusic
That's not a fly in the ointment at all! 

I conclude:

A Linn  DS has been engineered to decode FLAC without noise intruding on the power supply to the clock or the DAC.

A Naim NDX hasn't.

(It also follows, to me, that if you have a KDS and FLAC 5 sounds different to FLAC 0 then it may be broken).
Posted on: 30 January 2011 by james n
Or Naim are just being honest and at this price point and given a single box solution, interaction between the 'noisy' and 'sensitive' parts of the device can be minimised with good engineering (multiple supply regulation, careful earthing arrangements) but not eliminated.

Given that storage is so cheap these days i don't see the point in using Flac (not that i can in my Mac centric world)

James
Posted on: 30 January 2011 by Simon-in-Suffolk

James, you have a point to an extent, however if there is an underlying weakness in terms of RFI/EMC/noise decoupling between the logic and analogue parts of the player - it would imply there could be possible compromises or distortion effects when high definition formats are decoded which are more intensive per unit of time on the power rails than low lower defintion formats, which could undermine the benefit of using these formats.

Simon

 

Posted on: 30 January 2011 by garyi
I just don't believe that these differences can be heard and I call shenanigans on anyone who says they can.

You are talking a 3% difference on processor load, and lets remember they are not saying your processor will be working 3% harder only that the difference between 0 and 5 is 3%.  For a processor this might mean in real terms .00001% more effort. Furthermore there is no reason to believe or indeed evidence that a 00001% difference on processor load is making any changes to the audio. 

And someone somewhere with a beard is stroking it and saying they can hear a difference. Shenanigans pure and simple. Prove it.
Posted on: 30 January 2011 by sbilotta
FWIW - I decode all my audio to FLAC 0 as when i did specif tests between WAV, FLAC 8 and 0, FLAC 0 was as good SQwise as WAV, unlike FLAC 8. This was also before I read the NDX white paper mentioned above.
However it must be said that I used an old, but dedicated, W7/Foobar laptop for this, feeding a nDac/555PS.
The reason I decode to FLAC, and not WAV, is not for space saving but for tag support assurance between digital sources as I will be moving on from my current laptop to something better in the near future. Once moved on, if it supports tags for wav (as decoded by dbpoweramp), I will move to wav, as in a few previous tests I did find "some" songs sound better in WAV, obviously not fully understanding why so.
Posted on: 30 January 2011 by Simon-in-Suffolk
Hi I settled on FLAC 4. On my Squeezebox Duet player I could hear differences, albeit sublte on FLAC 8, but I could hear no dofferences between FLAC 0 and FLAC 4, but this receiver does not have enough grunt to do hires rendering.
Posted on: 30 January 2011 by sbilotta
Yes, it must be said that the differences I speak of are subtle.. but there.
Posted on: 30 January 2011 by Simon-in-Suffolk
Gary if you can't hear any differences - then great - you are lucky, but not everyone is as fortunate as you. BTW I am not quite sure what you mean processor load, that is a subjective assessment, are you referring to load in current, the decrease in NOPs or what? Differnt CPU/Microcontroller instructions do cause differnt EM radiation. These affects do exist, but with good design with EMC/RFI and powerline decoupling can be made irrelevant. However it is precisely this affect that allows the reverse enginerring of security chips on smart cards. I won't say where but I have been to a facility not in the UK where exactly this is done - it was absolutely faciscnating.
I seem to remember the white paper by Naim on the design of the HDX discussed some of these concepts and thier design considerations - another interesting read.

Simon
Posted on: 30 January 2011 by garyi
Simon the more you get technical the more your argument disintegrates. Prove you can hear the difference.

You are saying that a micro change in EM radiation and you can hear that. Thats what you are saying right there.

Tell us how does the sound change? Can you prove its not you, the electrical supply at the time, wax in your ears, how tired/awake you are etc etc. Micro tiny changes in EM, and you are certain its because of a 3% difference in compression rates of a flac file on a modern computer?

Are you Number 5 or something?
Posted on: 30 January 2011 by Graham Russell
This "prove it" argument is one reason why I've moved to vinyl

I don't feel I have to prove anything to anyone. I've settled on a ripping/streaming solution that works for me. Other are reporting sonic differences between compression levels and Flac/Wav too.

Spend time listening and work out what works best for you.
Posted on: 30 January 2011 by Simon-in-Suffolk
Gary, I know the forum can't quote at the moment with my browser, but I have no argument I am just stating my personal expieriences, there is no magic or subversive intent???
As I say and have said before HiFi is a personal expierience, and what sounds good for me does not neccessarily sound good for everyone else, we all listen to things differently.  I am fortunate as I am a professional electronics and computer engineer so I know the physics involved so its not all magic to me. But like many of us I have developed my hifi (and other) systems over many years experimenting of what sounds good for and what doesn't.
Can't quite understood your aggression, as I said if all is ok for you and you can't hear differences in certain configurations and equipment setups then great - I would not get up set about it.

Cheers

Simon
Posted on: 30 January 2011 by Simon-in-Suffolk
Graham - absolutely, its all part of the fun of the hobby experimenting what sounds good to us and what doesn't. Although we are not supposed to mention it on this forum those who are inclined can have a lot of fun designing or modifying thier equipment to see what works and what doesn't. I have been experimenting adding inductance to some interconnects today, and yes it changed the charactersitic of the interconnect - I won't say better or worse but it changed :-)
Simon
Posted on: 30 January 2011 by likesmusic
There is no good reason that any level of FLAC compression should sound any different from any other. 

If they do, then I would argue that whatever does the decoding is badly designed. 

So, if your network player  makes FLAC 5 sound worse than FLAC 0  or WAV, then your network player is the problem, not FLAC. 

Linn are big FLAC fans; it is their recommended format;  they've evidently gone to some trouble to make sure the processor that does the decoding is isolated from the audio. And their DS just does one job - it is a network player end of story, so they have just one thing to focus their design and implementaton on.

Naim have been, historically at least, big WAV fans. The NDX does all sort of extra things - s/pdif inputs, ring buffering, apple interacting, usb stick decoding, so evidently FLAC decoding is not it's strong point. 

Customers will choose.