How to decode AAC (.m4a) audio files into WAV?

31

12

How would you convert (decode) AAC files into WAV format? (Or, if you prefer, how to decode & re-encode them into MP3 or Ogg Vorbis? But WAV is sufficient as I already have good tools for WAV ➔ MP3/Ogg conversion.)

I'm mostly interested in Mac or Linux solutions, but feel free to mention Windows ones too.

(Use case: I have some voice memos ("Apple lossless audio file"), recorded with iPhone, that I'd like to share in a format that's more common than AAC.)

Jonik

Posted 2009-08-18T00:14:13.410

Reputation: 5 352

Not to be pedantic, but if the file is "Apple Lossless Audio File", then it's ALAC and not AAC (which stands for "Advanced Audio Compression") -- not that it matters for any of the answers currently provided, all of which should be workable for either ALAC or AAC. – michael – 2017-10-24T08:32:25.857

Answers

8

The easiest way to do this is probably with iTunes. In your preferences, go to Import Settings and choose "Import Using" to WAV encoder. Then you can right-click on any AAC song and choose "Create WAV version." You should be able to select a bunch of files at once and do this to them in bulk.

Nota bene: Don't forget to switch your import settings back to AAC when you're done, presuming you still want to be using it.

peterb

Posted 2009-08-18T00:14:13.410

Reputation: 591

1Thanks, that works smoothly. Even if "import settings" at first seems a bit funny place for this setting. :) That NB is a good reminder indeed. – Jonik – 2009-08-18T00:41:54.563

44

On Ubuntu, I use avconv on the command line:

avconv -i input.m4a output.wav

You can also use FFmpeg with the same syntax, simply replacing avconv with ffmpeg.


This can do every M4A in a directory, combined with a for loop:

Linux:

for f in *.m4a; do avconv -i "$f" "${f/%m4a/wav}"; done

Windows (directly in the command prompt):

FOR %G IN (*.m4a) DO avconv -i "%G" "%~nG.wav"

Windows (in a batch file):

FOR %%G IN (*.m4a) DO avconv -i "%%G" "%%~nG.wav"


If you want a GUI, you may consider WinFF, which is a GUI for FFmpeg.

evilsoup

Posted 2009-08-18T00:14:13.410

Reputation: 10 085

1Yup, works equally with ffmpeg instead of avconv – hennr – 2015-02-22T08:15:40.550

FWIW, I was converting from audio-only "m4a" to "opus" and the output contained an empty video stream for some reason. I had to add -vn to avconv to force audio-only output. – Petr Pudlák – 2016-05-07T20:04:01.450

1As of 2017, ffmpeg would likely always be used/preferred over avconv, after a weird period of drama in the history of those projects. Also, m4a is a container format, actually identical to mp4 (it was only introduced in order to assist operating systems that used file extensions to determine what program to use to open the file). So, using ffmpeg ...-vn ... to disable video output would be a good idea for consistent results. – michael – 2017-10-24T08:40:59.060

18

To decode from AAC to WAV, you can use FAAD2, which is a command-line utility.

faad -o output.wav input.aac

Strom

Posted 2009-08-18T00:14:13.410

Reputation: 281

1I was going to upvote this answer as it is the most straightforward one, sadly FAAD2 doesn't support the Apple Lossless (FLAC) format. To convert this format you'll have to use FFmpeg instead. – Gras Double – 2017-11-19T17:46:01.753

Apple Lossless is ALAC, not FLAC. FLAC is free and very well supported in almost all tools. – tzot – 2019-02-05T10:04:36.520

4

ffmpeg -i inputFilename.m4a OutPutFileName.wav

check out further ffmpeg commands to convert directly to a desired format (mp3 / ogg / aac, ..)

icyerasor

Posted 2009-08-18T00:14:13.410

Reputation: 229

2

In Ubuntu, I used SoundConverter (just search for it in Ubuntu Software Center).

SinkovecJ

Posted 2009-08-18T00:14:13.410

Reputation: 21

1

MediaMonkey should get the job done of converting the audio formats. ACC to WAV, OGG or MP3.

Electrons_Ahoy

Posted 2009-08-18T00:14:13.410

Reputation: 2 491

1

Thanks. For the record, MediaMonkey seems to be a Windows-only app. Some more relevant info: "MediaMonkey also allows automated conversion from all supported formats to MP3, OGG/Vorbis, WMA and WAV with total control over quality and volume settings. Registration to MediaMonkey Gold is required for converting more than five files to mp3. Alternatively, the user can replace the included MP3 encoder library with a free one, such as LAME." http://en.wikipedia.org/wiki/MediaMonkey I personally appreciate the possibility to use LAME.

– Jonik – 2009-08-18T00:31:07.873

Yes, it is windows-only as far as I know. I've got my copy hooked up to LAME, and I've converted WAY more than 5 files to MP3 with the free version. – Electrons_Ahoy – 2009-08-18T02:16:38.627

0

If you are running Windows, try WinFF.

It can convert from/to MP3, MP3 (mono), MP4 (FS/WS), OGG, WAV, AAC, and many others.

user3892628

Posted 2009-08-18T00:14:13.410

Reputation: 15

Note that WinFF is only a GUI for the renowned cross-platform CLI ffmpeg.

– Nino Filiu – 2019-07-02T22:31:31.617