Converting M4A to FLAC w/Linux?
March 8, 2015 6:29 AM   Subscribe

Is there a simple way - an application or via the command line - to convert M4A files to FLAC?
posted by ryanshepard to Computers & Internet (10 answers total) 1 user marked this as a favorite
 
http://askubuntu.com/questions/95753/convert-lossless-m4a-to-flac

You can convert an m4a file to flac with the ffmpeg command-line tool:

To install ffmpeg:

sudo apt-get install ffmpeg

To convert:

ffmpeg -i filein.m4a -f flac fileout.flac
posted by blob at 6:42 AM on March 8, 2015 [1 favorite]


Response by poster: Thanks, blob - I get "No such file or directory". Should "filein" and "fileout" be replaced with the name of the M4A file?

Anything else a rank Linux amateur would need to know to have this work? For example, does the target file need to be in a specific place, or have its location specified in the command?
posted by ryanshepard at 6:55 AM on March 8, 2015


Yes, filein and fileout should be replaced with the names of the files you're working with. fileout.flac can actually be anything you want, it's just specifying the name of the FLAC file after conversion. If you're running the command from the same directory as the m4a file you want to convert then no other specific location info is needed, otherwise you need to provide the full path to the file.

Anyway, is it really worth converting a compressed/lossy m4a to FLAC?
posted by Venadium at 7:11 AM on March 8, 2015


I'm curious as to why you're converting a lossy audio file format (m4a) to a lossless one (FLAC). It won't restore any of the data lost in the original conversion to m4a and will probably take up more disk space.
posted by tommasz at 7:13 AM on March 8, 2015 [1 favorite]


The m4a extension just denotes the container, it may contain either lossy or lossless audio. If the former, there is indeed no point in converting it to FLAC unless you like wasting disk space for zero audible and theoretical benefit.
posted by Bangaioh at 7:36 AM on March 8, 2015 [1 favorite]


blob's answer has the basics for command line. Just for completeness want to know you may need to use avconv instead of ffmpeg depending on the Ubuntu version. It works mostly the same way as ffmpeg.
posted by Nelson at 8:38 AM on March 8, 2015 [1 favorite]


Response by poster: These are burned from CDs and, in many cases, lossless, hence FLAC.
posted by ryanshepard at 12:34 PM on March 8, 2015


Far and away the easiest way to do this is with SoundConverter. It's in the default Ubuntu repos, and I'd imagine it's available in most other distros with a history of GNOME compatibility.
posted by fifthrider at 1:36 PM on March 8, 2015


Edit: wow, I just looked it up, apparently ALAC uses the .m4a extension, too. How confusing! Never mind. I was under the impression that .m4a files were always lossy.
posted by destructive cactus at 6:47 PM on March 8, 2015


Look into VLC player's conversion options. It pretty much does any format to any format. I haven't checked FLAC though. I think it's File > Convert > etc.
posted by guy72277 at 8:06 AM on March 9, 2015


« Older Is it time to move on?   |   Negotiating at a promotion? Newer »
This thread is closed to new comments.