Any way to choose a bitrate for M4A files?

When saving a file as an M4A (AAC), the FFMpeg plugin for Audacity does not offer audio quality settings in terms of bitrate; instead, it offers a “Quality” scale, ranging from 10 to 500.

After editing an AAC file with a CBR of 256 Kbps, I exported the file, choosing M4A as the container format. In “Options” I chose a setting of 10 the first time then 250 and then 500. To my surprise, all three files were rendered at the same bitrate of 196 Kbps, and all three files were identical in size. I also ran the test on an MP3 file, saving it as an M4A with the same result. I expected lesser audio quality for the lower setting of 10, and a larger file size for the setting of 500.

So is the option to set the “quality” for M4A files non-functional, or am I overlooking something?

Yes. It’s a limitation (bug) in the FFmpeg build, as described in the Audacity 2.0.6 release notes:

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.

That one actually is a bug in Audacity and not in libvo-aac.

If you use (external program) to export then you can specify the bit rate, for example:

ffmpeg -i - -ab 256000 "%f"

exports the M4A at a target of 256 kbps (add “.m4a” without the quotes to the end of the file name when you export).

If you want to add metadata, see FFmpeg Metadata - MultimediaWiki. .

Example:

ffmpeg -i - -metadata title="song" -ab 64000 "%f"

But Artist and Year are not written - that is an FFmpeg bug and applies to exporting using “M4A (AAC) Files (FFmpeg)” as well. It may be easier to convert to M4A in iTunes. :frowning:


Gale