Convert .flac music files to .mp3 on osx
By David WORMS
Jul 20, 2012
- Categories
- Hack
- Tags
- OS X
- File Format
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.
Requirements
Quite simple, you’ll need macport installed which itself need an xcode installation (with developer tools if i’m not mistaken).
Installation
We need to install two commands which are flac and lame.
sudo port install flac
sudo port install lame
Running
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