If FLAC is lossless why does encoding level matter?

Discussion in 'Audio Hardware' started by audiodrome, Feb 16, 2008.

Thread Status:
Not open for further replies.
  1. audiodrome

    audiodrome Well-Known Member Thread Starter

    North Of Boston
    If FLAC is lossless, why would it matter if I set the encoding level to 5 or 8 or whatever? Isn't the quality the same now matter which level you use?
  2. Yes. The tradeoff is how small you can make the encoded file, vs. how much time and computer resources are required for encoding/decoding.
  3. reverber

    reverber Active Member

    Lawrence KS, USA
    The encoding level affects the amount of reduction of the file size and the amount of time that reduction takes.
    Think of flac as a specialized zip for wav files. It compresses files, not the audio in those files.

  4. audiodrome

    audiodrome Well-Known Member Thread Starter

    North Of Boston
    I get it - it's more of a "convenience" issue.
  5. Max F

    Max F Member

    There is no decoding hit by using the most compressed value of 8. For a little processing time up front (encoding) you get a smaller file with no extra time needed to decode. When ripping using test&copy the added time for encoding is only around one extra minute after ripping (for my computer). Thats why I recommend just setting it to 8 and forget about it.
  6. tps

    tps Active Member

    Philadelphia, PA
    As I understand it, lossless encoding is sort of a "trial and error" process, so far as getting the smallest resulting file. ALL encoding attempts will produce files which decode with an identical result. The encoding level specifies how hard FLAC should try to get the SMALLEST encoded file. As with most other things, it takes a lot of effort to get the last little bit, which is probably why "5" is the default. However, with fast, modern CPUs, unless one is extremely impatient, there's no good reason I can see not to use "8" so it will make an exhaustive effort to get the the smallest encoded file.
  7. Ctiger2

    Ctiger2 Well-Known Member

    Basically... how small of files do you want, and how long are you willing to wait for the encoding process.
  8. semidetached

    semidetached Monkees Mixographist

    Bucks County, PA
    I let mine run overnight (usually), so 8 is never really an option for me. I could use the extra space.
  9. I Am The Lolrus

    I Am The Lolrus New Member

    LA, CA, US
    Not really, its more about what your device can handle... say you wanted a slower mp3 player to play the flac file... if its encoded at lvl 1-5 or something, it requires fewer resources and thus could play it (at the expense of a little more disk space required).
  10. RadioClash

    RadioClash Well-Known Member

    I don't believe the decoding process is effected by the encoding level.
  11. I Am The Lolrus

    I Am The Lolrus New Member

    LA, CA, US
    You are correct! Here is what they say on their faq
    "Why do the encoder settings have a big effect on the encoding time but not the decoding time?

    It's hard to explain without going into the codec design, but to oversimplify, the encoder is looking for functions that approximate the signal. Higher settings make the encoder search more to find better approximations. The functions are themselves encoded in the FLAC file. Decoding only requires computing the one chosen function, and the complexity of the function is very stable. This is by design, to make decoding easier, and is one of the things that makes FLAC easy to implement in hardware."

    I always thought it was harder, slightly, for the decoder to use the higher levels.. I guess not.
  12. CODOR

    CODOR New Member

    Ontario, Canada
    Yep... FLAC is asymmetric, meaning all the work is done by the encoder -- this is what makes it so nice for portable players: it doesn't need much processor power to decode, even at the higher compression levels.

    Monkey's Audio (APE) on the other hand is symmetric, so the decoder has to do a lot more work (I'm not even sure if my portable will play APE files without skipping). But this also means it can get better compression ratios than FLAC...
  13. markshan

    markshan Forum Resident

    Pittsburgh, PA
    I think this is backward. The larger the flac level, the longer the encode and smaller the file, if I am not mistaken.
  14. Grant

    Grant A Musical Free-Spirit

    I generally use "6".
  15. Vidiot

    Vidiot Now in 4K HDR!

    Hollywood, USA
    The only difference in lossless compression rates is how long it takes to do the encode, and how fractionally larger or smaller the file size is when you finish. I don't think it makes even a 10% difference in the long run.

    And lossless is still lossless. It's still going to sound the same, bit for bit, compared to the original WAV file.

    For more, go over to the Hydrogen Audio forums and read their references on FLAC and other lossless formats. The guys over there have done painstaking tests on different FLAC levels, and found no differences in sound quality (and only very small differences in file sizes).
    o0OBillO0o likes this.
  16. Max F

    Max F Member

    If you don't want to think about it, just use 8 (it really makes when you do actually think about it).
Thread Status:
Not open for further replies.

Share This Page