Problem exporting to AAC… Help!

I am trying to achieve the highest possible quality in the content that I export from Audacity while still using a lossy codec. Following the instructions found at, I have been encoding to MP3 using a variable bit rate value of zero at fast encoding speed, and I have been using joint stereo as opposed to stereo. But then I realized that since the consensus seems to be that AAC is better quality than MP3, why am I not exporting to AAC? So I uninstalled Audacity 2.0.3 from my computer and installed Audacity 2.0.6, and I downloaded and installed ffmpeg 2.2.2 as instructed by, and now I can indeed import AAC files and export to AAC. As instructed by, I have been exporting AAC files with a quality setting of 500 (best possible quality).

My problem comes from the fact that my AAC-file exports are absolute garbage in comparison to the MP3 export settings that I was using before. There are all kinds of scratching and artifacts that are not detectable in an MP3 export of the same file. Did I do something wrong, or is this a known issue with Audacity? Is Audacity not the best software to use to write good AAC files. I have used GarageBand for years, always exporting to 256 kbps, and I’ve never had such a quality problem with AAC files. Also I noticed that the resulting AAC file only exported to 195 kbps despite being set to 500 quality when exporting. If this is all Audacity is capable of, that would be kind of disappointing. Any help would be much appreciated!

I believe this is a known problem. AAC/M4A exports do not have a complete range of quality options. Someone will correct me.


And since you are using AAC, I assume you are using iTunes (and probably an iPod) - if so why not export WAV files from Audacity and use iTunes to make the AAC conversion? That’s what I do.


See this page in the Manual:

And this one may help too:


Yes, as per the release notes: Missing features - Audacity Support

M4A (AAC) exports: The Quality Slider in “Specify AAC Options” has no effect if the FFmpeg library is built with the libvo-aac encoder, as are recommended builds of FFmpeg for Windows and Mac OS X. Workaround: Given the alternative AAC encoders for FFmpeg have other problems as described in these notes, you can instead export as WAV and convert to AAC in iTunes on Windows and Mac.

I think the reason the slider does not work is simply that it’s designed for the libfaac encoder that the previous recommended FFmpeg used. Libvo-aac specifies a constant bit rate, not target quality, and is maximum 2 channels output.

You can however specify the constant bit rate if you choose “Custom FFmpeg Export” instead of “M4A (AAC) Files (FFmpeg)”. Click the Options… button, choose “mp4” in the formats list and “libvo_aacenc” in the codecs list, then set bit rate in bits per second. Up to 320 kbps is supported. For example, to export at 256 kbps, enter “256000” (without quotes). This does work - I’ve now tested it.

I’ll update the release notes for 2.1.0. I see the above facts about libvo_aacenc make the Audacity Manual incorrect so I had better deal with that for next release.


But then I realized that since the consensus seems to be that AAC is better quality than MP3…

That seems to be true and AAC was intended to be an improvement over MP3. But, at higher bitrates there will usually be no difference. Most of these lossy encoders (MP3, AAC, OGG, AC3, etc.) can be transparent with most music. That is, all of these formats can often sound identical to the uncompressed original in a proper [u]blind ABX test[/u].

This depends on the program material (some music is “easier” to compress than other music) and the ability of the listener to hear compression artifacts. It turns-out that the playback equipment isn’t that important… If you can hear a compression artifact on a high-end system, you can hear it on everyday headphones.

We can’t say that 320kbps MP3 is “better” than 240kbs MP3, or that AAC is “better” if they all sound identical to the uncompressed original! :wink: In every case with lossy compression, all of the bytes in the decompressed file will be different from the uncompressed original and the only way to compare quality is by listening.

The differences may be greater at lower bitrates… A 128kbps AAC file may sound better than a 128kbps MP3. Or, a 192kbps AAC may be transparent, whereas a 192kbps MP3 might have audible artifacts. Or, there may be some music where the best MP3 settings leave audible compression artifacts, but the AAC file may be transparent.

Thanks everyone so much for your help! All answers were super helpful. I think I will just use iTunes for conversion from WAV to AAC as recommended, though I will definitely experiment with Custom FFmpeg Export as suggested by Gale Andrews too.

While I have your attention, I had one more question I just encountered. The Sample workflow for exporting to iTunes at mentions that you can export to 44.1kHz 16-bit PCM WAV files and then convert to AAC in itunes. Then it mentions that “It is possible to export 32-bit PCM files too, by choosing ‘Other uncompressed files’ in either export dialog, then clicking Options… These files will theoretically be of marginally higher quality but twice the size of 16-bit files. Latest versions of iTunes will play them, but other players may not.” My question is could you export to 32-bit PCM files and then convert those to AAC in itunes so as to achieve that “marginally higher quality,” or is it not possible (or worth it) to do this?

Also I don’t seem to find an option to mark this forum post as solved, but it definitely has been. I’m assuming the administrator does this.

I don’t see why you wouldn’t be able to do that - my understanding is that iTunes will convert from any format it supports to any other format it supports. Give it a try and report back.

I suspect that you would not notice the difference between a 32-bit and a 16-bit WAV conversion to AAC :sunglasses:

But once again give it a try - and do some careful listening tests.

Personally I work in Audacity in the default 32-bit floating and to Export 16-bit WAVs with shaped dither (default). I use these for three things

  1. Direct use on my Cocktail X30 (a sort of hi-fi mains iPod with a big 2TB disk) connected to my hi-fi rig
  2. Load into iTunes and convert to AAC 256 VBR - for use on an iPod Classic 160 gig
  3. archive/backup - copies on two separate external 1TB disks


I tried exporting to WAV signed 32-bit PCM and converting that to AAC in itunes, and the resulting file was exactly the same size as an AAC file converted in itunes from a 16-bit WAV, and you were right — I don’t think I could tell the difference even with good headphones!

I also tried this, and though the quality was marginally better than just exporting using the standard M4A (AAC) Files (FFmpeg) option, and though itunes did say the resulting file was 319 kbps, the file still wasn’t nearly as good as a WAV converted to AAC with iTunes. So I think I’ll stick to converting to AAC in iTunes for now.

All this trouble with AAC encoding in Audacity gives me one more important question: when exporting from Audacity directly to ALAC as instructed by Audacity Manual, is there any risk of not producing a lossless output? I have tried this method and I don’t think I could tell the difference from the same file exported to WAV, but maybe I could? Probably not though…

Also one thing I’ve noticed is that when you export directly to ALAC from Audacity, you get a file that is 1411 kbps, while if you convert a WAV file to ALAC in itunes, you get a file that is only 745 kbps, but both ALAC files are still the same exact size. Interesting…

Oh, by the way.

AAC supports FairPlay Copy Management and additional file/music information.

MP3’s full family name is MPEG1, Layer 3, part of the video format developed in 1992. Your widely accepted, cutting edge audio format is 22 years old.


When we updated support in Audacity 2.0.6 to FFmpeg 1.2 or later, the only modern FFmpeg builds we could find for Windows were built with libvo-aacenc.

I know there is some debate about which is the best AAC encoder to include when building FFmpeg. See Encode/AAC – FFmpeg for details.

Even if we could have found or persuaded someone to compile FFmpeg built with another AAC encoder, all the possible AAC encoders have one problem or another, if not with quality, then with files failing at some sample rates, or being cut short.

If you are sufficiently curious, download, and point 2.0.5 to that 0.6.2 FFmpeg. Export AAC at 500 Quality. Is that better or worse than maximum quality in iTunes?

That link does not say how to export to ALAC from Audacity. It says how to create an Apple Lossless File in iTunes.

To export to ALAC in Audacity you have to export using (external program) and give this command (assuming you installed FFmpeg 2.2.2 to the default location):

ffmpeg -i - -acodec alac "%f"

Are you exporting directly to ALAC from Audacity using the command above, or just exporting a WAV file? And where are you reading the bit rate?

Personally I think bit rates in a compressed lossless codec are somewhat meaningless. If you export from Audacity to ALAC as above, or choose Apple Lossless in iTunes, you can be satisfied the audio is still lossless.


I should have mentioned that if you don’t mind using Audacity’s command-line export you can choose the native FFmpeg AAC encoder rather than the libvo-aacenc which you get if you export choosing “M4A (AAC) Files (FFmpeg)” or “Custom FFmpeg Export”. Using the native encoder also lets you encode more than stereo.

“-strict experimental -c:a aac” tells FFmpeg to use the native AAC encoder. This is the syntax for setting bit rate (AAC’s version of “constant bit rate”) with the native encoder at bit rate of 240 kbps:

ffmpeg -i - -strict experimental -c:a aac -b:a 240k "%f"

This is the syntax for setting quality (variable bit rate) to the maximum (10) with the native encoder:

ffmpeg -i -  -strict experimental -c:a aac -q:a 10 "%f"

The above should also apply to the FFmpeg we recommend for Mac OS X from the Buanzo site.