0

I tried encoding audio stream into AAC with a variable bitrate mode — I followed the advice from FFmpeg VBR Settings and changed my original option -b:a 128k to -q:a 1.3 in this original command

ffmpeg -channel_layout stereo -i sc2.avs -b:a 128k -ar 24000 -ac 2 sc2.mp4

But I still obtained a constant audio bitrate.

Output from MediaInfo:

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 1 min 26 s
Duration_LastFrame                       : -29 ms
Bit rate mode                            : Constant
Bit rate                                 : 119 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 24.0 kHz
Frame rate                               : 23.438 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 1.23 MiB (8%)
Default                                  : Yes
Alternate group                          : 1

The Any Video Converter (the old version 3.5.8), which internally uses FFmpeg, convert the same input into VBR mode:

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 1 min 26 s
Bit rate mode                            : Variable
Bit rate                                 : 75.3 kb/s
Maximum bit rate                         : 142 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 24.0 kHz
Frame rate                               : 23.438 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 778 KiB (9%)
Language                                 : English
Encoded date                             : UTC 2019-12-19 13:30:13
Tagged date                              : UTC 2019-12-19 13:30:13

How to reach VBR audio output?

(I need it because of Dissolve() function in AviSynth source file produces horrible sound for CBR, whereas it's nice for Any Video Converter's VBR audio output.)

0

According to the wiki, you are likely to get worse results with the default AAC encoder when using VBR. See: https://trac.ffmpeg.org/wiki/Encode/AAC

One suggestion would be to use libfdk_aac. The other would be to demux the audio, re-encode it using a different encoder, and then remux that file back in to the video using ffmpeg.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.