jellyfin-androidtv icon indicating copy to clipboard operation
jellyfin-androidtv copied to clipboard

[Bug] Subtitles Don't Always Load

Open seniorm0ment opened this issue 5 years ago • 60 comments

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.

seniorm0ment avatar Sep 01 '19 00:09 seniorm0ment

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.

thornbill avatar Sep 12 '19 21:09 thornbill

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 avatar Sep 13 '19 02:09 seniorm0ment

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 avatar Sep 22 '19 04:09 seniorm0ment

Do we have any word about this? Still trouble unfortunately

seniorm0ment avatar May 29 '20 03:05 seniorm0ment

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 avatar May 29 '20 07:05 nielsvanvelzen

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[bot] avatar Sep 28 '20 23:09 stale[bot]

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

seniorm0ment avatar Sep 29 '20 02:09 seniorm0ment

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

raver2046 avatar Dec 21 '20 08:12 raver2046

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

seniorm0ment avatar Dec 21 '20 14:12 seniorm0ment

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.)

raver2046 avatar Dec 23 '20 17:12 raver2046

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.

mblennegard avatar Apr 25 '21 20:04 mblennegard

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[bot] avatar Sep 03 '21 02:09 stale[bot]

Noticed this issue today @ Android exoplayer and SUBRIP subs

EsEnZeT avatar Apr 09 '22 22:04 EsEnZeT

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.

axel-lebourhis avatar Apr 16 '22 13:04 axel-lebourhis

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.

morkyy avatar Apr 20 '22 12:04 morkyy

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

marciomaiden avatar Apr 28 '22 13:04 marciomaiden

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.

KyleSanderson avatar May 10 '22 00:05 KyleSanderson

@seniorm0ment v0.13.0 adds support for Subtitle preferences and Jellyfin 10.8.0 adds lots of changes to subtitles https://jellyfin.org/posts/jellyfin-10-8-0/

sourpatched avatar Aug 03 '22 04:08 sourpatched

I found that this issue went away once I turned on video transcoding.

nothing2obvi avatar Apr 23 '23 00:04 nothing2obvi

this is an ongoing problem still on 10.8.10, still not solved

trablin45 avatar Aug 07 '23 16:08 trablin45

Can confirm as well, same as @trablin45. :) The extraction takes a long time, and the only way I've found where I can track it, is with debug logs enabled. Not that it is practical in any sense, just noticed it when I was trying to figure out what was happening.

If the extraction cannot be done faster, perhaps a middleground can be found in having the extraction done automatically when media is added to the library. I think the majority of users with this problem wouldn't mind that :)

Anyways, I hope a fix / solution can be found on this 👍

paaff avatar Aug 10 '23 12:08 paaff

totally agree with @paaff an utility to auto-extract subs when server is not in use will be extremely useful and a complete solution to this problem

trablin45 avatar Aug 10 '23 14:08 trablin45

If the extraction cannot be done faster, perhaps a middleground can be found in having the extraction done automatically when media is added to the library

Isn't this what the Subtitle Extractor plugin essentially does, except on whatever schedule you set

theg00s3 avatar Aug 17 '23 16:08 theg00s3

If the extraction cannot be done faster, perhaps a middleground can be found in having the extraction done automatically when media is added to the library

Isn't this what the Subtitle Extractor plugin essentially does, except on whatever schedule you set

The default "subtitle extract" plugin doesn't do anything to me, it stays at 0.00%, also it would be great if it let you set to extract the sub to the video folder or to just trigger manually per video (If some videos just work fine and don't need extraction)

trablin45 avatar Aug 17 '23 17:08 trablin45

Yea I can confirm this is still an issue. I also had tried Subtitles Extractor plugin and tbh I don't like the implementation and deleted it. It will extract each and every associated subtitles, it took up many disk space (I completed about 35 percent after many hours running it and it took like 3.6GB which is unbelievable for a bunch of text files) I really don't understand why must we took this approach. I ended up just using Just(video player) and it will load subtitles instantly after chosing it. Just a side note, it is based on Exoplayer like what Jellyfin use. So yea, unsure why JF insists on preload/ extract embed subs in order to load it. I wouldn't call my library size very big, probably totaling less than 6TB, but dang it sure felt inconvenient having to analyze ALL media files without no user input

averagejooe avatar Aug 22 '23 14:08 averagejooe

The only correct way to fix this is for the player to read the subtitle stream, which is already streamed to the end client in Jellyfin as previously confirmed. It's likely 20-30 lines of code as all player libraries already support this, and have for well over 25 years and is built-in to mpeg.

KyleSanderson avatar Aug 22 '23 15:08 KyleSanderson

I agree with KyleSanderson, i also believe that it is more easier for Jellyfin developer to deal with this to leave the subtitles handled by the media player. No matter which player, as long as it is stable enough, it is good. I personally believe that MPV is the most stable player on Android in my experience, and VLC is also good on my phone (on TV it is impossible to use VLC as an external player). EXO is something I never used as a standalone player, so it is hard to say. But with EXO and the current settings of handling the subtitles, it is truly not that good. JMP on windows and mac are both working perfectly with MPV in my experience, that is the reason I would recommend MPV.

EricChan1989 avatar Aug 29 '23 22:08 EricChan1989

This is still an issue with the latest server version in docker, and latest player on Android TV. For me the subtitle loading is only by luck.

There are so many new features being worked on but why not fix this basic functionality issue?

Here are few reddit posts where users report regarding subtitles "unable to load subtitles". The other deluge of subtitle issues on Android tv can be found by simply searching "unable to load"

https://www.reddit.com/r/jellyfin/s/cNxyBEkE4e

https://www.reddit.com/r/jellyfin/s/jQpNeqSFYT

https://www.reddit.com/r/jellyfin/s/cANut48wL0

https://www.reddit.com/r/jellyfin/s/nQ9OAeDRHZ

https://www.reddit.com/r/jellyfin/s/JUhA4kjAIb

https://www.reddit.com/r/jellyfin/s/SnToue00SY

So kindly please let exoplayer handle the subtitles and not jellyfins custom implementation.

wolfdael avatar Dec 01 '23 16:12 wolfdael

This is still an issue with the latest server version in docker, and latest player on Android TV. For me the subtitle loading is only by luck.

There are so many new features being worked on but why not fix this basic functionality issue?

Retracted.

EDIT: Sorry man; didn't realize it's a one man show now. Not posting again to add to the noise, but hope things pick up again when there's a bit more help.

KyleSanderson avatar Dec 01 '23 17:12 KyleSanderson

Lotta people watch with subs because terrible mic positioning and sound editing.

Or simply watching a foreign show. This issue has plagued me for longer than I remember.

Switching to vlc external player works as expected so I'm not sure why this cant?

voc0der avatar Dec 02 '23 01:12 voc0der