Windows – Painlessly convert FLAC to ALAC on Windows

flacitunestranscodewindows

I'm wondering if anyone has a clean, painless workflow for losslessly transcoding FLAC files to their equivalent ALAC? It's supposed to be a bit-perfect conversion, meaning it shouldn't be very hard, but…. it is.

Why would I do this? (Before the OS folks eat me alive) Mainly, because an audio app that I use (Serato Scratch Live) does not support FLAC, and despite the constant prodding of users over the last five(!) years, most likely will not for a while. They did, however, hack together ALAC support

Also, it would seem that getting iTunes to play FLAC files (and properly downconvert them to use space efficiently on my iPod) is pretty much impossible.

The only catch is that I'd like to preserve some weird, offbeat meta tags (BPM and song key) that would be a bit painful to regenerate. I'm down with anything on Windows or Linux

Thanks

Tom

Best Answer

In Ubuntu, you can open a terminal, navigate to the directory in question, and do the following command loop:

for f in *.flac; do ffmpeg -i "$f" -acodec alac "${f%.flac}.m4a"; done
  • Will convert all .flac files in the directory to .alac files, doing so in a bit-perfect way.
  • ffmpeg doesn't come packaged with Ubuntu, so you'd need to install that from repos; however, I can't say for sure that this will keep your BPM tag info.

Also, it would seem that getting iTunes to play FLAC files (and properly downconvert them to use space efficiently on my iPod) is pretty much impossible.

There's a program called flukeformac that may allow you to play .flac files in iTunes.
As to conversion for efficient iPod use, the following command loop will do the trick:

for file in *.flac; do $(flac -cd "$file" | lame --preset fast extreme - "${file%.flac}.mp3"); done`
  • You may want to replace --preset fast extreme with a lower bitrate option
    (more on lame presets)