Log in

View Full Version : Using FFmpeg to encode flac?


marcusj0015
5th March 2013, 23:27
I'm trying to encode flacs with ffmpeg, using the highest compression settings possible, but it's a pain in the ass to find any info on ffmpeg's flac encoder's options.

Anybody got any ideas?

wonkey_monkey
6th March 2013, 00:35
As far as I can tell it's "-compression_level", as in:

ffmpeg -i input.wav -acodec flac -compression_level 12 out.flac

David

marcusj0015
6th March 2013, 08:45
-compression_level is the only option I know offf. :/ I was hoping for stuff like -e (exhaustive search) and stuff like that. :/

nevcairiel
6th March 2013, 09:45
The flac encoder has following options in ffmpeg, in addition to the global compression_level:


lpc_coeff_precision - LPC coefficient precision. 0-15, default 15
lpc_type - LPC algorithm. none/fixed/levinson/cholesky
lpc_passes - Number of passes to use for Cholesky factorization during LPC analysis. 1-INT_MAX, default 2
min_partition_order - -1-8, default -1
max_partition_order - -1-8, default -1
prediction_order_method - Search method for selecting prediction order. estimation/2level/4level/8level/search/log, default: auto-select
ch_mode - Stereo decorrelation mode. auto/indep/left_side/right_side/mid_side, default: auto


Not sure if it contains what you want, but keep in mind that encoders are quite different, and the reference flac encoder might have completely different algorithms and different options.

marcusj0015
9th March 2013, 10:54
What does the partition order thing mean? Does that mean like, which channel is in which order of the file?

nevcairiel
9th March 2013, 12:32
No, its just a small difference how residuals are coded. This corresponds to the "-r" paramter on the reference encoder.

marcusj0015
9th March 2013, 12:43
Thanks, also what does INT_MAX mean for the lpc option? Like, it obviously means integer max, but what IS the max integer? or do you just type in INT_MAX as a flag for that command, kinda like a variable?

nevcairiel
9th March 2013, 13:58
INT_MAX is 2147483647, but that value will hardly make any sense. It just indicates there essentially is no upper bound, except you want more than 2.1 billion passes, a value which defaults to 2, not 2 billion. :D