Opened 16 months ago

Closed 16 months ago

Last modified 16 months ago

#10153 closed defect (invalid)

AAC-LATM: Mono identified as stereo

Reported by: Peter Krefting Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
AAC-LATM sample with one center channel is identified as stereo by ffprobe; mediainfo identifies it as mono, which is what I expect.

How to reproduce:

$ ./ffprobe mono.aac 
ffprobe version N-109662-g2c3107c3e9 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: 
  libavutil      57. 44.100 / 57. 44.100
  libavcodec     59. 57.100 / 59. 57.100
  libavformat    59. 36.100 / 59. 36.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 54.100 /  8. 54.100
  libswscale      6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
Input #0, loas, from 'mono.aac':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Audio: aac_latm (HE-AACv2), 48000 Hz, stereo, fltp
$ mediainfo mono.aac
General
Complete name                            : mono.aac
Format                                   : LATM
File size                                : 392 KiB
Overall bit rate mode                    : Variable

Audio
Format                                   : AAC LC SBR
Format/Info                              : Advanced Audio Codec Low Complexity with Spectral Band Replication
Commercial name                          : HE-AAC
Format settings                          : NBC
Codec ID                                 : 2
Bit rate mode                            : Variable
Channel(s)                               : 1 channel
Channel layout                           : C
Sampling rate                            : 48.0 kHz
Frame rate                               : 23.438 FPS (2048 SPF)
Compression mode                         : Lossy

Sample file can be downloaded at https://e1.pcloud.link/publink/show?code=XZqLcmZ3cdBnltyjjbn3SiSAnKpaFxvKHwk

Initially I thought this was the same as #3361, but the warning message added in 6406d5e430953085a0100b44dd8fceb478b383e2 is, as far as I can tell, not issued.

Change History (2)

comment:1 by Balling, 16 months ago

Resolution: invalid
Status: newclosed

Mono HE-AAC is always treated as stereo! Because it can become stereo at any point, spec permits that. All, aac_fixed, aac float, aac_latm and libfdk_aac treat mono as stereo, ALWAYS.

And it does print the warning message

PS C:\Users\XXXX> ffplay.exe -v verbose mono.aac
ffplay version N-109662-g2c3107c3e9-20230125 Copyright (c) 2003-2023 the FFmpeg developers
  built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --disable-libmfx --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20230125
  libavutil      57. 44.100 / 57. 44.100
  libavcodec     59. 57.100 / 59. 57.100
  libavformat    59. 36.100 / 59. 36.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 54.100 /  8. 54.100
  libswscale      6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
  libpostproc    56.  7.100 / 56.  7.100
Initialized direct3d renderer.
[aac_latm @ 000001ade9754e40] Treating HE-AAC mono as stereo.=0/0
Input #0, loas, from 'mono.aac':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Audio: aac_latm (HE-AACv2), 48000 Hz, stereo, fltp
[ffplay_abuffer @ 000001ade9774200] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:mono
[ffplay_abuffersink @ 000001ade975bf80] auto-inserting filter 'auto_aresample_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[auto_aresample_0 @ 000001ade9775bc0] ch:1 chl:mono fmt:fltp r:48000Hz -> ch:1 chl:mono fmt:s16 r:48000Hz
[aac_latm @ 000001ade9757c40] Treating HE-AAC mono as stereo.
[ffplay_abuffer @ 000001ade975bf80] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[ffplay_abuffersink @ 000001adf2586580] auto-inserting filter 'auto_aresample_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[auto_aresample_0 @ 000001ade9776280] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
Created 640x480 texture with SDL_PIXELFORMAT_ARGB8888.
[AVIOContext @ 000001ade975c1c0] Statistics: 32768 bytes read, 0 seeks
Last edited 16 months ago by Balling (previous) (diff)

comment:2 by Balling, 16 months ago

BTW, Elon, can you look into why

ffplay.exe mono.aac

causes race condition in which it prints:

Input #0, loas, from 'C:\Users\ZAQU\Downloads\mono.aac': 0B f=0/0

that 0B f=0/0 is obviously from another line,

   1.04 M-A:  0.000 fd=   0 aq=    5KB vq=    0KB sq=    0B f=0/0
Last edited 16 months ago by Balling (previous) (diff)
Note: See TracTickets for help on using tickets.