[File Compression] Exported aac file too large

I have a question regarding file sizes.

I recorded a stream from a phone in .aac format (there is no way of changing the settings)

I edited the file and trimmed some of the portions. This should, in theory, reduce the file size but more on that later.

I chose to export the file in .aac format with quality set to ‘100’ (which is the default). The process takes half an hour, because it is a 225mb file (4 hour) but the surprising result is that the exported file weighs over 300mb :astonished:

Why is that ? I have edited some smaller files earlier, with the same settings, and always ended up with a smaller size than the original. So what’s wrong here, when the same setting is applied to a bigger file ?

I’m posting some info which might help you identify the problem. I know .mp3 format will help me reduce the size but, for playback purposes and also because of consistency, I want to save all my files in the .aac format.

I hope there is a way of reducing its size.
Mediainfo.txt (883 Bytes)
log.txt (2.79 KB)

It isn’t surprising. Audacity doesn’t offer a way to automatically export at the same bit rate or quality as the original compressed file.

Are you using Audacity 2.0.6? In that version the Quality slider has no effect for AAC export so stereo files will always be exported at about 192 kbps.

You can however specify AAC export 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).

Or, export as WAV from Audacity and convert to AAC in iTunes: http://manual.audacityteam.org/o/man/tutorial_exporting_to_itunes.html#conversion.


There is a program called [u]mp3DirectCut[/u] that can do some limited editing on MP3 & AAC files without de-compressing/re-compressing. If you chop stuff out, the file format won’t change and it will be smaller.

If you don’t need to do anything “fancy”, like EQ, mixing, noise reduction, etc., there is an advantage to a special-purpose MP3/AAC editing program like this because you avoid the (potential) quality loss from a 2nd lossy-encoding step.

The “processing” also goes faster, since you are dealing directly with smaller files and you save the time involved in de-compressing & re-compressing.


The bitrate is kilobits per second (or megabits per second). So if you know the bitrate and the playing time, and if you know there are 8 bits in a byte, you can calculate file size:

File Size in bytes = (bitrate in kbps x 1000 x Playing Time in minutes x 60) / 8

Of course, you can tweak the formula so you can plug-in hours and/or calculate MB, etc.

But we don’t always know the bitrate, since you can choose a quality-setting and let the encoder set a moment-to-moment variable bitrate as required to meet the quality setting.

I know .mp3 format will help me reduce the size

At the same bitate, the MP3 will be the same size. :wink:

Sorry to keep you all waiting.

Wow, I never knew that “Custom FFmpeg Export” was so rich in options. Good to have learnt something new.

I think mp3DirectCut this is the answer. But the most impressive feat isn’t the size, it’s the speed with which it saves. On Audacity, the same file took half an hour. On mp3DirectCut, the same file takes less than a minute :astonished:

Everywhere I ask, I get that, to reduce a file size one needs to save it as mp3, hence the misconception. I knew that aac at a lower bitrate would sound better(than mp3), but mp3 is always compressed. So now it appears as if, to reduce the size you reduce the bitrate and going mp3 isn’t the solution.

Offtopic: I noticed that there are no [spoiler] tags available on this forum.

If you really want to reduce the file size for voice recordings, the best format to use is Opus. Unfortunately Audacity does not currently support Opus, but here is a short sample in both MP3 and in Opus format. In both cases the bit rate is 16 kbps (hence they are both the same size).
Not surprisingly, the sound quality of the MP3 is pretty bad because of the very low bit rate, but the opus file is better.

As you may not have an appropriate encoder for Opus installed, and the format is not supported by Audacity, you may have difficulty playing the opus file, so here are the two files after converting back to WAV format. The MP3 plays first, then the Opus.

Opustools includes a command line encoder and decoder and is available here: http://www.opus-codec.org/downloads/
Recent versions of Firefox, foobar2000, and VLC support Opus. Hopefully Audacity will be added to the list in the not too distant future.

You can still though use Opus support in FFmpeg if your FFmpeg version is from http://manual.audacityteam.org/o/man/faq_installation_and_plug_ins.html#ffdown.

You can then import Opus files just by dragging them into Audacity.

Unfortunately Opus export in “Custom FFmpeg Export” does not work correctly, but you can use the (external program) export option to export at the command-line either using FFmpeg or the Opus tools encoder.

If you use FFmpeg the syntax is:

ffmpeg -i - -acodec libopus "%f"

Name the file with .opus extension when you export.


Is that the same for Mac OS X with all FFmpeg versions from that link?

It would be much better if Audacity had built-in support for Opus, especially as FFmpeg does not ‘natively’ support Opus. FFmpeg has to be built with support for the external libopus library, which is not the default configure, (and is often not enabled in Linux, since Linux usually has opustools available).

Yes, the Mac FFmpeg 2.2.2 version listed there (DMG and ZIP) was built with libopus support.

Obviously on Linux it depends what your distribution did or you have to build your own FFmpeg and recompile Audacity linked to your FFmpeg build.

If you’ve not already done so, you can add a vote on Wiki Feature Requests for Audacity to add native Opus support.

I’d certainly like to see an explicit menu choice for Opus export in Audacity, whether FFmpeg or native.


OK, I’ve added my vote for Opus.
I strongly suspect that it would be easier to add libopus directly to Audacity than add explicit Opus support via FFmpeg, since libopus is not a moving target.

I know that Martyn wanted to add native opus support - here is his thread about it on the Xiph.org lists http://lists.xiph.org/pipermail/opus/2013-February/001922.html. That list suggested reusing the libvorbis code to do it.

And the request is also tracked here: http://bugzilla.audacityteam.org/show_bug.cgi?id=593.