Next / previous subtitle shortcut - CE21

Is it possible to have shortcut in the remote for next/previous subtitle? I only want to use 2 subtitles (external): one of the language I´m learning, and one of my native language, and I would like to be able to quickly switch between them

If it´s not possible, then a way to disable internal subs of the mkv, would also be great

Thx, and sorry for my bad english

It is possible, with keymaps.

You need to find the code for the button on the remote control that you want to use to change the subtitles.
Only the two subtitles you want to use should be in the file.

e.g.:
SUB1
SUB2

If the movie starts, there won’t be subtitles.

If you press the programmed remote control button, the SUB1 appears.
If you press the button again, the SUB2 appears.
If you press the button again, the SUB2 disappears.
If you press the button again, the SUB1 appears.
And so on…

This is what your file will look like:

gen.xml

<keymap>
	<FullscreenVideo>
		<keyboard>
			<key id="61490">nextsubtitle</key>
		</keyboard>
	</FullscreenVideo>
</keymap>

61490 is my code of my remote, You have to figure yours out for yourself.

Thanks. But what if there are a lot of subtitles?how can I go to the previous subtitle so I don’t have to cycle through all the languages?

That’s why I wrote that there should only be those two subtitles in the video. I don’t know any other solution. Maybe someone else can.
With mkvmerge that process is 1-2 min…to take out the unnecessary subtitles.

There is also previoussubtitle action like nextsubtitle.

You need to keys.
Or map only one with default for next and with mod="longpress" for previous.

Thanks, but the videos aren´t local, can´t use that

<key id="61520">nextsubtitle</key> works perfect, but <key id="61520">previoussubtitle</key> does nothing here. Would be perfect if it worked

Thanks

Did you try them separately?
Because you can’t have two separate keymaps with the same number (“61520”) in a single file, if it is not set to longpress.

<keymap>
	<FullscreenVideo>
		<keyboard>
			<key id="61520">nextsubtitle</key>
			<key id="61520" mod="longpress">previoussubtitle</key>
		</keyboard>
	</FullscreenVideo>
</keymap>

I tried them separately, yes, one each time
Does your keymap work for you?

I haven’t tried yet

Not here. I have tested with several buttons, and seems like “previoussubtitle” doesn´t exist

I assume your longpress is not working.

You can test commands from SSH terminal with

kodi-send -a nextsubtitle
kodi-send -a previoussubtitle

Both works here.

I didnt use longpress. Just this for testing purposes, and previoussubtitle is not working

<keymap>
	<FullscreenVideo>
		<keyboard>
			<key id="61520">nextsubtitle</key>
			<key id="61519">previoussubtitle</key>
		</keyboard>
	</FullscreenVideo>
</keymap>

Enable kodi debug log, play some movie and press both keys few times.

Here it is

“Change to the previous subtitle language, if there is more than one (does not allow subtitles to be disabled). (v22 Piers addition)”

You are using the 21.3 Omega version.
If I’m not mistaken and I’m interpreting this correctly, this new feature only works with 22 piers.

True. previoussubtitle is only on CE22.

And next time please use paste command for logs and don’t upload to forum. Or uload them to some online resource. We don’t have unlimited resources for such things. This applies to EVERYBODY.

You mean previoussubtitle? Because nextsubtitle is working ok in 21.3
Sorry for the attachment, just deleted it

previoussubtitle of course