Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#7862 closed defect (invalid)

Default channel layout for 6 channels

Reported by: lukasf Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

I have noticed that av_get_default_channel_layout() returns AV_CH_LAYOUT_5POINT1_BACK as default layout for 6 channels. Is this a bug or is this intended? Normally, 5.1 audio has side left/right channels, not back left/right. So it should be AV_CH_LAYOUT_5POINT1, not AV_CH_LAYOUT_5POINT1_BACK.

Surround back channels are normally used only in 7.1 setups, not in 5.1.

The default could be easily fixed by re-ordering the values in channel_layout_map.

Change History (4)

in reply to:  description ; comment:1 by Carl Eugen Hoyos, 5 years ago

Keywords: channel layout av_get_default_channel_layout removed
Resolution: needs_more_info
Status: newclosed

Replying to lukasf:

Normally, 5.1 audio has side left/right channels, not back left/right.

Why do you think so?

This ticket shows the reason why we always require a command line including a complete, uncut console output: There is an ugly regression iirc, but your explanation doesn't explain it.

in reply to:  1 comment:2 by lukasf, 5 years ago

Resolution: needs_more_info
Status: closedreopened
Version: unspecified4.1

Replying to cehoyos:

Replying to lukasf:

Normally, 5.1 audio has side left/right channels, not back left/right.

Why do you think so?

I have tested a lot of 5.1 files and all of them report side channels, not back channels. Surround back channels were only introduced with appearance of 7.1 standards. 7.1 AV receivers have surround back channels, 5.1 receivers don't. The normal surround left/right channels from 5.1 times are interpreted as side left/right today (to map the 5.1 speakers into a generic 7.1-capable interface).

This ticket shows the reason why we always require a command line including a complete, uncut console output: There is an ugly regression iirc, but your explanation doesn't explain it.

I use ffmpeg as library, I do not know how to reproduce the problem via command line. If I find a way, I will post it here. I used "n4.1.2" in my testing, but "n4.1.3" does not seem to have a change in that area.

When looking at the code, it is easy to see why AV_CH_LAYOUT_5POINT1_BACK is used, because it is listed before AV_CH_LAYOUT_5POINT1 and the list is searched from beginning to end.

Actually I think that it was even done by intention. But the question is, why has it been done like that, and shouldn't it be changed. When setting channel layout from the command line, channel layout "5.1" will use AV_CH_LAYOUT_5POINT1_BACK, only channel layout "5.1(side)" will use AV_CH_LAYOUT_5POINT1. So even from those command line values, AV_CH_LAYOUT_5POINT1_BACK is used as the "default" 5.1 layout, although it is a rather exotic configuration. And AV_CH_LAYOUT_5POINT1 is treated as special case, although it is the (IMHO) "normal" layout for a 5.1 file. In my opinion, it should be opposite: AV_CH_LAYOUT_5POINT1 should be the default and AV_CH_LAYOUT_5POINT1_BACK should be a special case, like "5.1(back)".

comment:3 by Elon Musk, 5 years ago

Resolution: invalid
Status: reopenedclosed

This can not be changed, as would need big changes to codebase.

comment:4 by Carl Eugen Hoyos, 5 years ago

Version: 4.1unspecified

For future tickets: Note that only current FFmpeg git head is supported on this bug tracker, there is no release support.

Note: See TracTickets for help on using tickets.