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: FLAC Encoding Options (Read 4934 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

FLAC Encoding Options

I have read FLAC's "--help", the man-page, and the HTML documentaion, but there are a few things that I don't understand.

1. I'll start with the thing I'm most confused about. The --best option is synonymous with -l 12 -b 4608 -m -e -r 6. Why is that? Is not -l 32 better that l- 12? And you can have -r 0,8 without using --lax, and -r 0,16 with --lax.

2. The --lax option allows the encoder to generate "non-Subset files", but just what is a non-Subset file? The HTML documentation says that these files may not be streamable, but if I don't need streamable files, is there any reason not to use --lax?

3. I made a FLAC file without a seektable, and I could seek in it using XMMS in GNU/Linux and in Winamp in Windows. Are there any applications that require a seektable for seeking to work?

4. What does the -p option do? The HTML documentation only says "Exhaustively search LP coeff quantization", and that it's expensive and overrides any -q option. Just what is "LP coeff quantization"? I tried using this option on several files, but it resulted in larer files that without it, why is that? The documentation says that it "typically will only improve the compression a tiny fraction of a percent", not make larger files.

Oskar

FLAC Encoding Options

Reply #1
1. --best means "practical best" in that you are unlikely to get more than a fraction of a percent better compression without the time consuming process of tailoring the options to each individual file.

2. the FLAC subset is explained on the format page.  --lax just turns off the check that stops you from making a non-subset file.  you don't need to use it unless you use some options that are not in the subset and you get an error message.  I would still recommend against except for specific applications because you are limiting the usefulness of the file usually for no gain.

3. a seek table will improve the seek performance but it is not required.  if you are thinking about leaving it out to save space, that's probably not a good tradeoff since the table is so small.

4. you have to understand the format doc to understand -p.  the reason it does not always decrease the file size is due to how accurately the encoder can predict the final frame size as it searches through the encoding parameter space.

Josh

FLAC Encoding Options

Reply #2
1. There are several settings that compress better than --best.
One is: flac --super-secret-totally-impractical-compression-level (--lax -P 4096 -b 4608 -m -l 32 -e -E -p -q 0 -r 0,16)

Take a nap, then come back some hours later for your compressed files!

FLAC Encoding Options

Reply #3
Quote
1. --best means "practical best" in that you are unlikely to get more than a fraction of a percent better compression without the time consuming process of tailoring the options to each individual file.


Thanks for your reply, this cleared up a lot!

Quote
2. the FLAC subset is explained on the format page. --lax just turns off the check that stops you from making a non-subset file. you don't need to use it unless you use some options that are not in the subset and you get an error message. I would still recommend against except for specific applications because you are limiting the usefulness of the file usually for no gain.


Is the usefulness of the file limited in any other way than the file not beeing streamable?

Quote
3. a seek table will improve the seek performance but it is not required. if you are thinking about leaving it out to save space, that's probably not a good tradeoff since the table is so small.


Does applications like XMMS and Winamp that can seek in files without a seektable make any use of the seektable? Are there any commonly used applications that need a seektable in order for seeking to work? Am I right in assuming that even though seeking in small files work well without a seektable (at least in some applications), seeking might be problematic if the file is 2 huors long and has no seektable?

Quote
1. There are several settings that compress better than --best.


Thanks, I didn't know about this one. Several? What other are there? Why is it secret?

Quote
One is: flac --super-secret-totally-impractical-compression-level (--lax -P 4096 -b 4608 -m -l 32 -e -E -p -q 0 -r 0,16)


This is a bit confusing, for two reasons:
a) What does the -E option do? It is not mentioned in the "--help", man-page or HTML documentation.
b) "-p: Do exhaustive LP coefficient quantization optimization. This option overrides any -q option." So why the -q 0?

Oskar

FLAC Encoding Options

Reply #4
Quote
Is the usefulness of the file limited in any other way than the file not beeing streamable?

it could be... if you choose a big blocksize you might have trouble playing it back on some hardware players with limited memory.

Quote
Does applications like XMMS and Winamp that can seek in files without a seektable make any use of the seektable? Are there any commonly used applications that need a seektable in order for seeking to work? Am I right in assuming that even though seeking in small files work well without a seektable (at least in some applications), seeking might be problematic if the file is 2 huors long and has no seektable?

the xmms/winamp plugins benefit from the seektable.  actually anything that decodes using libFLAC does.  without a seektable, the seek routine has to binary-search through the whole file, so the longer the file, the longer that will take.  another case it might be useful: seeking forward through a non-seekable i/o channel could be faster with a seektable since it could be done mostly with skipping instead of decoding.

Quote
Thanks, I didn't know about this one. Several? What other are there? Why is it secret?

there are no others.  it's "secret" (it used to be "-9") because people kept using it and complaining that flac encodes slow and it doesn't compress any better.  its only practical use is for testing the encoder.

Quote
a) What does the -E option do? It is not mentioned in the "--help", man-page or HTML documentation.

it is deprecated and will be removed in FLAC 1.1.3.  it used to turn on escape coding of the residual (see the format page for explanation).

Quote
b) "-p: Do exhaustive LP coefficient quantization optimization. This option overrides any -q option." So why the -q 0?

-q 0 is not needed in that case.

Josh