Ubuntu – How to specify flac compression level when converting with avconv

aacavconvconvertflac

I am trying to convert some aac files to flac files, because aac is not supported by another device I use.
After some multiple attempts to find a solution, searching the Internet, I finally read that ffmpeg was replaced with avconv and that avconv is a fork of ffmpeg. So I searched for how to convert to flac using avconv and found this line:

avconv -i (input file) -f flac (output file path)

This works well, however, I don't see any flac compression level in that command and I need to have a compression level of 2 or lower, because of cpu resources on the target device. I checked the man-page for avconv, but it doesn't seem to mention flac compression levels at all.

So my question is: How do I specify the flac compression level when converting from any input format to flac using avconv?

Best Answer

There is a -compression_level attribute. Man page gives its format as

-compression_level[:stream_specifier] integer (output,audio,video)

You will likely not need to specify the stream, since you have only a single one in the file, so -compression_level 2 is your friend.

In the future you may want to check man page for the tools.

  1. Open the terminal.
  2. Type man (name of program). For example man avconv.
  3. To search the manual, press '/' and enter the string to search for. In this case i've done '/compression', this was the second thing that was found.