xbmc / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.
https://kodi.tv/
Other
18.62k stars 6.31k forks source link

Add an option to preserve LFE channel on x.0 speaker configs #23103

Closed hyc closed 3 months ago

hyc commented 1 year ago

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

When decoding 5.1 audio with 4.0 channel configuration, the LFE channel doesn't get output anywhere.

Expected Behavior

Here is a clear and concise description of what was expected to happen:

It would be nice if there was an option to mix the LFE signal back into the main/front Left/Right channels, just like the center channel is mixed in. In my case, my front speakers are powered and include a subwoofer, but there's no dedicated input for that sub. My outboard Dolby/DTS decoder mixes the LFE channel to the front by default, when using passthrough. But using Kodi's 4.0 speaker config, the LFE channel is just omitted.

Actual Behavior

Using 5.1 test patterns, there is no sound for the LFE signal from any speakers.

Possible Fix

I don't know if changing this behavior by default is a good idea or not, but if not the default it would be nice to have an option to mix the LFE channel in.

To Reproduce

Steps to reproduce the behavior:

  1. Use a 4.0 channel speaker configuration.
  2. Play any Dolby/DTS 5.1 channel test video or audio file.
  3. Note that when the sample should be exercising the LFE channel, no audio is produced from any channel.

Debuglog

The debuglog can be found here:

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

github-actions[bot] commented 4 months ago

This issue is now marked stale because it has been open over a year without activity. Remove the stale label or add a comment to reset the stale state.

garbear commented 4 months ago

@fritsch Is this solved?

fritsch commented 4 months ago

From a technical POV this is a feature request. While I agree technically, that Kodi should, when full range speakers are connected, depending on setting, add the bass to the two full range fronts.

I for years configured Kodi to 5.1 to let my AVR do this. But that's unfair for people not having one. Therefore I implemented a POC. It is somewhere here on GitHub.

garbear commented 4 months ago

found it: https://github.com/xbmc/xbmc/pull/25395

rsalvaterra commented 3 months ago

found it: #25395

@fritsch, I tested yesterday's build of LibreELEC and the LFE downmix setting seems to work fine, thanks a lot! I just have a question: from what I've read, the LFE channel is supposed to have 10 dB of headroom, with most AVRs automatically applying a +10 dB gain to it (which is unrelated to the subwoofer volume, which is there just to tune the bass presence relative to the other frequencies). Shouldn't this be configurable too?

fritsch commented 3 months ago

The AVRs I know have a proper calibration. In short: I have no interest, but you can simply edit your skin and change the percentage value to e.g. 150%

rsalvaterra commented 3 months ago

The AVRs I know have a proper calibration.

Sure, but this option isn't exactly for people with AVRs, is it? Like you said, you delegated the x.0 + LFE downmixing task to your AVR, so it wasn't a priority. However, there are probably many people out there with line-connected analog stereo amplifiers.

~Anyway, it's simple enough to change, thanks.~

Actually, it isn't. I was thinking about advancedsettings.xml, but this is different. The skin in LibreELEC is stored in /usr, which is read-only (I can't fathom why an overlayfs-based solution for user data storage wasn't chosen, though, but that's another issue). How can this setting be changed to an arbitrary value?

By the way, I'm assuming a value of 100 % means "no amplification", whilst a value of 200 % would mean "double the volume", or 10 dB. Is this correct?

thexai commented 3 months ago

Implemented in https://github.com/xbmc/xbmc/pull/25395