Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Session command SetSubtitleStreamIndex does not set the subtitle #6365

Open
muisje opened this issue Dec 5, 2024 · 5 comments
Open

API Session command SetSubtitleStreamIndex does not set the subtitle #6365

muisje opened this issue Dec 5, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@muisje
Copy link

muisje commented Dec 5, 2024

Describe The Bug

when sending the SetSubtitleStreamIndex command with the api it does not set it to the subtitle.

Steps To Reproduce

  1. Play a movie with subtitles
  2. Find out your session id
  3. Make one of these requests:
    http://localhost/Sessions/{sessionId}/Command/SetSubtitleStreamIndex
    http://localhost/Sessions/{sessionId}/System/SetSubtitleStreamIndex

{"Index": 0}
or
http://localhost/Sessions/{sessionId}/Command
{"Name": "SetSubtitleStreamIndex", "ControllingUserId": {userid}, "Arguments": {"Index": 0}}

or

http://localhost/Sessions/{sessionId}/Playing

Result is that subtitle does not change or gets deactivated

Expected Behavior
Subtitle should change

System (please complete the following information):

  • Platform: Linux
  • Browser: Firefox, Edge
  • Jellyfin Version:
    Server version
    10.10.3
    Web version
    10.10.3
    Build version
    10.10.3

Additional Context

sending a get request to http://localhost/Sessions has in it's responses that this command is supported

It works on the android tv app

It does not work on: jellyfin media player, the android app, web browser

@muisje muisje added the bug Something isn't working label Dec 5, 2024
@muisje
Copy link
Author

muisje commented Dec 6, 2024

And would it possible to check in the event of a metadata update while playing it to check if the subtitle file changed? I'm asking this because I'm creating something that that generates subtitles on demand with ai transcription, it does chunks and starts when the media plays. The thing is i can't force jellyfin to use the updated subtile while the media is playing and i want to do that to use the updated subtitle.

@viown
Copy link
Member

viown commented Dec 21, 2024

@muisje After trying to update the index, do you see a Received command message in console logs?

This seems to work on my end. Here is how I did it:

  1. Send POST request to Sessions/{sessionId}/Command
  2. In the body schema, pass the following JSON:
{
	"Name": "SetSubtitleStreamIndex",
	"Arguments": {
		"Index": 2
	}
}

/Sessions/{sessionId}/Command/{command} does not seem to support passing arguments, but Sessions/{sessionId}/Command does.

@muisje
Copy link
Author

muisje commented Dec 22, 2024

@viown Thanks that works!

So would it be possible to make the session use an updated subtitle file while playing? I'm refreshing the metadata, but it seems that i manually have to start and stop playing to get the updated subtitle file

@viown
Copy link
Member

viown commented Dec 22, 2024

The subtitle file has to be scanned before it can be recognized in playback. You should most likely do your processing to your media in advance.

@muisje
Copy link
Author

muisje commented Dec 22, 2024

Yeah i would agree, but what I'm trying to do is create the subtitle on demand. So what i mean is that the creation of the subtitle starts when a movie gets played. And while the movie is playing the subtitle file gets updated. The only thing that missing is that jellyfin picks up the new/updated subtitle file while playing.

Why I'm trying to make this happen is that the creation of the subtitle file with ai transcribing is quite demanding and isn't quick, but it can be fast enough to do this on demand.

So what i would like is the ability to force reloading of a subtitle file while a movie is being played if that would be possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants