Switch between two profiles with script?

#1

I wonder if its possible to design a script in omsc that can perform a function where I can switch between two profiles when watching tv series with different aspect ratios, like this:

open tvshow x, episode x, if parent tvshow download folder is name x then switch to profile 2 and open same video file ( episode x ), when pressing stop switch back to master profile in tv show menu.

Is something like this possible?

#2

It sounds like your probably trying to go about something the wrong way round. If you can explain exactly what it is that your trying to change between those two profiles then we should be able to provide some guidance.

#3

I want to have 2 different video calibration settings, one for 16:9 and one for 2:1 aspect ratio tv shows. I have 2 different settings right now bit in 2 different profiles. It works but its not as smooth when switching between the two.

#4

You could use the Kodi JSON interface to switch profiles. Have a look at the API docs: https://kodi.wiki/view/JSON-RPC_API/v8#Profiles

2 Likes
#5

Why are you doing this with the calibration settings? When your playing a video does changing the “view mode” (OSD>settings>video settings>view mode) not get you where you want to be? You can map a remote button to cycle that setting if you wanted. Alternatively does your display not offer zoom options.

#6

There is also a setting that may take care of your issue automatically depending on your source.
Settings>Player>Videos>Display 4:3 videos as> (choose your preference)

#7

ok I doubt it will be that easy but I will check out those settings :slight_smile:

#8

checked out those settings I’m sure they are suffecient if you use a normal tv but it’s a little more difficult with a projector with an anamorphic lens, I need to get into the video calibration settings to unstretch the picture horizontally.

But I don’t see how those calibration settings can be saved for a specific video, it would be great if they could.

#9

If the videos you are wanting to adjust differently are all something like 480p you could use the whitelist (you must have adjust frame rate on) and that would send the original size video out. Kodi keeps separate calibration settings for each output resolution (as do many displays). Just keep in mind that the whitelist will only switch to your UI resolution and the whitelited ones, so you must whitelist every resolution/frame rate you want to output.

#10

thanks for the tip, but that wont work either since its hd resolution, like netflix stranger things for example, it has black bars but those are not as big as a cinemascope movie.

#11

ok, how about this:

I open up a tv show, then the osd video controls become available, I then run a simple script with specific settings for zoom and video calibration etc, this can then be mapped to a keypress in kodi. And then I map another key with standard settings when I want to switch back.

#12

I tested and found that zoom settings can be saved individually for each video, why are the video calibration settings not saved individually too, can this be forced saved?, all I would like to do is this:

press button a: video resolution, setting x, zoom amount setting x
press button b: video resolution, setting y, zoom amount setting y

come on programmers ! :slight_smile:

#13

No, because calibration is not intended to be used as you are trying to use it.

#14

AFAIK there is no function currently in Kodi to map to a specific zoom level for video. You can use a keymap to program remote buttons to ZoomIn/ZoomOut. You could also make it a macro by using the method in this thread.

#15

sounds like there is no way to achieve what I want without switching profiles so I think I will go that route since that profile has all the video resolution setup the way I want.

But it would be great if I could program this:

keypress a: switch to profile 2, go into tv shows.
keypress b: switch back to main profile, go into tv shows.

Is it possible?

/Challe

#16

The Kodi JSON api allows you to switch profiles via a script.

1 Like
#17

I don’t know about the go into tv shows part but programing a profile to a button press…
https://kodi.wiki/view/Keymap#Profile_built-in.27s

How exactly loading a profile and then finding what you want to play would be preferable than just hitting zoom is confusing to me but to each their own I guess.

#18

thanks will check out those 2 suggestions.
And zoom wont work with how my projector+lens is setup.