Kodi Community Forum

Full Version: Simple python script to change DisplaySettings during playback
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm new to Kodi development and I wanted to start off with a simple script that gets called when I press a button during playback of a video to change some playback settings (e.g. audio offset, brightness, etc.).

In C++ I can call
cpp:
CDisplaySettings::GetInstance().SetVerticalShift(float)
to change the vertical shift of the current video. However, I can't seem to find any way to do this with a simple python script that I want to execute when a certain button/key is pressed.

As an alternative to a python script, is there another approach to achieve this without having to actually compile C++ code and/or Kodi itself?
does anyone know how to make this work?
haven't tested it, but some of those settings can be changed from python i think:
python:
xbmc.executebuiltin('Action(AudioDelayPlus)')

there are actions for verticalshift as well, but i don't see anything related to brightness.
see: https://kodi.wiki/view/Action_IDs
(2019-12-11, 16:27)ronie Wrote: [ -> ]haven't tested it, but some of those settings can be changed from python i think:
python:
xbmc.executebuiltin('Action(AudioDelayPlus)')

there are actions for verticalshift as well, but i don't see anything related to brightness.
see: https://kodi.wiki/view/Action_IDs

thanks, but I thought of changing the audio delay by a specified int, which I don't seem to be able to specify here.
what would this actually do? delay audio in 25ms?
(2019-12-20, 15:28)shmizan Wrote: [ -> ]thanks, but I thought of changing the audio delay by a specified int, which I don't seem to be able to specify here.
what would this actually do? delay audio in 25ms?

it's indeed not possible to specify a delay value.
you're correct on the 25ms.