[FFmpeg-user] stereo downmix error aac HEv2

Sean Darcy seandarcy2 at gmail.com
Sat Mar 15 00:22:27 CET 2014


On 03/14/2014 07:10 PM, Sean Darcy wrote:
> On 03/14/2014 07:00 PM, Sean Darcy wrote:
>> On 03/14/2014 06:19 PM, Sean Darcy wrote:
>>> stripping audio from a VOB , I was trying to reencode to a lower
>>> bitrate, and downmix to mono. git March 13.
>>>
>>>   This worked fine:
>>>
>>> ffmpeg -i /mnt/dvd/VIDEO_TS/VTS_01_1.VOB -vn -c:a libfdk_aac -b:a 48k
>>> -ac 1  1-Talk-show-ac1-48testk.m4a
>>>
>>> and I can use HEv2 if I don't downmix:
>>>
>>> ffmpeg -i /mnt/dvd/VIDEO_TS/VTS_01_1.VOB -vn -c:a libfdk_aac -profile:a
>>> aac_he_v2 -b:a 48k  1-Talk-he-ac2-48testk.m4a
>>>
>>> But:
>>>
>>> ffmpeg -i /mnt/dvd/VIDEO_TS/VTS_01_1.VOB -vn -c:a libfdk_aac -profile:a
>>> aac_he_v2 -b:a 48k -ac 1 1-Talk-he-ac1-48testk.m4a
>>> ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
>>>    built on Mar 13 2014 15:33:24 with gcc 4.8.2 (GCC) 20131212 (Red Hat
>>> 4.8.2-7)
>>>    configuration: --prefix=/usr --bindir=/usr/bin
>>> --datadir=/usr/share/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man
>>> --shlibdir=/usr/lib64 --extra-cflags='-Ofast -march=native -mtune=native
>>> -fopenmp -fomit-frame-pointer -pipe' --enable-avresample --enable-static
>>> --enable-shared --enable-gray --enable-gpl --enable-nonfree
>>> --enable-version3 --enable-postproc --enable-avfilter
>>> --enable-avresample --enable-pthreads --enable-x11grab --enable-gray
>>> --enable-vaapi --enable-hardcoded-tables --enable-libaacplus
>>> --enable-avisynth --enable-frei0r --enable-libfdk-aac --enable-libgsm
>>> --enable-libmp3lame --enable-libopenjpeg --enable-libopus
>>> --enable-librtmp --enable-libschroedinger --enable-libspeex
>>> --enable-libtheora --enable-libvo-aacenc --enable-libvorbis
>>> --enable-libvpx --enable-libx264 --enable-libxvid --enable-zlib
>>> --disable-debug --cpu=amdfam10 --arch=x86_64 --enable-pic
>>> --enable-libopencv --enable-openssl
>>>    libavutil      52. 66.101 / 52. 66.101
>>>    libavcodec     55. 52.102 / 55. 52.102
>>>    libavformat    55. 34.101 / 55. 34.101
>>>    libavdevice    55. 11.100 / 55. 11.100
>>>    libavfilter     4.  3.100 /  4.  3.100
>>>    libavresample   1.  2.  0 /  1.  2.  0
>>>    libswscale      2.  5.101 /  2.  5.101
>>>    libswresample   0. 18.100 /  0. 18.100
>>>    libpostproc    52.  3.100 / 52.  3.100
>>> Input #0, mpeg, from '/mnt/dvd/VIDEO_TS/VTS_01_1.VOB':
>>>    Duration: 00:07:22.24, start: 0.280633, bitrate: 19421 kb/s
>>>      Stream #0:0[0x1bf]: Data: dvd_nav_packet
>>>      Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480
>>> [SAR 8:9 DAR 4:3], max. 3000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn,
>>> 59.94 tbc
>>>      Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
>>> [libfdk_aac @ 0x12b3300] Unable to initialize the encoder: SBR library
>>> initialization error
>>> Output #0, ipod, to '1-Talk-he-ac1-48testk.m4a':
>>>      Stream #0:0: Audio: aac (HE-AACv2), 48000 Hz, mono, s16, 48 kb/s
>>> Stream mapping:
>>>    Stream #0:2 -> #0:0 (ac3 -> libfdk_aac)
>>> Error while opening encoder for output stream #0:0 - maybe incorrect
>>> parameters such as bit_rate, rate, width or height
>>>
>>> Thanks for any help.
>>>
>>> sean
>>
>> Oddly, this works:
>>
>> ffmpeg -i /mnt/dvd/VIDEO_TS/VTS_01_1.VOB -vn -c:a libfdk_aac -profile:a
>> aac_he_v2 -b:a 48k -ac 2 1-Talk-he-ac1-48testk.m4a
>>
>> So it's not just a problem passing the audio channels argument.
>>
>> sean
>
> More messing around, and it seems the HEv2 won't handle mono at all!
> Here I've taken the output from the successful downmix above and used it
> as input:
>
> ffmpeg -i 1-Talk-show-ac1-48testk.m4a -vn -c:a libfdk_aac -profile:a
> aac_he_v2 -b:a 48k  1-Talk-he-from-ac1-48testk.m4a
> ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
>    built on Mar 13 2014 15:33:24 with gcc 4.8.2 (GCC) 20131212 (Red Hat
> 4.8.2-7)
>    configuration: --prefix=/usr --bindir=/usr/bin
> --datadir=/usr/share/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man
> --shlibdir=/usr/lib64 --extra-cflags='-Ofast -march=native -mtune=native
> -fopenmp -fomit-frame-pointer -pipe' --enable-avresample --enable-static
> --enable-shared --enable-gray --enable-gpl --enable-nonfree
> --enable-version3 --enable-postproc --enable-avfilter
> --enable-avresample --enable-pthreads --enable-x11grab --enable-gray
> --enable-vaapi --enable-hardcoded-tables --enable-libaacplus
> --enable-avisynth --enable-frei0r --enable-libfdk-aac --enable-libgsm
> --enable-libmp3lame --enable-libopenjpeg --enable-libopus
> --enable-librtmp --enable-libschroedinger --enable-libspeex
> --enable-libtheora --enable-libvo-aacenc --enable-libvorbis
> --enable-libvpx --enable-libx264 --enable-libxvid --enable-zlib
> --disable-debug --cpu=amdfam10 --arch=x86_64 --enable-pic
> --enable-libopencv --enable-openssl
>    libavutil      52. 66.101 / 52. 66.101
>    libavcodec     55. 52.102 / 55. 52.102
>    libavformat    55. 34.101 / 55. 34.101
>    libavdevice    55. 11.100 / 55. 11.100
>    libavfilter     4.  3.100 /  4.  3.100
>    libavresample   1.  2.  0 /  1.  2.  0
>    libswscale      2.  5.101 /  2.  5.101
>    libswresample   0. 18.100 /  0. 18.100
>    libpostproc    52.  3.100 / 52.  3.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1-Talk-show-ac1-48testk.m4a':
>    Metadata:
>      major_brand     : M4A
>      minor_version   : 512
>      compatible_brands: isomiso2
>      encoder         : Lavf55.34.101
>    Duration: 00:40:51.28, start: 0.042667, bitrate: 49 kb/s
>      Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono,
> fltp, 48 kb/s (default)
>      Metadata:
>        handler_name    : SoundHandler
> [libfdk_aac @ 0x1079840] Unable to initialize the encoder: SBR library
> initialization error
> Output #0, ipod, to '1-Talk-he-from-ac1-48testk.m4a':
>    Metadata:
>      major_brand     : M4A
>      minor_version   : 512
>      compatible_brands: isomiso2
>      encoder         : Lavf55.34.101
>      Stream #0:0(und): Audio: aac (HE-AACv2), 48000 Hz, mono, s16, 48
> kb/s (default)
>      Metadata:
>        handler_name    : SoundHandler
> Stream mapping:
>    Stream #0:0 -> #0:0 (aac -> libfdk_aac)
> Error while opening encoder for output stream #0:0 - maybe incorrect
> parameters such as bit_rate, rate, width or height
>
> Is this a bug? Or does the HEv2 profile simply not accept mono?
>
> sean

But aac HE works:

ffmpeg -i /mnt/dvd/VIDEO_TS/VTS_01_1.VOB -vn -c:a libfdk_aac -profile:a 
aac_he -b:a 48k -ac 1  1-Talk-he1-ac1-48testk.m4a
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
   built on Mar 13 2014 15:33:24 with gcc 4.8.2 (GCC) 20131212 (Red Hat 
4.8.2-7)
   configuration: --prefix=/usr --bindir=/usr/bin 
--datadir=/usr/share/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man 
--shlibdir=/usr/lib64 --extra-cflags='-Ofast -march=native -mtune=native 
-fopenmp -fomit-frame-pointer -pipe' --enable-avresample --enable-static 
--enable-shared --enable-gray --enable-gpl --enable-nonfree 
--enable-version3 --enable-postproc --enable-avfilter 
--enable-avresample --enable-pthreads --enable-x11grab --enable-gray 
--enable-vaapi --enable-hardcoded-tables --enable-libaacplus 
--enable-avisynth --enable-frei0r --enable-libfdk-aac --enable-libgsm 
--enable-libmp3lame --enable-libopenjpeg --enable-libopus 
--enable-librtmp --enable-libschroedinger --enable-libspeex 
--enable-libtheora --enable-libvo-aacenc --enable-libvorbis 
--enable-libvpx --enable-libx264 --enable-libxvid --enable-zlib 
--disable-debug --cpu=amdfam10 --arch=x86_64 --enable-pic 
--enable-libopencv --enable-openssl
   libavutil      52. 66.101 / 52. 66.101
   libavcodec     55. 52.102 / 55. 52.102
   libavformat    55. 34.101 / 55. 34.101
   libavdevice    55. 11.100 / 55. 11.100
   libavfilter     4.  3.100 /  4.  3.100
   libavresample   1.  2.  0 /  1.  2.  0
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 18.100 /  0. 18.100
   libpostproc    52.  3.100 / 52.  3.100
Input #0, mpeg, from '/mnt/dvd/VIDEO_TS/VTS_01_1.VOB':
   Duration: 00:07:22.24, start: 0.280633, bitrate: 19421 kb/s
     Stream #0:0[0x1bf]: Data: dvd_nav_packet
     Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 
[SAR 8:9 DAR 4:3], max. 3000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
     Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Output #0, ipod, to '1-Talk-he1-ac1-48testk.m4a':
   Metadata:
     encoder         : Lavf55.34.101
     Stream #0:0: Audio: aac (libfdk_aac) (HE-AAC) (mp4a / 0x6134706D), 
48000 Hz, mono, s16, 48 kb/s
Stream mapping:
   Stream #0:2 -> #0:0 (ac3 -> libfdk_aac)
Press [q] to stop, [?] for help
[ac3 @ 0x73e080] incomplete framebitrate=  48.0kbits/s
size=   14589kB time=00:40:51.26 bitrate=  48.8kbits/s
video:0kB audio:14364kB subtitle:0 data:0 global headers:0kB muxing 
overhead 1.568673%

Hmmm.

sean



More information about the ffmpeg-user mailing list