Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

FLAC to M4A conversion

Hi, as per title really.
Does anyone know if iTunes will automatically convert FLAC to M4A.

Thanks
Rick

4GHz Core i7 12 Gig Ram RAID Water Cooled, Windows 7

Posted on Jan 17, 2011 7:35 AM

Reply
19 replies

Apr 15, 2017 7:47 PM in response to trikki69

Scouring the interwebs, I found some methods of converting from FLAC to m4a if you don't mind using the command-line in Terminal. With both options make sure Homebrew is installed which is a package manager that will allow you to install the requisite tool.


Using ffmpeg


Make sure ffmpeg is installed (google Homebrew to install) and type:


ffmpeg -i [infile].flac -acodec alac [outfile].m4a


(There are a few shell script gists on Github named flac2alac which use ffmpeg and will preserve tags: https://gist.github.com/)


Using flac and afconvert


Make sure flac is installed (google Homebrew to install) and type:


flac -s -d --force-aiff-format -o [tempfile].aiff [infile].flac

afconvert -f m4af -d alac [tempfile].aiff [outfile].m4a


(This shell script gist was helpful: https://gist.github.com/mlen/4379799)


This will convert to a temporary loss-less aiff file, then using Apple's command-line utility afconvert, to loss-less m4a. You can then delete the temporary aiff file.


The limitation of this approach is that the temporary aiff file generated has a maximum capacity of 2GB, which one of my files would have exceeded. So I needed to use another approach for this file.


Using flac only


I was also able to convert directly from FLAC to m4a using flac only, but the resulting files were twice as large. It seems flac doesn't apply any compression, whereas afconvert and ffmpeg compress the resulting files.


Regards,

D.

Jan 18, 2011 2:05 PM in response to trikki69

trikki69 wrote:
Hi, as per title really.
Does anyone know if iTunes will automatically convert FLAC to M4A.

Thanks
Rick


Rick,

iTunes does not do anything at all with FLAC files. You can use a 3rd party program such as Switch to convert them to an iTunes compatible format such as AAC (M4A).

After you convert, add the resulting files to your iTunes library. You can either keep or discard the original FLAC files, depending whether you might need them for other (non-iTunes) purposes.

There are plug-ins that allow iTunes to play FLAC, but they have limitations, and you cannot sync the tracks to an iPod.

Ed

Jan 19, 2011 10:10 AM in response to trikki69

trikki69 wrote:
Hi, as per title really.
Does anyone know if iTunes will automatically convert FLAC to M4A.


iTunes itself does not support FLAC and so it cannot (itself) convert FLAC files. There is a way to get FLAC files in to iTunes on a Mac but not on Windows.

Your best bet is to convert the files from FLAC to Apple Lossless format which is identical in quality to the FLAC files (and a similar file size). Unfortunately Switch (for Windows) does not seem to support Apple Lossless, however there are other utilities out there e.g. dbPowerAmp and also have a look at http://www.hootech.com/formats/alac/convert-flac-to-alac.htm

If you can get access to a Mac then it will be easier and more reliable to convert the FLAC to Apple Lossless format using either Max http://sbooth.org/Max/ or X Lossless Decoder from http://tmkk.pv.land.to/xld/index_e.html

I have seen dbPowerAmp produced Apple Lossless files be rejected by iTunes in the past.

Jul 24, 2011 10:53 AM in response to trikki69

i use two programs when i use a converter program on my computer it is free audio converter be aware it only converts to one lossless format besides and that format is wav because wav has not metadata you will you have to get the track numbers and add puncuation, removes the numbers infront of the track numbersand maybe get album name but a soon as you do that you go to edit then prefrences then import settings the click apple lossless or aac (you could also convert the files to aac within free audio converter so this is mostly for apple lossless) once you do that high light the songs then press create apple lossless version then delete all the wav files. there will be no loss in quality in this conversion because they are both lossless. if you want to convert with a program that converts very easy and converts it straight to apple lossless with no loss of track names get dbpoweramp. be aware this program cost money but is very easy to use and you can even rip cds in many formats. the link to free audio converter is http://download.cnet.com/Free-Audio-Converter/3000-2140_4-10893961.html


the link to db power amp is http://www.dbpoweramp.com/

Feb 14, 2012 7:00 PM in response to trikki69

If you are not command-line averse, I have put together a little iTunes for Windows automation script that converted all my FLAC library to Apple Lossless in a couple of hours.


Beware that the current (as of Feb 2012) version has some limitations:


  • It is not capable of processing albums ripped of downloaded as a single FLAC file. You must split them into individual tracks before conversion.
  • The FLAC files that have any of the metatags ARTIST, ALBUM, and TITLE missing are skipped.
  • Tracks are always imported in Apple Lossless format.


Do not hesitate to drop me a line if you run into a bug or need any of the above limitations addressed, or fork my script on GitHub if you are into IT yourself.

Jul 27, 2012 8:01 PM in response to trikki69

Hi Dmitry,


I try out your script and it work beautifull but it can not handle the file name with blank.


Use flac.exe -d "name with blank" and it work .


Try to put comment in your website and it wont let me keep ask me to inpout password .

Any chance to improve "js" script - i look at it and did not understand it well with all parsing

Aug 1, 2012 6:23 PM in response to louist1

Hi louist1,


I have fixed the comment issue in my blog theme - thanks for pointing me to the problem!


However, I do not understand the issue you are having with the script, as it does put double quotes around all pathnames. In fact, almost all files I have converted had blanks in their pathnames. Can you please elaborate so that I could reproduce the issue?


Dmitry

FLAC to M4A conversion

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.