FLAC --> ALAC?
November 18, 2008 3:07 PM   Subscribe

What's the best way to convert FLAC to ALAC (Apple lossless)?

I would like to convert my FLAC files to the Apple lossless format (ALAC) so I can listen to them in iTunes and on my iPhone.

I already know about Fluke for listening to FLAC files in iTunes, but as far as I know there is no way to play FLACs on the iPhone.

Hence, I want to convert FLAC to ALAC. What's the best software to do this? Am I going to get any loss of data even though they're both lossless formats?

(Alternately, if there's a way to play FLACs on the iPhone, I'd love to hear it.)
posted by cosmic osmo to Computers & Internet (11 answers total) 2 users marked this as a favorite
 
Best answer: The two-step way is FLAC to WAV/AIFF to Apple Lossless, but there are apps that simplify the process. XLD does it for the Mac; dbPoweramp or foobar2000 should do it for the PC, with the right codecs installed.
posted by holgate at 3:29 PM on November 18, 2008


Max should work for lossless conversion, I'm assuming you're on OS X.
posted by starzero at 3:36 PM on November 18, 2008


A bash command line to convert every .flac file in the current directory to ALAC encoded .m4a files using ffmpeg:

for i in *.flac; do ffmpeg -i "$i" -acodec alac "`basename "$i" .flac`.m4a"; done;

My copy of ffmpeg spews out a lot of text when it does this, but the resulting files play fine. Should work in OS X/Linux or anything else you unixory that has bash and you can install ffmpeg on.
posted by strangecargo at 3:41 PM on November 18, 2008 [2 favorites]


This thread may be helpful. The last post seems to show a way to do this which would preserve any tags you have... which going via AIFF will not.

(however, I really don't know, as I just found this looking for something else entirely, and don't actually use FLAC for anything, or dbPowerAmp, for that matter...)
posted by pompomtom at 3:42 PM on November 18, 2008


Response by poster: Oops, yes I am on OS X (10.5)
posted by cosmic osmo at 3:46 PM on November 18, 2008


Seconding ffmpeg. Better compression than the native ALAC encoder as well.
posted by Inspector.Gadget at 4:26 PM on November 18, 2008


No one answered your second question: No, you won't get any audio loss. You might lose metadata (album/track/lyrics/whatnot) but the audio streams should be completely intact. That's what lossless means. You can verify this if you are paranoid by dumping the final apple format back into a WAV/AIFF and comparing with the intermediate WAV/AIFF from the FLAC file.
posted by chairface at 4:48 PM on November 18, 2008


I'd use foobar2000.
posted by archagon at 4:56 PM on November 18, 2008


Best answer: XLD works pretty darn well, and keeps metadata most of the time. I haven't quite figured out what makes metadata choke on some FLAC files, but for the majority, it's just drag and drop.
posted by tomierna at 5:01 PM on November 18, 2008


Response by poster: XLD is it. Thanks all.
posted by cosmic osmo at 7:12 PM on November 18, 2008


I recently switched from Windows to Mac, and last week I finally converted my music library from FLAC to ALAC, for the same reasons as you.

XLD seems nice, but there's no way to convert a whole drive of music at once; you have to open each .flac individually. (You can actually open multiple files - by drag-and-drop or by the usual Command-key multi-select method - but they all have to be audio files; it won't accept folders.)

I used Max, and it seems to have worked well. The conversion interface is a bit clunky, though. First, you need to go to Preferences/Formats, and add the ALAC format (called "MPEG-4 Audio (Apple Lossless)"). Make sure that this is checked, and that other formats are unchecked, because Max will convert to any format that's checked here.

Next, go to Preferences/Output, and set your output directory.

Now go to Preferences/iTunes, and check "Use iTunes compatibility mode". You can also have Max add the output directly to the iTunes library; I decided not to do that, and instead I imported files into iTunes later. I forget why I did that.

Finally, you can now click the "+" button, add your FLAC folder to the list, and click the "Convert" icon on the toolbar to convert all your files.

I haven't noticed any missing data in iTunes, with the following exceptions:
  • My ratings and play counts from MediaMonkey were lost
  • ReplayGain won't get copied over; iTunes doesn't support ReplayGain, but it has its own equivalent, called SoundCheck. You can scan your library automatically to compute that; I forget what triggers it. (Maybe just enabling SoundCheck in iTunes Preferences.)
  • Album covers that are stored as "folder.jpg" won't be copied. I think album covers that are in FLAC tags (a fairly recent FLAC feature) might be copied. There's a program called Corripio that I've heard will go re-fetch all your album artwork, lyrics, fix up tags, etc. but I haven't tried it yet.
And, as chairface said, lossless is lossless; all the original audio is preserved in full fidelity.
posted by Jay Levitt at 5:29 AM on November 25, 2008


« Older Have food, Will travel   |   I want to see what Google sees Newer »
This thread is closed to new comments.