Dynamic aspect ratio switch
#1
Hey there,

I've added support for common HDMI aspect ratios to my skin: 4:3 and 21:9 besides the standard 16:9. This should be useful not only for monitors/projectors that use these aspect ratios, but also for different aspect ratio video output. During playback of, let's say, 4:3 video, the normal 16:9 OSD/skin wouldn't be squeezed to fit the 4:3 output, but it could use the native 4:3 skin version. So much for the theory.
In the wild, Kodi doesn't switch aspect ratios supported by a skin on the fly - you have to reload the skin entirely (which is not practical in daily use during playback on users' devices out there). On the fly aspect ratio switching would be really useful especially on setups that don't only support framerate switching or resolution switching during playback, but also aspect ratio switching.

How can this be achieved or is this rather a feature request for the skinning engine? Huh
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply
#2
If you want it to work for videos you can use VideoPlayer.VideoAspect to change the OSD layouts.
Reply
#3
(2019-10-06, 09:23)Hitcher Wrote: If you want it to work for videos you can use VideoPlayer.VideoAspect to change the OSD layouts.

Does this change the whole skin's aspect ratio, if a video playback switches the output resolution/aspect ratio to e.g. 480p 4:3? It would need to then switch to the skin's 4:3 mode defined in the addon.xml.
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply
#4
No, what I meant was you can show certain skin elements depending on the VideoPlayer.VideoAspect by using conditional includes.
Reply
#5
(2019-10-08, 13:28)Hitcher Wrote: No, what I meant was you can show certain skin elements depending on the VideoPlayer.VideoAspect by using conditional includes.

OK. As it's possible to back out of a playback, it would be really useful to fully switch the skin to a native 4:3 mode. Only adjusting certain elements is not really an option with 4:3 video playback.

Is support for on the fly aspect ratio switching planned? That was one of the main reasons for adding a 4:3 mode.
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply
#6
I hope to get some help here... I've now reverted to using the Skin.AspectRatio info label to be able to adjust dimensions and placement of skin items depending on the output aspect ratio (I've put all coordinates into includes that are replaced based on skin aspect ratio conditions). This should - in theory - make this work perfectly: all aspect ratios supported in addon.xml would now get a perfectly adjusted skin version without any relative values.

Problem now: the skin engine doesn't return the correct aspect ratio all the time. E.g. if the system is set to a 16:9 resolution, whitelisting is activated including 4:3 SD resolutions (PAL/NTSC) and a 4:3 SD video is played back, the skin engine still returns 16:9 although the best matching skin aspect ratio to the actual system's output screen aspect ratio should now be 4:3. Only when reloading the skin during playback, the skin's aspect ratio infolabel switches to 4:3. But then it doesn't switch back to 16:9 once playback is stopped - until one reloads the skin again.
Can anyone help here? This seems to be a huge bug in the way the skin aspect ratio info label is populated and makes it basically unusable combined with whitelisting and aspect ratio changes happening on-the-fly.
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply
#7
(2019-10-08, 13:44)Chillbo Wrote: Is support for on the fly aspect ratio switching planned? That was one of the main reasons for adding a 4:3 mode. 



Automatic aspect ratio switching USED TO WORK !
Kodi 18.2 was the last one where video would switch to 4:3 mid-stream if the aspect changed and vice versa.  Since then it is broken for me, on Windows builds at least.
On Raspberry Pi it hasn't worked for me since Jarvis 16.1 (one of the main reasons I am stuck on old versions and can't update)
On Debian x86 it still works OK on 17.1 (Stretch) and 17.6 (Buster - current)

I can provide sample video to test if req'd, it's repeatable, would be great to fix.
There's also a problem with additional AD soundtracks in 18+, but not for this thread.
Reply
#8
Sorry, to correct you here... This thread is not about videos changing aspect ratio during playback, but the skinning engine and more specific the skin aspect ratio info label reacting to aspect ratio changes when playback starts, stops or whenever an aspect ratio change happens. This is a skin related topic, not a video player related one.
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply
#9
Is the issue I'm describing understandable? As I see it, skins like Estuary work around this, but perfectly adjusted skin versions for different aspect ratios are not possible without a properly changing infolabel and the option to switch the skin engine's aspect ratio on-the-fly.
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply

Logout Mark Read Team Forum Stats Members Help
Dynamic aspect ratio switch0