Opened 18 months ago

Last modified 5 months ago

#8656 new defect

Encoding 7.1 channel audio with the native AAC encoder should use PCE

Reported by: Rob Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: aac
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Encoding 7.1 channel audio (FL FR FC LFE BL BR SL SR) with the native AAC encoder produces an output file using channel configuration 7, while the same command except using the FDK AAC encoder produces an output file with a PCE. Channel configuration 7 is supposed to correspond to "7.1(wide)" though some players will interpret this as "7.1" [rear] instead. Considering the inconsistencies in interpreting channel configuration 7, it should probably use a PCE in this case, matching the FDK AAC encoder.

How to reproduce:

% ffmpeg -i "7.1auditionOutLeader v2.wav" -c:a aac -b:a 640k out_aac.mkv
ffmpeg version N-97630-gae8980319b-gbdd57e2a37+1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.0 (Rev2, Built by MSYS2 project)

% ffmpeg -i "7.1auditionOutLeader v2.wav" -c:a libfdk_aac -b:a 640k out_fdkaac.mkv
ffmpeg version N-97630-gae8980319b-gbdd57e2a37+1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.0 (Rev2, Built by MSYS2 project)

out_aac.mkv will output the following warning if used as input, since it uses channel configuration 7:

[aac @ 00000183de2e1940] Assuming an incorrectly encoded 7.1 channel layout instead of a spec-compliant 7.1(wide) layout, use -strict 1 to decode according to the specification instead.

Input file is from:
https://www2.iis.fraunhofer.de/AAC/7.1auditionOutLeader%20v2.wav

Looking at the PCE code in libavcodec/aacenc.h, it looks like most of the listed configurations are incorrect, so that would likely have to be fixed here -- if I'm interpreting it correctly, it is going to output channels in the order L R C ... instead of C L R ... and there are likely other things that are incorrect (LFE missing in .1 configs, etc.)

Attachments (1)

cmd_output.txt (18.4 KB ) - added by Rob 18 months ago.
full command output

Download all attachments as: .zip

Change History (3)

by Rob, 18 months ago

Attachment: cmd_output.txt added

full command output

comment:1 by Carl Eugen Hoyos, 17 months ago

Which player interprets the files written by FFmpeg as 7.1(wide)?

Note: See TracTickets for help on using tickets.