I have a collection of folders, some of which contain .flac files while others contain .mp3 files.

I need everything to be in .mp3, but I don't exactly want to go through hundreds of folders in format factory.

Is there anyway to automate this process in either Windows or Linux?

3 Answers 3


On Linux this should be easy if you have a command-line converter: find . -name flac -exec <convert-tool-name and options here> {} + would run the convert-tool for each flac file in and below the current directory.

So let's go one step further and have such a convert tool. The standard on Linux would be lame:

sudo apt-get install flac
sudo apt-get install lame

Now combine that with our wisdom from above, but make it a bit more elegant:

for f in $(find . -name '*.flac'); do
  flac -cd "$f" | lame -b 320 - "${f%.*}".mp3

Note that I've set the bitrate to 320 CBR in this example. Adjust that to what you'd like to have (or even switch to -v for VBR – see man lame for more details and additional options)).

Apart from this: not having any .flac files, I haven't tried that myself. But I've used Lame a lot in the past, it works great.


A simple way of doing this on Windows (If you prefer not to use a script) would be to use FooBar2000.

Install FooBar2000, then drag your your Music folder containing the albums with flac files into FooBar's main window, this will add them to the queue. If you have a large collection, this could take some time.

Make sure all of them are selected (Ctrl+a), right click, go to convert, and click the three dots. convert location image

You're now presented with the conversion menu. You can set the output format to MP3 and edit the settings to your liking. The destination is something you will want to change.

Set the "Output Path" to specify where you want the MP3 files to go, probably another folder for your MP3 output. You can then set the name format as follows:

%artist% - %album%\%track% - %title%

Of course you can modify it to your liking. Showing conversion options set

Then simply press back, change any other settings you may be interested in and click "convert". You can also save these settings to use them again later.

Note you may need to download lame.exe separately for the conversion to MP3 to work.


The best solution in my opinion is mp3fs. This provides a virtual file system which transcodes on the fly.

First decide where you want your mp3s to be stored. Let's say you want them stored in /mnt/music/mp3. This should be an empty directory. Now, choose your FLAC directory. Let's say this is /mnt/music/flac.

You can now run mp3fs pointing at those folders:

sudo mp3fs -o allow_other -b 192 /mnt/music/flac /mnt/music/mp3

And your FLAC library is magically mirrored at /mnt/music/mp3...

I wrote more detail up here: https://www.blisshq.com/music-library-management-blog/2010/05/17/easy-flac-to-mp3-mirroring-with-mp3fs/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.