Clueless about Audio Bitrate

I’ve been searching for hours through the web, but the longer I am searching the more I get confused.

What audio bitrate shall I use for video encoding with libx264/libx265 and aac ?
Why do all the stock export profiles have the constant bitrate set and do not utilize the average or variable bit rate options?

I found a post from 2002 that no method exists for muxing a variable bitrate mp3 to an mpeg1 video file, but is it the same with modern codecs?

I found a contradictory post that if it comes to video encoding, AAC is always VBR, without any explanation, and a link to Making sure you're not a bot! which does not reply.

If so, why are rate control options offered in the Audio tab of the ShotCut export dialog, namely Constant Bitrate, Average bitrate and Quality-based VBR?

I found a post that the CBR value to enter represents the total of all channels which would mean that 256 kbit/s devided by 5 surround channels would result in 51 kbit per channel. If true, what is the recommended CBR setting for audiophile quality?

Quality-based VBR the default setting is 50% (aq=1,05). I found no documentation of the aq parameter, and I doubt that 50% is a good setting for demanding listeners. So what aq setting is recommended, if VBR is a choice after all? A aq value of 2.0 is equal to CBR I guess?

My suggestion is to start with the default setting. It was chosen as a good compromise for quality, bitrate, and compatibility. Listen to the export with your demanding ears. Does it sound good? If not, what do you hear that you do not like?

If you want to use the advanced section of the encode panel, you will want to build your understanding of FFMpeg. This page has some good information:
https://ffmpeg.org/ffmpeg-codecs.html#aac

Wait for the progress bar to complete, and then the page will display. There is some good information in that page as well.

Thanks for your reply.

Regarding your first proposal, going with the default settings was also my first approach for a long time. But time comes when modern mankind wants to understand what it is doing, and why, therefore let me repeat my question:

Why do all the stock export profiles have the constant bitrate set and do not utilize the average or variable bit rate options?

I followed your link (thanks again), but all I got was q …Set quality for variable bit rate (VBR) mode. Because official documentation is withholding recommended settings, I am asking in a specialized forum, with reference to my first post.

The FFMPEG Wiki is available today (yesterday it did not answer although I tried with different IP addresses and segments) It tells that the Native FFmpeg AAC Encoder (and I assume this this is used by Shotcut) has an effective VBR q range from 0.1 … 2.0, and it does not do CBR audio encoding.

So, back to my questions: If Shotcut employs the native FFMPEG AAC encoder which is not capable of CBR, why on earth are the Shotcut stock export profiles configured for audio CBR?

Regarding your advise to judge, if the result of the CBR export sounds good enough to me: You are missing the point that in video encoding it is all about storage and bandwith reduction. The challenge is to find the least consuming audio VBR setting that is broadly accepted for demanding ears (not mine). I know audio is only I fraction of video bandwith, but I still hope to get opinions about good encoding practise.

Tonight, I have run some tests, with interesting results:

In Shotcut v25.01.25, I encoded a movie 4 times using the HEVC video codec and aac audio codec, with different aac settings and then checked the results with MediaArea MediaInfo. MediaInfo tells it’s the AAC LC codec (Low Complexity).

Setting → Result
VBR 50% → VBR 250-256kb/s 542MB
VBR 70% → CBR 159kb/s 542MB
VBR 80% → CBR 158kb/s 554MB
CBR 256kbit/s → VBR 250-256kb/s 570MB

abbriviations used:
VBR … aac “Quality-based VBR”
% … Quality setting in %
250-256kb/s … Bit rate of 250 and Max. bit rate of 256
The bit rates include 2 channels (stereo)

Remarks on the surprising results:

  1. CBR settings result in VBR, but VBR settings can result in CBR.
  2. Medium quality VBR (50%) results a VBR of 250 (average?), which is much better than a higher quality VBR (70%, 80%) setting which turnes out as a CBR of 159kbit/s.
  3. Both settings VBR 50% and CBR (256kbit/s) produce a VBR of 250 with a maximum bit rate of 256 kbit/s. While the result should be identical according to MediaInfo, the latter of them is 5% larger.
  4. VBR 70% and 80% produce CBR of approximately the same quality, but the better quality setting of 80% results in a slightly lower bitrate of 158kb/s.

Findings:
Anyone aware of this, keeping it for himself? For me the audio encoder is an unpredictable black box, which causes headache to me.

The page for which you got the non-responsive checking for a bot, responds for me:
https://trac.ffmpeg.org/wiki/Encode/AAC#native
It says:

Constant bit rate using -b:a
Variable bit rate using -q:a
Native FFmpeg AAC Encoder does not do CBR audio encoding.

I am not sure what to make of the last line. Maybe it means that “constant” is actually average and maybe mediainfo reports that as “variable” because average is a form of variable. Things are rarely truly constant in modern lossy codecs as that often requires padding data, which is wasteful. Rather, constant more often means not under- or over-flowing a decoder buffer size (i.e. a very strict average). I think better terminology is like quality-based (as I chose to use in Shotcut), loose bitrate (average), and tight bitrate (constant). And then there’s constrained VBR for video which is quality-oriented with a bitrate ceiling.

Shotcut uses MLT’s equivalent of those for the aac audio encoder, which are ab and aq respectively.
When I use a stock Shotcut video preset with AAC audio I get the same result as you with mediainfo–VBR. But when I use the audio/AAC preset, mediainfo reports CBR even though it uses the same ffmpeg library parameters. With ffmpeg command line mediainfo always reports CBR even when I use -q:a.

In Shotcut export, using defaults, I simply reduced the “constant” bitrate to 128k, and now mediainfo reports “constant.” So, I am not sure what is happening between FFmpeg and mediainfo, and it seems not trust worthy. Similar to what was reported here: