IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
How to determine a FLAC file's compression setting
petteri
post Jan 31 2005, 20:56
Post #1





Group: Members
Posts: 18
Joined: 22-January 05
Member No.: 19223



I have a few CD's I've ripped to FLAC and I can't recall what compression setting was used. Is there a way to tell? How can I transcode these to setting -8 if they were ripped at the "wrong" setting, ie -1 or -5? Thanks!

Peter
Miami,FL USA
Go to the top of the page
+Quote Post
Skymmer
post Jan 31 2005, 23:08
Post #2





Group: Members
Posts: 112
Joined: 11-June 03
Member No.: 7132



Hmmm... Why you call -1 or -5 "wrong" setting? It's just the freedom of choise.
I don't know if compression settings are stored in FLAC files.
For converting you can use Foobar with FLAC decoder (foo_flac) and FLAC encoder (foo_flaccer) components.


--------------------
Gabber, Jazz and IDM
Go to the top of the page
+Quote Post
petteri
post Jan 31 2005, 23:26
Post #3





Group: Members
Posts: 18
Joined: 22-January 05
Member No.: 19223



QUOTE (Skymmer @ Jan 31 2005, 05:08 PM)
Hmmm... Why you call -1 or -5 "wrong" setting? It's just the freedom of choise.
I don't know if compression settings are stored in FLAC files.
For converting you can use Foobar with FLAC decoder (foo_flac) and FLAC encoder (foo_flaccer) components.
*



By wrong I mean I may have made a miskate with the setting I choose. That's why I put the word wrong in quotes. Is foobar my only choice? Can Flac Frontend do this? Thanks!

Peter
Go to the top of the page
+Quote Post
jcoalson
post Jan 31 2005, 23:31
Post #4


FLAC Developer


Group: Developer
Posts: 1526
Joined: 27-February 02
Member No.: 1408



the encoder compression level setting is not stored by default, unless some third-party tool is doing it. it's possible to analyze (with flac --analyze) the frame headers in a FLAC file to guess though. but you have to understand the format well.

Josh

p.s. on the TODO list is to add support in flac (i.e. flac.exe) for FLAC files as input, which would make recompressing easier since it would keep all the metadata, e.g. "flac -8 somelevel5.flac -o level8.flac"

This post has been edited by jcoalson: Jan 31 2005, 23:34
Go to the top of the page
+Quote Post
petteri
post Jan 31 2005, 23:46
Post #5





Group: Members
Posts: 18
Joined: 22-January 05
Member No.: 19223



QUOTE (jcoalson @ Jan 31 2005, 05:31 PM)
the encoder compression level setting is not stored by default, unless some third-party tool is doing it.  it's possible to analyze (with flac --analyze) the frame headers in a FLAC file to guess though.  but you have to understand the format well.

Josh

SNIP


Are you referring to the block size? That is what tipped me off that I may have used a setting I didn't intend to. I took a look at the file info under Winamp for a FLAC file and it listed the block size (I don't realy know what that is) as 1152. I then looked at the FLAC homepage and that seem sto correspond to setting -0 or -1 not -8 which is what I had intended to use.
Go to the top of the page
+Quote Post
jcoalson
post Feb 1 2005, 01:13
Post #6


FLAC Developer


Group: Developer
Posts: 1526
Joined: 27-February 02
Member No.: 1408



that's one clue. analysis mode will also tell you if LPC frames were used (a signed of -l not being 0), and the max LPC order used in the stream (the lower bound on the -l number used), max rice partition order (-r setting). if stereo and there are mid/side frames then -m or -M was used. also if mid/size switching occurs too fast then -m and not -M was used (-M will use the same mid/side switching choice for samplerate*0.4/blocksize frames, -m can change the channel assignment each frame).

Josh

edit: the "samplerate*0.4/blocksize" formula is a property of libFLAC, beginning from the time the loose-mid/side setting was introduced. how channels are assigned by the encoder is not specified by the format so this is a clue only with the assumption that the file was encoded by libFLAC. even future versions of libFLAC may change the switching behavior.

This post has been edited by jcoalson: Feb 1 2005, 01:16
Go to the top of the page
+Quote Post
petteri
post Feb 1 2005, 01:25
Post #7





Group: Members
Posts: 18
Joined: 22-January 05
Member No.: 19223



Here is a clip from a FLAC that I wanted to be compression level 8:

frame=32 blocksize=1152 sample_rate=44100 channels=2 channel_assignment=INDEPENDENT
subframe=0 wasted_bits=0 type=LPC order=4 partition_order=0 qlp_coeff_precision=10 quantization_level=8
warmup[0]=103
warmup[1]=112
warmup[2]=132
warmup[3]=133
subframe=1 wasted_bits=0 type=LPC order=8 partition_order=0 qlp_coeff_precision=10 quantization_level=8
warmup[0]=-671
warmup[1]=-678
warmup[2]=-750
warmup[3]=-813
warmup[4]=-785
warmup[5]=-772
warmup[6]=-769
warmup[7]=-740


What can this tell you? Thanks!
Go to the top of the page
+Quote Post
jcoalson
post Feb 1 2005, 02:31
Post #8


FLAC Developer


Group: Developer
Posts: 1526
Joined: 27-February 02
Member No.: 1408



there is not much one frame can tell you. a blocksize of 1152 and LPC frames means that it is not strictly any one of the compression levels -0 .. -8

Josh
Go to the top of the page
+Quote Post
petteri
post Feb 1 2005, 03:49
Post #9





Group: Members
Posts: 18
Joined: 22-January 05
Member No.: 19223



QUOTE (jcoalson @ Jan 31 2005, 08:31 PM)
there is not much one frame can tell you.  a blocksize of 1152 and LPC frames means that it is not strictly any one of the compression levels -0 .. -8

Josh
*



Thanks for your help in this. How many frames would be of value? Would you mind checking any more if you'd think it could help? Does it matter what type of music the sample is from? The above is a Grateful Dead song. Thanks again.

Peter
Miami, FL USA
Go to the top of the page
+Quote Post
geopoul
post Feb 1 2005, 03:50
Post #10





Group: Members
Posts: 42
Joined: 12-December 04
Member No.: 18631



Why don't you just reencode with foobar. You can leave your pc do this job during night. This is far easier than trying to figure out which settings had been used during initial encoding.

edit: typos

This post has been edited by geopoul: Feb 1 2005, 03:51
Go to the top of the page
+Quote Post
jcoalson
post Feb 1 2005, 08:32
Post #11


FLAC Developer


Group: Developer
Posts: 1526
Joined: 27-February 02
Member No.: 1408



QUOTE (petteri @ Jan 31 2005, 09:49 PM)
Thanks for your help in this.  How many frames would be of value?
all of them, for the best estimate.
QUOTE (petteri @ Jan 31 2005, 09:49 PM)
Would you mind checking any more if you'd think it could help?
it's time consuming, so I'd rather teach people how to do it.
QUOTE (petteri @ Jan 31 2005, 09:49 PM)
Does it matter what type of music the sample is from?
no.

Josh
Go to the top of the page
+Quote Post
kjoonlee
post Feb 1 2005, 08:36
Post #12





Group: Members
Posts: 2525
Joined: 25-July 02
From: South Korea
Member No.: 2782



If you only have a few albums to check, it won't take that long to decode and reencode with -8. foobar2000 can do it for you, copying the tags over automagically.

If you decide to do it manually, foobar2000 can copy the tags over for you too.


--------------------
http://blacksun.ivyro.net/vorbis/vorbisfaq.htm
Go to the top of the page
+Quote Post
petteri
post Feb 1 2005, 23:13
Post #13





Group: Members
Posts: 18
Joined: 22-January 05
Member No.: 19223



QUOTE (jcoalson @ Feb 1 2005, 02:32 AM)
QUOTE (petteri @ Jan 31 2005, 09:49 PM)
Would you mind checking any more if you'd think it could help?
it's time consuming, so I'd rather teach people how to do it.

Josh
*



Thanks for the help. I might as well just reencode them with foobar. Problem is I've never used it before. I'm using Winamp to play the files. Foobar totally baffles me. My thinking now is to just ignore it. Thanks again. Perhaps in a later version of FLAC I may reencode the whole lot of my collection if the compression improves markedly.

Peter
miami, fl usa
Go to the top of the page
+Quote Post
Zoom
post Feb 1 2005, 23:18
Post #14





Group: Members (Donating)
Posts: 263
Joined: 23-February 04
From: United States
Member No.: 12219



Why not just use FLAC frontend? http://members.home.nl/w.speek/flac.htm

It will decode and encode the files for you. If you haven't used foobar before, it can be a bit daunting. FLAC frontend is a little easier to use. I use it and have so far had great results.
Go to the top of the page
+Quote Post
petteri
post Feb 2 2005, 00:14
Post #15





Group: Members
Posts: 18
Joined: 22-January 05
Member No.: 19223



QUOTE (Zoom @ Feb 1 2005, 05:18 PM)
Why not just use FLAC frontend? http://members.home.nl/w.speek/flac.htm

It will decode and encode the files for you. If you haven't used foobar before, it can be a bit daunting. FLAC frontend is a little easier to use. I use it and have so far had great results.
*


I tried that. It told me that it could only encode .wav files. Unless I'm missing something. In anycase I'll live with my mistakes. I'll just make sure I have all my settings down pat before I begin another ripping session.

Peter
Miami, FL USA
Go to the top of the page
+Quote Post
DonP
post Feb 3 2005, 01:42
Post #16





Group: Members (Donating)
Posts: 1442
Joined: 11-February 03
From: Vermont
Member No.: 4955



dbpoweramp converter will do flac to flac transcode easily. You could do just one and see if the file size changes to find out if you did it "wrong" to begin with.
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: 20th May 2013 - 02:51