Technology / Software / 

19 Jun 2017

FLAC to MP3 in one line

Uses/requires LAME, and assumes that all the FLAC files are in the working directory and have the suffix .flac; resulting MP3 output will have the same basename but suffixed .mp3.

Bash for f in *.flac; do flac -cd "$f" | lame -V6 - "${f%.*}".mp3; done

At one point I thought LAME had to be compiled from source or pulled from a non-free repo on Debian, but it looks like it’s in the main repos now (2022).