Opened 5 months ago

Closed 4 months ago

Last modified 4 months ago

#9057 closed defect (fixed)

AAC 7.1 channels mixed up in decoding

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

Description

Summary of the bug:

I have an 8 channel audio file that I'm encoding as AAC. When inspecting the channels of the created aac file using ffmpeg, they appear to be in the wrong order or even added together.

This appears to be a problem in decoding, as inspecting the aac file with other software (I used Audacity) shows the channels in the correct order.

This problem appeared in ffmpeg 4.3. In ffmpeg 4.2.4 the channels are ok.

How to reproduce:

I'm using the 8_Channel_ID.wav file attached to this ticket.
I'm encoding to AAC using:

ffmpeg -i 8_Channel_ID.wav out.aac

First I inspect the channels using:

ffmpeg -i out.aac -filter_complex "showwavespic=s=1280x480:split_channels=1" -frames:v 1 -f image2 - | display

The result looks like the first two channels have been swapped with the last two.

Then I inspect the channels using:

ffmpeg -i out.aac -filter_complex "channelsplit=channel_layout=7.1,join=inputs=8:channel_layout=7.1,showwavespic=s=1280x480:split_channels=1" -frames:v 1 -f image2 - | display

The result looks like the last two channels have been added to the first two.

Attachments (1)

fix2.patch (1.2 KB ) - added by kmamal 5 months ago.

Download all attachments as: .zip

Change History (5)

comment:1 by kmamal, 5 months ago

File is too big to attach so I'm linking it: https://www.dropbox.com/s/5uyzuuz0wgvn5t4/8_Channel_ID.wav?dl=0

comment:2 by kmamal, 5 months ago

Did a git bisect and the problem first appeared in 4d9b9c5e4637ac15205467f16fcac92a28e18f18

Last edited 4 months ago by Carl Eugen Hoyos (previous) (diff)

comment:3 by kmamal, 5 months ago

I'm guessing layout_map[2][2] = AAC_CHANNEL_SIDE; still needs to be set on every call? I'll attach a proposed patch.

by kmamal, 5 months ago

Attachment: fix2.patch added

comment:4 by Carl Eugen Hoyos, 4 months ago

Component: undeterminedavcodec
Keywords: aac regression added
Priority: normalimportant
Resolution: fixed
Status: newclosed
Version: unspecifiedgit-master

Pushed as fbe9b0c8f3ee1ff1d36c6a6cd7fe6fc0c6a9e80d, thank you for the report and the fix!

Note: See TracTickets for help on using tickets.