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

[Bug] Subtitles Don't Always Load #145

Closed
seniorm0ment opened this issue Sep 1, 2019 · 68 comments · Fixed by #3825
Closed

[Bug] Subtitles Don't Always Load #145

seniorm0ment opened this issue Sep 1, 2019 · 68 comments · Fixed by #3825
Labels
bug Something isn't working playback Issue related to media playback

Comments

@seniorm0ment
Copy link

Subtitles don't always load, tested on Nvidia Shield TV and a Mibox.
Some films they do and others they don't.

On the films they don't, this usually occurs with me selecting the subtitle I want, then it says "Loading subtitles", I let it sit for a minute or two, sometimes it just lingers and most times it ends up saying "Subtitles could not be loaded"

(Unrelated but another issue I've come across with subtitles is sometimes I would click "No subtitles" to disable them, they go away but then about 30sec later they turn back on, I go back and manually disable them again (The "no subtitles" is still selected which is odd, I just click it again) and then it's fine throughout the rest of the show.

@thornbill thornbill added the bug Something isn't working label Sep 12, 2019
@thornbill
Copy link
Member

Have you happened to notice if this happens for a particular subtitle format? I have noticed this also, but haven't tracked down the specifics as to what causes it.

@seniorm0ment
Copy link
Author

Have you happened to notice if this happens for a particular subtitle format?

Not entirely sure, but it was happening on a series that had SUBRIP subtitles.

@seniorm0ment
Copy link
Author

Just tried watching a movie (Different from my original post) that has SUBRIP subtitles as well, and the same occured.
I click the subtitle of choice, it says "Subtitle loading..." just lingers and eventually says "Subtitle could not be loaded".

Can't say for sure whether or not it's SUBRIPS. But I was having issues with anime subtitles, and I know at least one of the shows was using ASS subtitles. Same issue. I didn't try it with the movie I got done watching, but usually with anime, if I go into options and enable external player, and have it open in MxPlayer.. it plays perfectly fine with the subtitles. I'd assume this to be the case with the movie as well, but unable to check right now.

@seniorm0ment
Copy link
Author

Do we have any word about this? Still trouble unfortunately

@nielsvanvelzen
Copy link
Member

The subtitle selector is a bit broken, I haven't found the underlying issue yet. In version 0.13 (after the next major release) we're going to rewrite a lot of code related to the playback functionality so this issue should be fixed then.

@nielsvanvelzen nielsvanvelzen added the playback Issue related to media playback label May 29, 2020
@stale
Copy link

stale bot commented Sep 28, 2020

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@stale stale bot added the stale label Sep 28, 2020
@seniorm0ment
Copy link
Author

Seems to still occur every now and then, however it seems to be working overall far more often than it used to.

@stale stale bot removed the stale label Sep 29, 2020
@raver2046
Copy link

This bug is still actual.
How can I help you to fix this?
I use exoplayer forced.

@seniorm0ment
Copy link
Author

I've been using Kodi with Jellyfin, and it's been working great personally
Probably won't be going back to the app
But yeah that's your temporary solution maybe

@raver2046
Copy link

Problem : Kodi on TCL 55C715 => 17 fps (on 20160p video)
Plex media player all is ok (exoplayer)
Jellyfin all is ok with exoplayer but subtitles problems...

If you have a clue of the part of the code to fix i can check a little bit (former C# dev.)

@mblennegard
Copy link
Contributor

I am also having this issue on Nvidia Shield TV.
I almost always get the subtitles eventually though, but only after waiting with the message "Subtitles loading" message for a minute.

Sometimes I have to manually select no subtitles and then select the subtitle yet again before getting it to work.

@stale
Copy link

stale bot commented Sep 3, 2021

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@stale stale bot added the stale label Sep 3, 2021
@thornbill thornbill added confirmed Issue can be reproduced and removed stale labels Sep 3, 2021
@EsEnZeT
Copy link

EsEnZeT commented Apr 9, 2022

Noticed this issue today @ Android exoplayer and SUBRIP subs

@axel-lebourhis
Copy link

Hi all, just wanted to mention I have the same issue on my shield. No issue with plex on the same files. Happens a lot on my setup.

@morkyy
Copy link

morkyy commented Apr 20, 2022

Same issue on Nvidia shield. Happened in v0.11, v0.12 and now still happens in v0.13.

Issue occurs for both subs that are include in the mkv container as well as normal .srt subs that are downloaded separately.
Selecting a subtitle track will show "loading subtitles" and sometimes after a while it fails to load the subs. I have to retry 2-3 more times before it actually loads the subtitle track.

It seems that it happens randomly and in all files. Sometimes the same subtitle track that caused issues will load with no issues when trying a few days later and then if you try again it will fail.

Looks like something is broken in the subtitle selector.

@marciomaiden
Copy link

I also have the problem on android tv, but only in the files where the subtitles are SUBRIP..

I tested it on mi box s, and on smart tv, brand SMART TECH

@KyleSanderson
Copy link

So this one was rather easy to discover after an hour or so of observation.

Basically what's happening is the subtitles streams are parsed during library import, but not extracted. When subtitles are requested, ffmpeg is invoked on the server to pull the stream out of the file. This results in a full file scan (so if you have a 20G file, it can take A While) to get the 31KB file out. A simple hour television recording of 4G can take over 40 seconds to get the subtitle out.

The file is then stored in the server cache, and served via json to the client for subsequent loads. If the subtitle is not needing to be ripped out of the container, it is then immediately served via json to the client, skipping this entire file scan and can immediately return the information.

So, what can be done? It's actually pretty simple here, Exoplayer already has full subtitle support, and if the subtitle is embedded in the file, try loading from Exoplayer first, then fallback to the json method if it fails. This results in a 0s subtitle delay, and reduces server load. This is confirmed by using an external player (like Just Video Player) using the Jellyfin stream and getting instant seeking + subtitle loading.

The additional enhancement here is to add a subtitle load retry, there's a single 30s timeout request and if it fails it throws the downloading subtitles error. 3x by 15s would be a huge improvement.

Anyway, this didn't seem to be well understood - hopefully it helps.

@professornope
Copy link

Bumping this to say this is still an issue on 10.8.13.

Running Jellyfin direct on hardware with GPU transcoding enabled.
Client is Amazon Firestick.

Works on PC and mobile if I first turn off subtitles, then re-enable them (Might be different issue).

@tundrablasen
Copy link

tundrablasen commented Mar 8, 2024

another bump, because like half the world watches movies and tv shows with subtitles.

10.8.13 jellyfin server
0.16.6 android tv

version still does not load the subtitles in default exoplayer.

thanks @nielsvanvelzen for taking your free time to maintain the software we are all using.

with my post i do not want to put any additional pressure on you, just wanted to point out that i think thats an critical issue and its known since now almost 5 years. most of the world population are non native english speakers or are hearing impaired so they rely on subtitles.

thanks for your work and thank you for spending your skills and your free time to provide us with this great piece of software

@averagejooe

This comment was marked as off-topic.

@LiamKarlMitchell
Copy link

I suspect this is unrelated to original issue but will post here just in-case it helps someone using Opera
I can see the subtitles in chrome but not in opera gx.
When I disable RGX feature that sharpens/enhances the video I can see subtitles.

I could see subtitles had loaded in the network tab of dev tools.

@Glisse1
Copy link

Glisse1 commented Apr 21, 2024

I have discovered this issue with loading internal subtiles in mkv has a "solution", at leas on android tv. Reliable and works 100 % of the time, but it is just inconvenient.

  1. Start movie and pause it (or you can let it run if you want, does not matter)
  2. Try to load some subtitles
  3. Wait until it says "unable to load", sometimes it takes longer, sometimes is faster.
  4. Try AGAIN to load any subtile and again wait for 'unable to load"
  5. After the second "unable to load" it works, all subtitles are selectable

As I said, this works 100 % of times, i ve watched some 50-60 tv episodes from different tv shows. But it takes 2 minutes or so, that s the inconvenient part. It would be nice if someday, when possible, will get fixed up. And the navigation, pressing "next" for 30 seconds should be1 press of 1 button on the remote without any pausing, not 3 buttons "arrow, ok, ok" as it is now.. but that s another story.. I m used to how Disney, HBO Max, etc, app work, with just 1 press, maybe that s why :)

@normanu
Copy link

normanu commented Apr 23, 2024

Is this fixed in 10.9 ?

@djl0
Copy link

djl0 commented Apr 23, 2024

In case this is a helpful workaround for anyone else, I was not able to load subtitles from within android tv, but I could if i played it from my phone and casted to the android tv jellyfin app

@tundrablasen
Copy link

I've said this before and I'm going to say it again: There is only one person maintaining the entire app and that is me. I have a full-time job and only work on Jellyfin in my spare time, not only on this app but a lot more parts (server/docs/sdk/support/etc.). I'm working on rewriting the entire playback code because the current code is messy and unmaintainable, the next version of the app, 0.16, already uses this for music playback and a future version will entirely use this new code. Most of the current issues will be fixed with that, including the subtitle support.

While this doesn't solve this specific issue right now, it will in the future. I've decided myself to not touch the old playback code unless I need to (e.g. new issues introduced with changes for 0.16 or refactoring needed when changing other parts of the app). This issue existed before I even used Jellyfin.

Then, to reply to the people that say this is an "easy change": well just make a pull request with that "easy change". I'll review it. But stop demanding all kinds of stuff from me, help out or use different software.

Hi @nielsvanvelzen

is there a roadmap or ETA when this playback code re-write will be used for video (and hopefully fix the missing subtitle support feature)?

@nielsvanvelzen
Copy link
Member

Most information is available in the project and #1057. I was hoping to release video playback in 0.17 (music playback was moved in 0.16) but unfortunately due to time constraints I don't think it will be ready in time. I was quite busy with work/life in the past few months and the past few weeks have been almost entirely spend on the Jellyfin 10.9 release. Things are calming down now so I'm hoping to resume work on the playback code soon.

@normanu
Copy link

normanu commented May 4, 2024

Awesome!!! ;)

@tundrablasen
Copy link

Most information is available in the project and #1057. I was hoping to release video playback in 0.17 (music playback was moved in 0.16) but unfortunately due to time constraints I don't think it will be ready in time. I was quite busy with work/life in the past few months and the past few weeks have been almost entirely spend on the Jellyfin 10.9 release. Things are calming down now so I'm hoping to resume work on the playback code soon.

Great! Happy to hear the update and that the night me a solution for the subtitle support on the horizon.

Thanks 🙏

@VampiricAlien
Copy link

Is this any help @nielsvanvelzen

05-13 15:53:39.153  3448  3448 E jellyfin-apiclient: VolleyError com.android.volley.TimeoutError: null
05-13 15:53:39.153  3448  3448 E jellyfin-apiclient: com.android.volley.TimeoutError
05-13 15:53:39.153  3448  3448 E jellyfin-apiclient: 	at com.android.volley.toolbox.NetworkUtility.shouldRetryException(NetworkUtility.java:162)
05-13 15:53:39.153  3448  3448 E jellyfin-apiclient: 	at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:145)
05-13 15:53:39.153  3448  3448 E jellyfin-apiclient: 	at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:132)
05-13 15:53:39.153  3448  3448 E jellyfin-apiclient: 	at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111)
05-13 15:53:39.153  3448  3448 E jellyfin-apiclient: 	at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90)
05-13 15:53:39.154  3448  3448 E PlaybackController: org.jellyfin.apiclient.model.net.HttpException: VolleyError com.android.volley.TimeoutError: 
05-13 15:53:39.154  3448  3448 E PlaybackController: 	at org.jellyfin.apiclient.interaction.VolleyErrorListener.onErrorResponse(VolleyErrorListener.java:25)

488 errors encountered while parsing '"srt"' subtitle using the "SubRip" format parser
Error processing request: "Unexpected end of request content". URL "POST" "/Sessions/Playing/Progress".

@alanman87
Copy link

I’m also experiencing this issue on Chromecast TV. What’s interesting to me is that my defaults are set to have subtitles off, but I randomly see this error even when no subtitles were selected.

@TheWalkingDadNL
Copy link

TheWalkingDadNL commented Jun 14, 2024

I have discovered this issue with loading internal subtiles in mkv has a "solution", at leas on android tv. Reliable and works 100 % of the time, but it is just inconvenient.

1. Start movie and pause it (or you can let it run if you want, does not matter)

2. Try to load some subtitles

3. Wait until it says "unable to load", sometimes it takes longer, sometimes is faster.

4. Try AGAIN to load any subtile and again wait for 'unable to load"

5. After the second "unable to load" it works, all subtitles are selectable

As I said, this works 100 % of times, i ve watched some 50-60 tv episodes from different tv shows. But it takes 2 minutes or so, that s the inconvenient part. It would be nice if someday, when possible, will get fixed up. And the navigation, pressing "next" for 30 seconds should be1 press of 1 button on the remote without any pausing, not 3 buttons "arrow, ok, ok" as it is now.. but that s another story.. I m used to how Disney, HBO Max, etc, app work, with just 1 press, maybe that s why :)

This is my experience also. If you pause, wait for the error en reselect the subtitles it will load right away!

Have this problem on my Shield, chromecast 4k and browser (Firefox). Maybe also other apps, but i didnt test those.

@opeeba
Copy link

opeeba commented Jun 15, 2024

I highly recommend using the Subtitle Extract plugin and manually running the scheduled task to scan your entire library as well as setting it to Extract subtitles during library scan.

Now, I can use the Jellyfin app with ExoPlayer primarily.

@cybericius
Copy link

cybericius commented Jun 15, 2024 via email

@garret
Copy link

garret commented Jun 17, 2024

I have also solved the issue with the Subtitle Extract plugin like @opeeba mentioned. It is true, one could use VLC or MPV but the good thing of Jellyfin is that he can sync playback status across devices so if I am outside my kids can continue playing from where they left. That is only one of the many reasons I would like to still stick with Jellyfin.

@istoutjesdijk
Copy link

This is my experience also. If you pause, wait for the error en reselect the subtitles it will load right away!

This works great for now 👍

@TheWalkingDadNL
Copy link

Any updates?

I have enabled subtitle extract and the workaround with pauseing the video and then selecting it. But i dont always get the best results. Loading a subtitles takes soms 30 seconds before the error. Also the workaround isnt working always.

I have a bit of a problem explaining the workaround in my family.

@opeeba
Copy link

opeeba commented Aug 3, 2024

Any updates?

I have enabled subtitle extract and the workaround with pauseing the video and then selecting it. But i dont always get the best results. Loading a subtitles takes soms 30 seconds before the error. Also the workaround isnt working always.

I have a bit of a problem explaining the workaround in my family.

Consider enabling Extract subtitles during library scan.
Screenshot_20240803_152437_Jellyfin

@tundrablasen
Copy link

tundrablasen commented Aug 4, 2024

Also for me. No subtitles are loading for 95% of the video files. Doesn’t matter if embedded or external subs.

only working alternative is, using Kodi with the official Jellyfin plugin and leave the android tv jellyfin for now (until this issue is fixed)

@tundrablasen
Copy link

tundrablasen commented Aug 5, 2024

Even though this one is now closed, 0.17 totally fucked the whole playback.

Even though my fire tv cube (2nd) and my NVIDIA shield tv can direct play nearly everything, with 0.17 it errors out on nearly everything from my server. Playback just doesn’t start. I guess that fixed the subtitle bug haha.

libVLC is also removed (apparently security bugs?)

Love you @nielsvanvelzen and massive respect for our one man show here.

But I think this piece of software needs some more maintainer.

moved now fully to the Kodi/Jellyfin combo and it’s rock stable and plays everything flawlessly. Including Dolby Vision

@TimGels
Copy link
Member

TimGels commented Aug 5, 2024

Jellyfin is open to more helping hands. If you want to help out feel free to do so : )

@LiamKarlMitchell
Copy link

Is there a guide to setting up to develop on it? Would like to run on different ports and debug stuff.

I understand there are different parts that make up the web + app + backend

@VampiricAlien
Copy link

VampiricAlien commented Aug 6, 2024

@tundrablasen Each update adds more and more to this app. As for playback, the whole playback is slowly being rewritten by @nielsvanvelzen in each update. #1057. I will say that for a one man show that gets a bit of help, he does quite well, as you pointed out.

@LiamKarlMitchell Check out https://jellyfin.org/contribute/ once you install the server you can install the app and connect to it on port 8920 or 8096, you can also change that port in jellyfin web or editing network.xml

@tundrablasen
Copy link

tundrablasen commented Aug 18, 2024

I came now back to jellyfin for android 0.17.3 and subtitles loading works now better. before it failed in 100% of the cases. now it fails in approx 30-40% of the cases. I still haven't figured out what breaks the loading subtitles. for now I had most issues loading subtitles loading 4K HDR MKVs files. but dunno if that's the culprit.

another user described the current bug a little bit better and more in detail:
#3899

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