[FFmpeg-user] Why does HE-AAC v2 in libfdk_aac not take the bitrate as specified?

Werner Robitza werner.robitza at gmail.com
Mon Sep 8 16:42:58 CEST 2014


Something I just noticed.. when I encode audio with libfdk_aac, and I
use the default profile, I get what I want:

ffmpeg -i TL00_SRC01.avi -c:a libfdk_aac -vn -b:a 320k ../tmp/audio-320-lc.m4a
ffmpeg version 2.2.3 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun 16 2014 06:10:18 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree
--enable-version3
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, avi, from 'TL00_SRC01.avi':
  Metadata:
    encoder         : Lavf55.48.101
  Duration: 00:00:59.00, start: 0.000000, bitrate: 86450 kb/s
    Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv420p, 1920x1080,
SAR 1:1 DAR 16:9, 24 tbr, 24 tbn, 24 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz,
stereo, s16, 1411 kb/s
Output #0, ipod, to '../tmp/audio-320-lc.m4a':
  Metadata:
    encoder         : Lavf55.33.100
    Stream #0:0: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 44100
Hz, stereo, s16, 320 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (pcm_s16le -> libfdk_aac)
Press [q] to stop, [?] for help
size=    2318kB time=00:00:59.02 bitrate= 321.7kbits/s
video:0kB audio:2307kB subtitle:0 data:0 global headers:0kB muxing
overhead 0.462997%

If I use the HE-AAC v2 profile, I always get the same maximum bitrate:

ffmpeg -i TL00_SRC01.avi -c:a libfdk_aac -profile:a aac_he_v2 -vn -b:a
320k ../tmp/audio-320.m4a
ffmpeg version 2.2.3 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun 16 2014 06:10:18 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree
--enable-version3
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, avi, from 'TL00_SRC01.avi':
  Metadata:
    encoder         : Lavf55.48.101
  Duration: 00:00:59.00, start: 0.000000, bitrate: 86450 kb/s
    Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv420p, 1920x1080,
SAR 1:1 DAR 16:9, 24 tbr, 24 tbn, 24 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz,
stereo, s16, 1411 kb/s
File '../tmp/audio-320.m4a' already exists. Overwrite ? [y/N] y
Output #0, ipod, to '../tmp/audio-320.m4a':
  Metadata:
    encoder         : Lavf55.33.100
    Stream #0:0: Audio: aac (libfdk_aac) (HE-AACv2) (mp4a /
0x6134706D), 44100 Hz, stereo, s16, 320 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (pcm_s16le -> libfdk_aac)
Press [q] to stop, [?] for help
size=     468kB time=00:00:59.04 bitrate=  65.0kbits/s
video:0kB audio:463kB subtitle:0 data:0 global headers:0kB muxing
overhead 1.233869%

Why is that? Is there a limit on how fdk_aac can generate high
bitrate? Or is the parameter actually not passed along properly?

Unfortunately I can't test now with Git master, but maybe someone can?


More information about the ffmpeg-user mailing list