How to transcode FLAC to MP3 (Ubuntu CLI)

Install necessary packages.

sudo apt-get install flac lame

Make sure all of your FLAC files are in the same folder and run the appropriate command:

FLAC -> 320

for f in *.flac; do flac -cd "$f" | lame -S -h -b 320 --ignore-tag-errors - "${f%.*}".mp3; done

FLAC -> V0

for f in *.flac; do flac -cd "$f" | lame -S -V 0 --vbr-new --ignore-tag-errors - "${f%.*}".mp3; done

FLAC -> V2

for f in *.flac; do flac -cd "$f" | lame -S -V 2 --vbr-new --ignore-tag-errors - "${f%.*}".mp3; done