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!
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! 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 http://manual.audacityteam.org/o/man/sample_workflow_for_exporting_to_itunes.html 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 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…
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.
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: