Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Check FLAC compression method (Read 13125 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Check FLAC compression method

Hi

Is it possible to determine wich FLAC compression method was used in an already encoded file?

Check FLAC compression method

Reply #1
You mean which compression level? Can you be more specific?
It's only audiophile if it's inconvenient.

Check FLAC compression method

Reply #2
You can to a certain extend. You'll have to use the analyse switch present in the flac tools. The analyse file might tell you something, but that is not guaranteed. The compression level only tells the encoder what limits to use (for example, max LPC order of 12) but there's nothing in the decoded file that has to be a certain way because of the compression level.

With normal material (like most music), you can tell which compression level was used with the analyse option.
Music: sounds arranged such that they construct feelings.

Check FLAC compression method

Reply #3
With normal material (like most music), you can tell which compression level was used with the analyse option.
Maybe my imagination is not good enough, but for what purpose does one need information about the compression level? Since FLAC decodes very, very fast across all settings, I don't see any reason to determine the compression level.
It's only audiophile if it's inconvenient.

Check FLAC compression method

Reply #4
I don't see any reason to determine the compression level.

I do not see a reason either, I just tried to answer the question 
Music: sounds arranged such that they construct feelings.

Check FLAC compression method

Reply #5
for what purpose does one need information about the compression level?


That question comes up a lot. Obviously, he wants to find out which FLACs weren't compressed with the maximum compression setting.

Check FLAC compression method

Reply #6
Yep, I'm guessing that's it.
I also like to have all my FLACs compressed at setting 8 and if I get some that aren't, I'll re-compress them. (Even if it doesn't save much space, maybe it's OCD...  )

Check FLAC compression method

Reply #7
Thanks for all the answers.

for what purpose does one need information about the compression level?


That question comes up a lot. Obviously, he wants to find out which FLACs weren't compressed with the maximum compression setting.


Exactly. I have all this flac library 100's Gbytes which is compressed with different ratios (mostly at --best or -8).

I found this way to determine if the compression rate is too low and wasting disk space:
GENERICALLY, in a 2 channel flac, if the Bit Rate is above ~ 1100kbps then is very likely it had been encoded using a low compression method.
Of course it's not a rule. It depends on other factors, but generally I can find the 'fatty' flacs 



Check FLAC compression method

Reply #8
That sounds as though you have a lot of FLAC files that were encoded by someone else. Let's hope that they are all legal copies. 

Check FLAC compression method

Reply #9
I created a special tag in all my FLAC files to store the compression level, all level 8


Check FLAC compression method

Reply #11
IIRC both FLACCL and Flake can compress stronger than FLAC -8. Also, since FLAC encoding is blazing fast too, you can easily run a conversion script across your whole collection to encode everything again.
It's only audiophile if it's inconvenient.

Check FLAC compression method

Reply #12
I created a special tag in all my FLAC files to store the compression level, all level 8


I'm adding 'ENCODING=' (optional) to caudec (for all codecs, not just FLAC).

Check FLAC compression method

Reply #13
IIRC both FLACCL and Flake can compress stronger than FLAC -8. Also, since FLAC encoding is blazing fast too, you can easily run a conversion script across your whole collection to encode everything again.

Flake compresses a bit more than FLAC -8 but at cost of lower decoding speed and incompability in some cases. Official FLAC encoder has some settings which should give the same results as Flake.


Check FLAC compression method

Reply #15
IIRC both FLACCL and Flake can compress stronger than FLAC -8. Also, since FLAC encoding is blazing fast too, you can easily run a conversion script across your whole collection to encode everything again.


flac at default -5 really is fast.  flac -8 is a lot slower, and flake -12 is glacially slow.

I ran flac, flac -8, and flake -12 on the same album.  Between each run I flushed my system's vm cache:

Code: [Select]
$ time flac *.wav
real    0m40.824s
user    0m33.406s
sys    0m2.414s

$ time flac -8 *.wav
real    1m51.575s
user    1m47.745s
sys    0m2.022s

$ time flake -12 *.wav
real    4m1.914s
user    3m56.816s
sys    0m2.090s


I also noticed that the difference in file size between flac -5 and flake -12 for the entire album amounts to about 1.2MB.  The difference bween flac -8 and flake -12 is only 272 kilobytes in favour of flake.  Sometimes flake -12 produces larger files than flac -8 (see tracks 4 and 5).

Code: [Select]
$ du -cs *.flac
33304    01 - Sounsoumba.flac
39812    02 - Sukunyali.flac
31452    03 - Kounadya.flac
40968    04 - Donso.flac
38784    05 - Wele Wele Wintou.flac
29448    06 - Senkele te Sira.flac
31008    07 - Djigui.flac
31912    08 - Seya.flac
47156    09 - Iyo Djeli.flac
37000    10 - Mogo Kele.flac
31900    11 - Koroko.flac
392744    total

$ du -cs flac8/*
33236    flac8/01 - Sounsoumba.flac
39700    flac8/02 - Sukunyali.flac
31372    flac8/03 - Kounadya.flac
40864    flac8/04 - Donso.flac
38732    flac8/05 - Wele Wele Wintou.flac
29368    flac8/06 - Senkele te Sira.flac
30892    flac8/07 - Djigui.flac
31840    flac8/08 - Seya.flac
47016    flac8/09 - Iyo Djeli.flac
36912    flac8/10 - Mogo Kele.flac
31816    flac8/11 - Koroko.flac
391748    total


$ du -cs flake12/*
33200    flake12/01 - Sounsoumba.flac
39620    flake12/02 - Sukunyali.flac
31356    flake12/03 - Kounadya.flac
40924    flake12/04 - Donso.flac
38776    flake12/05 - Wele Wele Wintou.flac
29280    flake12/06 - Senkele te Sira.flac
30896    flake12/07 - Djigui.flac
31808    flake12/08 - Seya.flac
46956    flake12/09 - Iyo Djeli.flac
36852    flake12/10 - Mogo Kele.flac
31808    flake12/11 - Koroko.flac
391476    total


On this album the reduction in file size of flake -12 over flac -5 is less than one third of a percent.

I did the same with another CD and did get a better result - slightly over half a percent reduction.  It's hard to think of any situation where flake is preferable to flac (I want non-compliant files which might not play, which take longer to make and might be bigger than if I used flac? ) and running a conversion script on 100s of GB of flacs to convert them with flake is nutty as well as flakey.   

btw can you imagine doing this and then finding your shiny new playback device/appliance chokes on flake encodes and you have to do it all again in reverse....

Check FLAC compression method

Reply #16
We tested flake in rockbox a while ago.  Its basically the same speed to decode as FLAC:

flake - "15.21MHz" (13.94s), flac - "14.71MHz" (13.48s) (iPod  Nano 2G)