xbmc.player() - How to get to the subtitles
#1
Hello,

How I can access to the actual subtitles, loaded/enabled currently in xbmc.Player(), when video is played? 

Is there any option, how to:
  1. Find out, if subtitles are enabled or not
  2. find out, what is filepath of currently used subtitles or
  3. find out content of currently used subtitles to be able work with it
Reply
#2
Probably https://codedocs.xyz/AlwinEsch/kodi/grou...36c6010991
Learning Linux the hard way !!
Reply
#3
I already tried 

getAvailableSubtitleStreams() and getSubtitles(), but it seems it returns only string name, for example:

getAvailableSubtitleStreams => ['eng']
getSubtitles => eng

When I downloaded subtitles from opensubtitles to <name>.<sublangid>.srt format.

That doesnt helps me get to the content of the file Sad
Reply
#4
nobody knows? Sad
Reply
#5
(2021-05-16, 10:25)JimmySmith2 Wrote: nobody knows?

Perhaps create a Github ticket with all possible information if the functionality you're after is incorrect or incomplete.
Reply
#6
(2021-05-16, 10:25)JimmySmith2 Wrote: nobody knows? Sad
You can get more information about the subtitles through the JSONRPC interface. More specifically the Player.GetProperties call.

It does not give you the filename I think (also not sure what filename would be for embedded subtitles or DVD), but you can see if subtitles are enabled and which are available.

You can check out the code of my audio/subtitle selection addon (work in progress) for some examples https://github.com/mvdwetering/service.saasbops
Reply
#7
Thanks, I will check whats avaialable there, but actually the goal is get to the subtitles - My thought is check, lets say some % minutes before video ends, if user has enabled subtitles in Kodi. And if yes (nevermind, if they have it from video container, or copied along video file manually, or use some 3rd party plugin for download them), check, if they are available on OpenSubtitles, and if not, upload them automatically there under users OS credentials.

Check time before video ends should assure, that subtitles are valid and OK (as user watch whole video with them), and it would help any other users, which are using OpenSubtitles to check subtitles..
Reply
#8
Hi,
The same issue in 2022.
Does anyone know how can I get the filename path of the subtitles that comes and integrated with the video file from the player?
Reply

Logout Mark Read Team Forum Stats Members Help
xbmc.player() - How to get to the subtitles0