Kodi as surround decoder/AVR
#1
Hi there,

Is it possible to use Kodi with a multi-channel sound interface as a surround decoder, like a libre man's AVR?  For example, a machine with an ESI Gigaport eX attached, fed directly to a 7-channel power amplifier?

In particular, can Kodi render Dolby Atmos?  I've tried a lot of searching but the Interwebs give me little or seemingly poor information.  This Reddit thread claims
Quote:You can’t convert TrueHD Atmos to 7.1LPCM, atmos is a metadata stream so it cannot be converted to raw pcm, atmos has to be passthroughed.
but that doesn't make sense.  The receiver to which Kodi passes the Atmos metadata stream presumably must render the metadata to raw PCM before outputting to speakers so there's no reason why Kodi couldn't do that.  Did perhaps the Reddit user mean to say that Atmos rendering is simply something Kodi doesn't yet support?  Searching through these forums, all the information I can find just talks about Kodi doing passthrough for Atmos rather than rendering.

I'm also curious about speaker setup.  Is it possible for Kodi to handle manual speaker configuration for surround setups, or even automatic configuration/room correction?

Thanks,

rah
Reply
#2
Thread moved to video support
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
Kodi can decode the TrueHD portion of the Atmos audio to LPCM e.g. the 5.1/7.1 element, however no one in the open source community has found a way yet to decode the Atmos extension that provides the height audio and the object effect mapping.
Reply
#4
(2024-12-26, 21:35)jjd-uk Wrote: no one in the open source community has found a wa y yet to decode the Atmos extension that provides the height audio and the object effect mapping

I see, thanks.  I saw this thread on Audio Science Review where the author of some software called "Cavern" makes a seemingly convincing case against Atmos "object movement", which I presume is what you're referring to as "object effect mapping" here.  He also talks about 16-channel 9.1.6 static mixes:
 
Quote:we have this 9.1.6 maximum. Why shouldn't they just pre-render that? Well, they do! Your mix is pre-made, sounds exactly the same on that layout, saves computing power, allows for transport over ARC, etc. Every lower channel count available for home users can be losslessly matrix mixed from 9.1.6, the formulas yield the exact same result after these 2 transformations compared to just mixing straight to a lower channel count.

...

There are completely channel-based Atmos mixes that are exceptionally good, like Ready Player One.

Although it's not clear what sources he's referring to (studio mixes, Blu-rays, video-on-demand streams, etc.), presuming that there are sources with 16-channel streams, could Kodi play them at the moment?  And if so, would it down-mix them to 5.1 or 7.1 or whatever?
Reply
#5
Also, regardless of Atmos support, what about speaker setup?  Can Kodi do DSP for surround sound, like an AVR?
Reply
#6
No Kodi can't do DSP
Reply
#7
(2024-12-29, 13:00)jjd-uk Wrote: No Kodi can't do DSP

Accidentally found this thread by googling Cavern, and I have a solution for Atmos rendering. I've just finished an Atmos renderers service, which only needs a few lines from a media player to make it Atmos-compatible. I'd like to contribute this to Kodi, could you help me where should I start?
Reply
#8
(2025-01-24, 14:57)VoidX Wrote:
(2024-12-29, 13:00)jjd-uk Wrote: No Kodi can't do DSP

Accidentally found this thread by googling Cavern, and I have a solution for Atmos rendering. I've just finished an Atmos renderers service, which only needs a few lines from a media player to make it Atmos-compatible. I'd like to contribute this to Kodi, could you help me where should I start?

What does that do that Kodi doesn't already do? as Kodi can already bitstream Atmos and will decode Atmos to LPCM (except the height channels of course because there's no concept of height channels with LPCM).
Reply
#9
(2025-01-24, 15:17)jjd-uk Wrote: What does that do that Kodi doesn't already do? as Kodi can already bitstream Atmos and will decode Atmos to LPCM (except the height channels of course because there's no concept of height channels with LPCM).

This is the only open source software that can decode proper Atmos with height channels, to any layout set by the user. There is a complete backend for spatially realigning 7.1 mixes too, because it reassigns what each PCM channel transports. By default, for 5.1.2, sides become heights, but more are possible.
Reply
#10
I don't know too much about the detailed inner workings of our code for the audio system so not sure if it would be possible to integrate that, perhaps it could be done as an binary addon, however that might need a new API to communicate with the exisiting AudioEngine. The most knowledge person is @fritsch but he doesn't always have a lot of time these days.
Reply
#11
Yeah, I checked the docs and code, but couldn't find any audio or decoder related extension point, this is why I need the help. The best idea I have is changing the function that calls libavcodec to send data to this pipe instead when it's available.
Reply
#12
Interesting project! I don't know much about the audio susbsystem either but to be sure, what are the inputs and outputs and what platform(s) does it support?
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#13
(2025-02-01, 08:39)CrystalP Wrote: Interesting project! I don't know much about the audio susbsystem either but to be sure, what are the inputs and outputs and what platform(s) does it support?

The input is each E-AC-3 frame (so every packet in an MKV file), and the result is decoded PCM data in the user-selected channel layout. The server itself is in .NET 8, so it can be compiled for Windows/Mac/Linux, but the minimal UI for it (meter display and online status, nothing important) is Windows only because of the framework used. Than can easily be changed.
Reply
#14
We did have the beginnings of a DSP audio subsystem in work, you can read about at https://forum.kodi.tv/forumdisplay.php?fid=235

However as the people working on it couldn't continue with it, it was ripped out of the code and after being left to rot for a bit. Going be the effect they put in then I would think this could be a very big undertaking to do right, but I'm a skin dev and not a C++ coder so could be wrong on that.

However perhaps some of the PR's of adding/removing may give inspiration

https://github.com/xbmc/xbmc/pull/4402
https://github.com/xbmc/xbmc/pull/9949
https://github.com/xbmc/xbmc/pull/13723
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi as surround decoder/AVR0
This forum uses Lukasz Tkacz MyBB addons.