#3361: aac_he mono not recogized (reported as stereo) -------------------------------------+------------------------------------- Reporter: blacktrash | Owner: Type: defect | Status: new Priority: important | Component: avcodec Version: git-master | Resolution: Keywords: aac | Blocked By: regression | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+-------------------------------------
Comment (by JohnWarburton): Replying to [ticket:3361 blacktrash]: > Summary of the bug: > > Channel count and channel layout for aac_he mono is always reported (decoded?) as stereo. > Same observed 26 May 2020. FFmpeg, using libfdk_aac and "profile:a he_aac", believes it is encoding mono, but on inputting the encoded file, FFmpeg reports stereo and he_aac_v2. {{{ ffmpeg -i .\h.mp3 -af dynaudnorm=g=5:r=1:m=20.0:b=1,alimiter=limit=-10dB -ac 1 -ar 32000 -profile:a aac_he -c:a libfdk_aac mono.aac ffmpeg version N-97952-g2502e13b07-COMPILED_BY_JohnWarburton Copyright (c) 2000-2020 the FFmpeg developers built with gcc 10.1.1 (GCC) 20200522 configuration: --arch=x86_64 --target-os=mingw32 --cross- prefix=/home/john/MultimediaTools- mingw-w64/sandbox/x86_64-w64-mingw32/bin/x86_64-w64-mingw32- --pkg-config =pkg-config --enable-libjack --disable-doc --enable-libxml2 --enable- opencl --enable-gpl --enable-libtesseract --enable-libx264 --enable- avisynth --enable-libxvid --enable-libmp3lame --enable-libmysofa --enable- version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable- libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable- libgsm --enable-libfreetype --enable-libopus --disable-w32threads --enable-libcodec2 --enable-frei0r --enable-filter=frei0r --enable-bzlib --enable-libxavs --enable-libxavs2 --enable-libopencore-amrnb --enable- libopencore-amrwb --enable-libvo-amrwbenc --enable-libvpx --enable-libilbc --enable-libwavpack --enable-libwebp --enable-libgme --enable-libbs2b --enable-libmfx --enable-librubberband --enable-dxva2 --enable-d3d11va --enable-nvenc --enable-nonfree --enable-libfdk-aac --enable-libflite --enable-decoder=aac --enable-libaom --enable-runtime-cpudetect --enable- libpulse --enable-cuda-nvcc --prefix=/home/john/MultimediaTools- mingw-w64/sandbox/x86_64-w64-mingw32/x86_64-w64-mingw32 --enable-shared --disable-static --disable-debug --disable-stripping --enable-libsoxr --enable-fontconfig --enable-libass --enable-libbluray --enable-iconv --enable-libtwolame --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpsapi --enable-opengl --extra- libs=-lz --extra-libs=-lpng --enable-libvidstab --enable-decklink --extra- libs=-loleaut32 --enable-libcdio --enable-libzimg --enable-chromaprint --enable-libsnappy --enable-libx265 --enable-lv2 --enable-libklvanc --logfile=/dev/tty --extra-cflags= --extra- version=COMPILED_BY_JohnWarburton --extra-cxxflags=-Wno-narrowing libavutil 56. 49.100 / 56. 49.100 libavcodec 58. 87.101 / 58. 87.101 libavformat 58. 43.100 / 58. 43.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 83.100 / 7. 83.100 libswscale 5. 6.101 / 5. 6.101 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Input #0, mp3, from '.\h.mp3': Duration: 00:00:44.93, start: 0.025057, bitrate: 103 kb/s Stream #0:0: Audio: mp3, 44100 Hz, mono, fltp, 103 kb/s Metadata: encoder : LAME3.99r File 'mono.aac' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (mp3 (mp3float) -> aac (libfdk_aac)) Press [q] to stop, [?] for help Output #0, adts, to 'mono.aac': Metadata: encoder : Lavf58.43.100 Stream #0:0: Audio: aac (libfdk_aac) (HE-AAC), 32000 Hz, mono, s16, 34 kb/s Metadata: encoder : Lavc58.87.101 libfdk_aac size= 192kB time=00:00:44.89 bitrate= 35.1kbits/s speed=26.3x video:0kB audio:192kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000% }}} And mediainfo -f reports it's mono: {{{ $ mediainfo -f mono.aac General Count : 308 Count of stream of this kind : 1 Kind of stream : General Kind of stream : General Stream identifier : 0 Count of audio streams : 1 Audio_Format_List : AAC Audio_Format_WithHint_List : AAC Audio codecs : AAC LC-SBR Complete name : mono.aac File name : mono File extension : aac Format : ADTS Format : ADTS Format/Info : Audio Data Transport Stream Format/Extensions usually used : aac Commercial name : ADTS Codec : ADTS Codec : ADTS Codec/Info : Audio Data Transport Stream Codec/Extensions usually used : aac File size : 196779 File size : 192 KiB File size : 192 KiB File size : 192 KiB File size : 192 KiB File size : 192.2 KiB Overall bit rate mode : VBR Overall bit rate mode : Variable Stream size : 0 Stream size : 0.00 Byte (0%) Stream size : Byte0 Stream size : 0.0 Byte Stream size : 0.00 Byte Stream size : 0.000 Byte Stream size : 0.00 Byte (0%) Proportion of this stream : 0.00000 File creation date : UTC 2020-05-26 15:01:25.297 File creation date (local) : 2020-05-26 16:01:25.297 File last modification date : UTC 2020-05-26 15:06:00.284 File last modification date (local) : 2020-05-26 16:06:00.284 Audio Count : 254 Count of stream of this kind : 1 Kind of stream : Audio Kind of stream : Audio Stream identifier : 0 Format : AAC Format/Info : Advanced Audio Codec Commercial name : AAC Format version : Version 4 Format profile : HE-AAC / LC Format settings, SBR : Yes (Implicit) Format settings, SBR : Yes (Implicit) Codec : AAC LC-SBR Codec : AAC LC-SBR Bit rate mode : VBR Bit rate mode : Variable Channel(s) : 1 Channel(s) : 1 channel Channel positions : Front: C Channel positions : 1/0/0 ChannelLayout : C Sampling rate : 32000 / 16000 Sampling rate : 32.0 KHz / 16.0 KHz Compression mode : Lossy Compression mode : Lossy Stream size : 196779 Stream size : 192 KiB (100%) Stream size : 192 KiB Stream size : 192 KiB Stream size : 192 KiB Stream size : 192.2 KiB Stream size : 192 KiB (100%) Proportion of this stream : 1.00000 }}} But ffmpeg and ffprobe report the file is stereo: {{{ ffprobe .\mono.aac ffprobe version N-97952-g2502e13b07-COMPILED_BY_JohnWarburton Copyright (c) 2007-2020 the FFmpeg developers built with gcc 10.1.1 (GCC) 20200522 configuration: --arch=x86_64 --target-os=mingw32 --cross- prefix=/home/john/MultimediaTools- mingw-w64/sandbox/x86_64-w64-mingw32/bin/x86_64-w64-mingw32- --pkg-config =pkg-config --enable-libjack --disable-doc --enable-libxml2 --enable- opencl --enable-gpl --enable-libtesseract --enable-libx264 --enable- avisynth --enable-libxvid --enable-libmp3lame --enable-libmysofa --enable- version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable- libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable- libgsm --enable-libfreetype --enable-libopus --disable-w32threads --enable-libcodec2 --enable-frei0r --enable-filter=frei0r --enable-bzlib --enable-libxavs --enable-libxavs2 --enable-libopencore-amrnb --enable- libopencore-amrwb --enable-libvo-amrwbenc --enable-libvpx --enable-libilbc --enable-libwavpack --enable-libwebp --enable-libgme --enable-libbs2b --enable-libmfx --enable-librubberband --enable-dxva2 --enable-d3d11va --enable-nvenc --enable-nonfree --enable-libfdk-aac --enable-libflite --enable-decoder=aac --enable-libaom --enable-runtime-cpudetect --enable- libpulse --enable-cuda-nvcc --prefix=/home/john/MultimediaTools- mingw-w64/sandbox/x86_64-w64-mingw32/x86_64-w64-mingw32 --enable-shared --disable-static --disable-debug --disable-stripping --enable-libsoxr --enable-fontconfig --enable-libass --enable-libbluray --enable-iconv --enable-libtwolame --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpsapi --enable-opengl --extra- libs=-lz --extra-libs=-lpng --enable-libvidstab --enable-decklink --extra- libs=-loleaut32 --enable-libcdio --enable-libzimg --enable-chromaprint --enable-libsnappy --enable-libx265 --enable-lv2 --enable-libklvanc --logfile=/dev/tty --extra-cflags= --extra- version=COMPILED_BY_JohnWarburton --extra-cxxflags=-Wno-narrowing libavutil 56. 49.100 / 56. 49.100 libavcodec 58. 87.101 / 58. 87.101 libavformat 58. 43.100 / 58. 43.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 83.100 / 7. 83.100 libswscale 5. 6.101 / 5. 6.101 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [aac @ 0000024422d46a00] Estimating duration from bitrate, this may be inaccurate Input #0, aac, from '.\mono.aac': Duration: 00:00:38.05, bitrate: 41 kb/s Stream #0:0: Audio: aac (HE-AACv2), 32000 Hz, stereo, fltp, 41 kb/s }}} And FFmpeg's stream analysis reports stereo, and HE-AACv2: {{{ ffprobe -show_streams mono.aac ffprobe version N-97952-g2502e13b07-COMPILED_BY_JohnWarburton Copyright (c) 2007-2020 the FFmpeg developers built with gcc 10.1.1 (GCC) 20200522 configuration: --arch=x86_64 --target-os=mingw32 --cross- prefix=/home/john/MultimediaTools- mingw-w64/sandbox/x86_64-w64-mingw32/bin/x86_64-w64-mingw32- --pkg-config =pkg-config --enable-libjack --disable-doc --enable-libxml2 --enable- opencl --enable-gpl --enable-libtesseract --enable-libx264 --enable- avisynth --enable-libxvid --enable-libmp3lame --enable-libmysofa --enable- version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable- libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable- libgsm --enable-libfreetype --enable-libopus --disable-w32threads --enable-libcodec2 --enable-frei0r --enable-filter=frei0r --enable-bzlib --enable-libxavs --enable-libxavs2 --enable-libopencore-amrnb --enable- libopencore-amrwb --enable-libvo-amrwbenc --enable-libvpx --enable-libilbc --enable-libwavpack --enable-libwebp --enable-libgme --enable-libbs2b --enable-libmfx --enable-librubberband --enable-dxva2 --enable-d3d11va --enable-nvenc --enable-nonfree --enable-libfdk-aac --enable-libflite --enable-decoder=aac --enable-libaom --enable-runtime-cpudetect --enable- libpulse --enable-cuda-nvcc --prefix=/home/john/MultimediaTools- mingw-w64/sandbox/x86_64-w64-mingw32/x86_64-w64-mingw32 --enable-shared --disable-static --disable-debug --disable-stripping --enable-libsoxr --enable-fontconfig --enable-libass --enable-libbluray --enable-iconv --enable-libtwolame --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpsapi --enable-opengl --extra- libs=-lz --extra-libs=-lpng --enable-libvidstab --enable-decklink --extra- libs=-loleaut32 --enable-libcdio --enable-libzimg --enable-chromaprint --enable-libsnappy --enable-libx265 --enable-lv2 --enable-libklvanc --logfile=/dev/tty --extra-cflags= --extra- version=COMPILED_BY_JohnWarburton --extra-cxxflags=-Wno-narrowing libavutil 56. 49.100 / 56. 49.100 libavcodec 58. 87.101 / 58. 87.101 libavformat 58. 43.100 / 58. 43.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 83.100 / 7. 83.100 libswscale 5. 6.101 / 5. 6.101 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [aac @ 0000021fda366b00] Estimating duration from bitrate, this may be inaccurate Input #0, aac, from 'mono.aac': Duration: 00:00:38.05, bitrate: 41 kb/s Stream #0:0: Audio: aac (HE-AACv2), 32000 Hz, stereo, fltp, 41 kb/s [STREAM] index=0 codec_name=aac codec_long_name=AAC (Advanced Audio Coding) profile=HE-AACv2 codec_type=audio codec_time_base=1/32000 codec_tag_string=[0][0][0][0] codec_tag=0x0000 sample_fmt=fltp sample_rate=32000 channels=2 channel_layout=stereo bits_per_sample=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 time_base=1/28224000 start_pts=N/A start_time=N/A duration_ts=1073864023 duration=38.047903 bit_rate=41375 max_bit_rate=N/A bits_per_raw_sample=N/A nb_frames=N/A nb_read_frames=N/A nb_read_packets=N/A DISPOSITION:default=0 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 DISPOSITION:timed_thumbnails=0 [/STREAM] }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/3361#comment:20> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker _______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org https://ffmpeg.org/mailman/listinfo/ffmpeg-trac To unsubscribe, visit link above, or email ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".