Convert .flac music files to .mp3 on osx

Convert .flac music files to .mp3 on osx


By David WORMS

Jul 20, 2012

File Format
Do you like our work......we hire!

Never miss our publications about Open Source, big data and distributed systems, low frequency of one email every two months.

As an osx user for years now, one should know by then that iTunes doesn’t support the flac format. We are now in 2012, I’ve been waiting for this to happen since years know. Loosing patience, dark time for Apple. In the meantine, for the record, here a how to convert flac files into an mp3 format.

After preparing our system, we’ll be left with a single shell command which will look for all the .flac file inside a current working directory and generate a copy of the same name with a mp3 extension.


Quite simple, you’ll need macport installed which itself need an xcode installation (with developer tools if i’m not mistaken).


We need to install two commands which are flac and lame.

sudo port install flac
sudo port install lame


Open the terminal, use cd ... to place yourself into the directory holding your .flac files and finally run:

for file in *.flac; do $(flac -cd "$file" | lame --preset fast extreme - "${file%.flac}.mp3"); done
Share this article

Canada - Morocco - France

We are a team of Open Source enthusiasts doing consulting in Big Data, Cloud, DevOps, Data Engineering, Data Science…

We provide our customers with accurate insights on how to leverage technologies to convert their use cases to projects in production, how to reduce their costs and increase the time to market.

If you enjoy reading our publications and have an interest in what we do, contact us and we will be thrilled to cooperate with you.

Support Ukrain