Saturday, January 29, 2011

Convert FLAC to Apple Lossless on a Mac

If you want to use iTunes to store your lossless library, your music collection must be in the Apple Lossless format. Since most of the online music stores use the FLAC format, you need to convert the files you download. This process doesn't reduce the quality of the audio, it's simply a switch between compression formats. It's similar to converting a ZIP file to a GZIP archive. Same data, different algorithms.

For this task I've been using XLD for many years. It was first released in 2006 and over the time the developer added audio formats compatibility and features like ripping CDs. Today I'll focus on converting a FLAC to Apple Lossless.

XLD supports the following lossless formats: FLAC, WAV, WAV64, AIFF, PCM, WavPack and Apple Lossless.

First, you need to edit the preferences. In the general tab you must specify Apple Lossless as the output format.

xld_general.jpg

The Apple Lossless format only has one option, the sample rate. The default is "same as original" and this is what I'm using.

I prefer to select an output directory myself to avoid mixing the original files with the converted files. It makes it easier to import into iTunes. Output name format is arbitrary and somewhat irrelevant to the task since iTunes will organize the music directory itself.

The next important tab is batch.

xld_batch.jpg

Preserve directory structure is recommended to avoid name collision in the output folder. I choose unlimited directory depth so XLD will crawl and convert every audio files it finds in the input folder(s).

Last tab important for conversion is metadata.

xld_metadata.jpg

I leave everything to the default values. It can be a hit-or-miss since there is no established standard. For example the cover image is not always included and the image name can obviously change. You will want to adapt the settings to the online music store you most frequently use.

You are now ready to import. I keep the XLD application in the dock so I can simply drag the FLAC folder (or any of the other supported format) to the XLD icon. The conversion immediately begins. If you have a multi-core computer it's possible to decode many files simultaneously. This setting is located in the general tab (maximum # threads). This will speed up the process.

xld_import.jpg

Once the conversion is completed, you drag the output folder to iTunes and voilĂ . If iTunes manages the music library itself, you can trash the output folder created by XLD.

1 comment: