Any way to choose a bitrate for M4A files?

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
Djard
Posts: 125
Joined: Fri Nov 05, 2010 6:25 pm
Operating System: Please select

Any way to choose a bitrate for M4A files?

Post by Djard » Tue Oct 28, 2014 12:49 am

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?

steve
Site Admin
Posts: 80677
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Any way to choose a bitrate for M4A files?

Post by steve » Tue Oct 28, 2014 1:20 am

Djard wrote:So is the option to set the "quality" for M4A files non-functional
Yes. It's a limitation (bug) in the FFmpeg build, as described in the Audacity 2.0.6 release notes:
http://wiki.audacityteam.org/wiki/Relea ... nd_Exports
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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Any way to choose a bitrate for M4A files?

Post by Gale Andrews » Tue Oct 28, 2014 12:59 pm

steve wrote:
Djard wrote:So is the option to set the "quality" for M4A files non-functional
Yes. It's a limitation (bug) in the FFmpeg build, as described in the Audacity 2.0.6 release notes
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:

Code: Select all

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 http://wiki.multimedia.cx/index.php?tit ... A.2Fet_al. .

Example:

Code: Select all

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. :(


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Post Reply