FFMPEG's FLAC Compression Levels & Defaults Settings

Techie Android picture Techie Android · Jun 30, 2017 · Viewed 7.2k times · Source

I have searched for the documentation on this but found no information.

I'm using the latest FFMPEG nightly build in Windows 10 Insider Build (also latest) 64 Bit.

I need to know how to define the compression level of FLAC files.

Also, by default does FFMPEG change anything in the FLAC files. Here's an example: Let's say I have an unaltered source FLAC file that I convert to FLAC again inside FFMPEG what will change by default when it processes it? Is there any way to make sure FFMPEG does not alter the original quality? I'm aware that FLAC is lossless but I thought it might change the bit depth or bit rate.

Answer

Gyan picture Gyan · Jun 30, 2017

There's a generic option that is picked up by the FLAC encoder

ffmpeg -i in.wav -compression_level 8 out.flac

Vales go from 0 to 12. Default is 5.

The FLAC encoder works with either 16 or 32 bit samples. Other sizes will be stored as one of these two options.