Kodi Community Forum
Req Audio channel layout info label - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Req Audio channel layout info label (/showthread.php?tid=377319)



Audio channel layout info label - Hitcher - 2024-04-29

Currently skinners only have ListItem.AudioChannels with which to work out the channel layout.

Quote:ListItem.AudioChannels
Shows the number of audio channels of the currently selected video (possible values: 1, 2, 4, 5, 6, 7, 8, 10)

And they generally use the following variable to convert this to the channel layout:

xml:
<variable name="AudioChannels">
<value condition="String.IsEqual(ListItem.AudioChannels,0)">0.0</value>
<value condition="String.IsEqual(ListItem.AudioChannels,1)">1.0</value>
<value condition="String.IsEqual(ListItem.AudioChannels,2)">2.0</value>
<value condition="String.IsEqual(ListItem.AudioChannels,3)">2.1</value>
<value condition="String.IsEqual(ListItem.AudioChannels,4)">4.0</value>
<value condition="String.IsEqual(ListItem.AudioChannels,5)">4.1</value>
<value condition="String.IsEqual(ListItem.AudioChannels,6)">5.1</value>
<value condition="String.IsEqual(ListItem.AudioChannels,7)">6.1</value>
<value condition="String.IsEqual(ListItem.AudioChannels,8)">7.1</value>
<value condition="String.IsEqual(ListItem.AudioChannels,10)">9.1</value>
<value>$INFO[ListItem.AudioChannels]</value>
</variable>

This works for the most part but there are times when this is wrong.
For example when a movie has this layout:

Code:
Channel(s) : 4 channels
Channel layout : C L R LFE

It isn't 4.0 but instead 3.1 and the player process screen confirms this:

Image

This also confirms that Kodi extracts this information somewhere so an info label could be possible; just knowing there's an LFE would help.


RE: Audio channel layout info label - Chillbo - 2024-08-15

This would be a great addition! Having to guess which layout it actually is, is quite frustrating.
Atm, you either pretend it's accurate and present users something potentially faulty or you have to show an ambiguity that might be worthless most of the times: either show 4.0 or 4.0/3.1, although 4.0 might be correct most of the times, but one cannot be sure 😊


RE: Audio channel layout info label - BigRedJim - 2024-10-26

Yes agreed, this would be a big improvement.