IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Check FLAC compression method, for already encoded files
Azevedo
post Mar 22 2013, 01:59
Post #1





Group: Members
Posts: 87
Joined: 3-November 08
Member No.: 61632



Hi

Is it possible to determine wich FLAC compression method was used in an already encoded file?
Go to the top of the page
+Quote Post
Kohlrabi
post Mar 22 2013, 09:13
Post #2





Group: Super Moderator
Posts: 1029
Joined: 12-March 05
From: Kiel, Germany
Member No.: 20561



You mean which compression level? Can you be more specific?


--------------------
Ceterum censeo Masterdiskem esse delendam.
Go to the top of the page
+Quote Post
ktf
post Mar 22 2013, 09:53
Post #3





Group: Members
Posts: 360
Joined: 22-March 09
From: The Netherlands
Member No.: 68263



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.
Go to the top of the page
+Quote Post
Kohlrabi
post Mar 22 2013, 10:21
Post #4





Group: Super Moderator
Posts: 1029
Joined: 12-March 05
From: Kiel, Germany
Member No.: 20561



QUOTE (ktf @ Mar 22 2013, 09:53) *
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.


--------------------
Ceterum censeo Masterdiskem esse delendam.
Go to the top of the page
+Quote Post
ktf
post Mar 22 2013, 11:23
Post #5





Group: Members
Posts: 360
Joined: 22-March 09
From: The Netherlands
Member No.: 68263



QUOTE (Kohlrabi @ Mar 22 2013, 10:21) *
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 rolleyes.gif


--------------------
Music: sounds arranged such that they construct feelings.
Go to the top of the page
+Quote Post
skamp
post Mar 22 2013, 11:52
Post #6





Group: Developer
Posts: 1430
Joined: 4-May 04
From: France
Member No.: 13875



QUOTE (Kohlrabi @ Mar 22 2013, 10:21) *
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.


--------------------
See my profile for measurements, tools and recommendations.
Go to the top of the page
+Quote Post
Brand
post Mar 22 2013, 12:04
Post #7





Group: Members
Posts: 317
Joined: 27-November 09
Member No.: 75355



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... wink.gif )
Go to the top of the page
+Quote Post
Azevedo
post Mar 22 2013, 13:30
Post #8





Group: Members
Posts: 87
Joined: 3-November 08
Member No.: 61632



Thanks for all the answers.

QUOTE (skamp @ Mar 22 2013, 07:52) *
QUOTE (Kohlrabi @ Mar 22 2013, 10:21) *
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 biggrin.gif


Go to the top of the page
+Quote Post
pdq
post Mar 22 2013, 13:41
Post #9





Group: Members
Posts: 3394
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



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. wink.gif
Go to the top of the page
+Quote Post
andrew_berge
post Mar 22 2013, 14:21
Post #10





Group: Members
Posts: 108
Joined: 17-November 09
From: Canada
Member No.: 75012



I created a special tag in all my FLAC files to store the compression level, all level 8 smile.gif
Go to the top of the page
+Quote Post
Azevedo
post Mar 22 2013, 14:41
Post #11





Group: Members
Posts: 87
Joined: 3-November 08
Member No.: 61632



QUOTE (andrew_berge @ Mar 22 2013, 10:21) *
I created a special tag in all my FLAC files to store the compression level, all level 8 smile.gif

That's clever!
I should have done this in the old days.
Go to the top of the page
+Quote Post
Kohlrabi
post Mar 22 2013, 15:11
Post #12





Group: Super Moderator
Posts: 1029
Joined: 12-March 05
From: Kiel, Germany
Member No.: 20561



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.


--------------------
Ceterum censeo Masterdiskem esse delendam.
Go to the top of the page
+Quote Post
skamp
post Mar 22 2013, 16:53
Post #13





Group: Developer
Posts: 1430
Joined: 4-May 04
From: France
Member No.: 13875



QUOTE (andrew_berge @ Mar 22 2013, 14:21) *
I created a special tag in all my FLAC files to store the compression level, all level 8 smile.gif


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

This post has been edited by skamp: Mar 22 2013, 16:53


--------------------
See my profile for measurements, tools and recommendations.
Go to the top of the page
+Quote Post
IgorC
post Mar 22 2013, 18:15
Post #14





Group: Members
Posts: 1564
Joined: 3-January 05
From: ARG/RUS
Member No.: 18803



QUOTE (Kohlrabi @ Mar 22 2013, 11: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.

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.
Go to the top of the page
+Quote Post
Porcus
post Mar 23 2013, 11:55
Post #15





Group: Members
Posts: 1842
Joined: 30-November 06
Member No.: 38207



QUOTE (andrew_berge @ Mar 22 2013, 14:21) *
I created a special tag in all my FLAC files to store the compression level, all level 8 smile.gif


All my FLAC files are compression level 8 too, so therefore I don't think I need that tag ;-)


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
Takla
post Mar 23 2013, 20:52
Post #16





Group: Members
Posts: 169
Joined: 14-November 09
Member No.: 74931



QUOTE (Kohlrabi @ Mar 22 2013, 14: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.


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
$ 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
$ 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....
Go to the top of the page
+Quote Post
saratoga
post Mar 23 2013, 23:36
Post #17





Group: Members
Posts: 4925
Joined: 2-September 02
Member No.: 3264



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)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd September 2014 - 08:43