Jellyfin Forum
SOLVED: Subtitle Issues - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Subtitle Issues (/t-solved-subtitle-issues)

Pages: 1 2


Subtitle Issues - podonnell - 2024-06-13

Been doing some testing, and it seems that the libVLC causes me to have microstutters every time a subtitle is shown.
Using exoplayer fixes this issue.

In both cases, I'm getting a lot of "subtitle failed to load, and needing to retry a bunch when I start something up. This really isn't ideal and I'd like to have a quick enablement of subtitles.

What is the general recommendation for how to handle subs? I believe there are ways to get some pulled in as a text file waiting to be loaded, which may help on the processing to fix the libVLC issue, and hopefully the failed loading of subtitles.

In both cases, what is actually happening when you choose a specific sub to load -- is that pulling it down from a site somewhere? What generates the list of what is available?

Thanks for any recommendations!


RE: Subtitle Issues - TheDreadPirate - 2024-06-14

What are your server specs and OS? Can you share your jellyfin and ffmpeg logs, if transcoding was happening.


RE: Subtitle Issues - podonnell - 2024-06-14

Looks like it was doing a direct stream, no transcode. There are three logs around that time: FFmpeg.directstream (two times) and Log_
Let me know if you still want one of those as you mentioned if it was transcoding.

The server is not very powerful, i7-4970k and a GeForce 570 GPU, using VAAPI. I don't have any buffering issues otherwise.
This is also on the LAN.


RE: Subtitle Issues - TheDreadPirate - 2024-06-14

Any of the direct stream logs, and the log_<date> file as well.


RE: Subtitle Issues - podonnell - 2024-06-15

Sorry, for some reason my subscription notification is not working on here. I've experienced a handful more issues with subtitles, here's my full list:

1) The original issue, where the micro stutters were occurring during playback when libVLC was the active player
2) 'Unable to load subtitle', often from the same device. I must repeatedly attempt to load subtitles and eventually it works.
3) Subtitles causing my playback to lose HDR and display a washed out SDR picture [see below]

For #1 - It looks like my logs are gone from the other day, so I just recreated the issue with libVLC and experienced the stutter. That said, the log times do not line up with what I just did minutes ago, alas.. https://pastebin.com/jQX19GnJ

Note I did not get any ffmpeg log, the last one I had was from earlier: https://i.ibb.co/fGD0x6X/image.png

Let me know if there's anything I can do to get more relevant logs or be more helpful.


Edit: For #3, I just came across your response in another thread -
> PGS subs aren't supported by some clients. It probably required that the sub be burned in, which requires transcoding. Transcoding will always convert HDR to SDR. SRT subs are more compatible and there are plugins to extract subs and convert them to SRT.

These were PGS subs. Looking into plugins I found Open Subtitles, which sounds more like a sub fetcher, and Subtitle Extract, which sounds like it may pull out embedded subtitles (PGS?).
I installed the latter but it doesn't seem like it takes any configuration. Would I need to do something to enable this for existing titles?


RE: Subtitle Issues - TheDreadPirate - 2024-06-15

If these are PGS subs, why is the log indicating that it thinks they are SRT subs?

Code:
[2024-06-15 14:35:38.417 -04:00] [ERR] [48] MediaBrowser.MediaEncoding.Subtitles.SubtitleEditParser: 184 errors encountered while parsing '"srt"' subtitle using the "SubRip" format parser

Looks like it extracted the subs on the fly.

Code:
\"Jellyfin\Data\data\subtitles\2\21a463cd-7b45-5ed0-530b-09ff05b0eb5e.srt\" -map 0:7 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\f\f16a96a0-ab86-4d21-f65b-e65b456a12ec.srt\" -map 0:8 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\c\ca3ee801-9cdc-8bec-eb28-a7094d5335cd.srt\" -map 0:9 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\e\ecd922b7-7463-5441-a84d-987789e0438b.srt\" -map 0:10 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\f\f8a8afad-1933-28a6-ad34-b8f23a413ace.srt\" -map 0:11 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\f\f3123080-baa7-675b-c3dc-fc1c1d022ded.srt\" -map 0:12 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\e\ee30c199-d405-4220-f8cc-53162d276e4a.srt\" -map 0:13 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\3\3269565e-b988-7e92-8b6a-d4d2af49abb4.srt\" -map 0:14 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\7\71a0f755-9756-c543-4ae3-a78bf787d8ce.srt\" -map 0:15 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\c\c30d7ea3-1a4d-e709-3c41-1979010dbf78.srt\" -map 0:16 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\5\54800483-61cf-3154-9593-a68a6cde9017.srt\" -map 0:17 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\e\ea988142-4fae-0258-e037-a3de51318a9d.srt\" -map 0:18 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\0\0bc10b23-cea9-1768-f2e7-5530aebb80b8.srt\" -map 0:19 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\c\c9d99d3d-ab30-d74e-1012-fc240f25e8f7.srt\" -map 0:20 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\2\29e49679-7193-7f1b-1df1-e191dc48810e.srt\" -map 0:21 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\2\2acfe15a-1f1a-9baa-a4dd-5be76b8f836b.srt\" -map 0:22 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\5\5575e0ed-accd-c948-5b87-359bece218ae.srt\" -map 0:23 -an -vn -c:s copy \"Jellyfin\Data\data\subtitles\b\bca2b4e8-9ff9-a225-aeac-8180803c878a.srt\" -map 0:24 -an -vn -c:s copy

But the Subtitle Extract plugin will extract subs ahead of time (you have to run the scheduled job).


RE: Subtitle Issues - podonnell - 2024-06-17

Yeah, I didn't think the log timings lined up with when I ran my test. For some reason, there was no log created for it. Perhaps something was cached.

I just tried to run the old player on a video I haven't played before to see if that generates the logs properly.

First attempt at enabling the subtitles and the app crashed entirely:
https://pastebin.com/QdCpMW6U

Then I got them to generate, but once again there is no log being created. It's a directplay since there is no transcode required, so maybe no log being created?
I could record my screen if that is at all helpful. I am finding that short subtitles with a few words barely cause a stutter, and a subtitles that's a sentence or two long drops at least 5 or so frames.

Re-summarizing my issues:

#1 - I think I'm just going to use exoPlayer to work around the subtitle frame dropping issue, unless that player is not advisable?
#2 - The crashes and the 'unable to load subtitles' is much more frustrating. Anything I can do to help troubleshoot that, please let me know.
#3 - I am currently running the subtitle extract job, moving quite slowly. I'll test an HDR movie after this to confirm it doesn't switch it to SDR. If there's any better option for this, let me know. If not, is there any way I can make this a part of the library import? If I schedule this job, I fear that I may add a new movie and the job won't run before I go to watch it, and have the SDR issue.

Many thanks for the assistance with these issues!


RE: Subtitle Issues - TheDreadPirate - 2024-06-17

If the client doesn't support the subtitle format it will burn them in, which requires transcoding. If you don't have tone mapping enabled this will result in a washed out picture.

Looking at your server specs, this may be out of reach for the hardware. I am pretty sure Intel deprecated OpenCL (required for tone mapping) support for your iGPU.

The root of the problem though has something to do with the subs. In the Android TV crash log this is at the top.

Code:
java.lang.NullPointerException: Attempt to get length of null array
    at org.jellyfin.androidtv.ui.playback.VideoManager.setSubtitleTrack(VideoManager.java:502)
    at org.jellyfin.androidtv.ui.playback.PlaybackController.switchSubtitleStream(PlaybackController.java:1002)

This may be a bug or something. Your server may be taking too long to extract the subs on the fly, which the subtitle extract plugin should remedy when that finishes.

Let us know if allowing that job to finish resolved the issue.


RE: Subtitle Issues - podonnell - 2024-06-17

(2024-06-17, 02:15 PM)TheDreadPirate Wrote: If the client doesn't support the subtitle format it will burn them in, which requires transcoding.  If you don't have tone mapping enabled this will result in a washed out picture.

Looking at your server specs, this may be out of reach for the hardware.  I am pretty sure Intel deprecated OpenCL (required for tone mapping) support for your iGPU.

The root of the problem though has something to do with the subs.  In the Android TV crash log this is at the top.

Code:
java.lang.NullPointerException: Attempt to get length of null array
at org.jellyfin.androidtv.ui.playback.VideoManager.setSubtitleTrack(VideoManager.java:502)
at org.jellyfin.androidtv.ui.playback.PlaybackController.switchSubtitleStream(PlaybackController.java:1002)

This may be a bug or something.  Your server may be taking too long to extract the subs on the fly, which the subtitle extract plugin should remedy when that finishes.

Let us know if allowing that job to finish resolved the issue.


Looks like the subtitle job ran a bunch overnight and is totally complete now.
> Subtitle Extract
> Last ran about 3 hours ago, taking less than a minute.

That said, I went back to the file that only had PGS subs, and it appears to be the same. Isn't this jobs intent to create SRT subs for all files?


RE: Subtitle Issues - Efficient_Good_5784 - 2024-06-17

(2024-06-17, 03:13 PM)podonnell Wrote: That said, I went back to the file that only had PGS subs, and it appears to be the same. Isn't this jobs intent to create SRT subs for all files?
As the name implies, subtitle extract only pulls put the subs from the video container. It won't convert them to another sub type (not that I'm aware of anyway).