[FFmpeg-user] VBR encoding not supported ???

Ferdi Scholten ferdi at sttc-nlp.nl
Sun Apr 28 19:24:49 EEST 2024


On 28-04-2024 12:44, Aditya Dandavate wrote:
> I was converting flac audio to aac_lc with libfdk_aac with VBR encoding.
> But I saw a message about VBR encoding.
>
> The command and output of the command is as follows :
>
> Command :
>
> ffmpeg.exe -i input.flac -c:a libfdk_aac -afterburner 1 -frame_length 1024
> -cutoff 0 -vbr 5 -profile:a aac_low output.m4a°
>
> Output :
>
> F:\DSDA-Doom>ffmpeg.exe -i input.flac -c:a libfdk_aac -afterburner 1
> -cutoff 0 -frame_length 1024 -profile:a aac_low -vbr 5 output.m4a
> ffmpeg version N-115010-ga2cdb2f5be Copyright (c) 2000-2024 the FFmpeg
> developers
>    built with gcc 13.2.0 (Rev6, Built by MSYS2 project)
>    configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache
> g++' --ld='ccache g++' --extra-cxxflags=-fpermissive
> --extra-cflags=-Wno-int-conversion --disable-autodetect
> --enable-libopus --enable-libvorbis --enable-libx264 --enable-libx265
> --enable-libaom --disable-debug --enable-libfdk-aac --enable-schannel
> --enable-gpl --enable-nonfree
>    libavutil      59. 16.101 / 59. 16.101
>    libavcodec     61.  5.103 / 61.  5.103
>    libavformat    61.  3.103 / 61.  3.103
>    libavdevice    61.  2.100 / 61.  2.100
>    libavfilter    10.  2.101 / 10.  2.101
>    libswscale      8.  2.100 /  8.  2.100
>    libswresample   5.  2.100 /  5.  2.100
>    libpostproc    58.  2.100 / 58.  2.100
> Input #0, flac, from 'input.flac':
>    Metadata:
>      encoder         : Lavf61.3.103
>    Duration: 02:05:52.13, start: 0.000000, bitrate: 621 kb/s
>    Stream #0:0: Audio: flac, 48000 Hz, stereo, s16
> Stream mapping:
>    Stream #0:0 -> #0:0 (flac (native) -> aac (libfdk_aac))
> Press [q] to stop, [?] for help
> [libfdk_aac @ 000001b9623d7400] *Note, the VBR setting is unsupported
> and only works with some parameter combinations*
> Output #0, ipod, to 'output.m4a':
>    Metadata:
>      encoder         : Lavf61.3.103
>    Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, s16
>        Metadata:
>          encoder         : Lavc61.5.103 libfdk_aac
> [out#0/ipod @ 000001b962402280] video:0KiB audio:229238KiB
> subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead:
> 0.605099%
> size=  230625KiB time=02:05:52.13 bitrate= 250.2kbits/s speed=18.1x
>
> F:\DSDA-Doom>pause
> Press any key to continue . . .
>
>
> So, may I know what's wrong with VBR to the point its unsupported ? Is
> it going to be removed in the future from the encoder ? Is it
> considered experimental or stable ?
>
>
> Please tell me about this 🙏
>
>
> Thanks
>
Well, the warning is not from ffmpeg but from libfdk_aac and this is the 
reason:

     "As of FDK version 3.4.12, not all combinations of audio object 
types, bitrate modes, channel layouts, and sample rates can be used 
together, due to a limited table of pre-computed values used by the 
encoder. For example, using 96kHz stereo input with the AAC-LC audio 
object type and bitrate mode 5 (VBR 96-112kbps/channel) will result in 
catastrophic failure"

There has been a patch to (partly) resolve this, but it still has 
limits, hence the warning.

Also, VBR 1-4 can only be used with specific (low) sampling rates, only 
5 can be used for samplerates >15 kHz

Fraunhofer does not recommend using VBR with this codec.

Generally, if your device supports the Opus codec, use that, it has 
(much) better quality at the same bitrate as AAC, or much smaller files 
with the same quality as AAC


More information about the ffmpeg-user mailing list