r/audioengineering • u/Lastrevio Hobbyist • Jul 18 '19
Why are there multiple compression levels to flac if it's lossless?
This was something that always bothered me and I wanna find out the answer. In FL Studio, when you export as .flac , you can choose between 8 different levels of compression, the more compression you apply the more it reduces its file size. However, flac is supposed to be lossless compression as far as I know and sound exactly identical to .wav , basically perfect audio, hence lossless.
If so, then why is there the option of having multiple levels of compression in the first place, if there would be no benefit for your file taking up more space in the 1-7 levels of space and the biggest level of flac compression always being the best objectively period? Is there something I'm missing?
35
u/QshelTier Hobbyist Jul 18 '19
I did a small encoding and decoding test with two different files (1305 MiB and 805 MiB).
Draw your own conclusion.
28
u/xmnstr Jul 18 '19
More compression requires more processsing power to encode and decode.
9
u/Chaos_Klaus Jul 18 '19
All audio compression algorithms do regular compression, same as your typical ZIP or RAR file. With lossless algorithms no information is lost. It's just written down in an efficient manner, getting rid of redundant information.
Lossy compression algorithms do the same, but they also drop information that you are very unlikely to miss anyway. A psycho acoustic model determines what information to neglect.
Lossless compression can still be more agressive. It's not a quality trade off. Instead it's a trade off between file size and encoding/decoding time.
5
u/Darko0089 Jul 18 '19
it's always lossless, the more you compress it, the longer it takes to encode, with diminishing returns.
https://en.wikipedia.org/wiki/FLAC#Compression_levels
4
u/SquidleyQbrick Jul 18 '19
It's lossless compression. Still compression. If this concerns you, use an uncompressed format like .wav or .aif
3
u/masta Jul 18 '19
uh.... yeah flac is not psycho-acoustic, so that means it uses traditional compression which has compression levels. I won't go into the details, but it's possible to improve or relax compression in terms of how aggressive it does with tokenizing common patterns in the data stream. Generally when compression level increases the tokenizer looks for smaller pattern sets, or uses a larger dictionary of tokens.
0
u/[deleted] Jul 18 '19
[deleted] — view deleted comment