Convert flac to alac and alac to flac from the command line

In this article I will show you how to convert the Free Lossless Audio Codec (FLAC) to Apple Lossless Audio Codec (ALAC) and alac to flac.

This can be done easily with avconv, the new name of the old but good ffmpeg.

To install avconv just type in your terminal: sudo apt-get install ffmpeg

How to convert FLAC to ALAC:

$ avconv -i audio.flac -acodec alac audio.m4a

where audio.flac is initial the flac file and audio.m4a is the new, converted file.

How to convert ALAC to FLAC:

$ avconv -i audio.m4a -acodec flac audio.flac

where audio.m4a is the initial alac file and audio.flac is the new, converted file.

The -i argument specifies the input file, -acodec specifies the format you want to convert the file, followed by the output file’s name.

Tagged with: , , , , ,
Posted in The Linux and Unix Articles!
2 comments on “Convert flac to alac and alac to flac from the command line
  1. DarkScientist says:

    Instead of avconv, which seems to be included with libav-tools, using ffmpeg command directly worked for me:

    $ ffmpeg -i audio.flac -acodec alac audio.m4a

    (Using FFmpeg SVN-r19352-4:0.5+svn20090706-2ubuntu2.3)
    Thanks for the post information about the switches & usage, anyway. 😉

  2. marialandoney says:

    You may also try iDealshare VideoGo which can batch convert FLAC files to ALAC without audio quality loss.

    It supports directly drag and drop the FLAC files to the main window of this software. You can also directly drag the folder where the FLAC files are to the main window of iDealshare VideoGo.

    Besides converting FLAC to ALAC, it also convert FLAC to MP3, WAV, OGG, WMA, AIFF, AU, RA, and etc.

    It also supports to increase audio volume for the output ALAC files, adjust sample rate for the output Apple Lossless audio, change the output ALAC audio channel between stereo and mono.

Leave a Reply

Your email address will not be published. Required fields are marked *




Subscribe to get the latest Linux news and how to guides directly on your e-mail!