Jellyfin Forum
Subtitle Extract plugin not working - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Media Scanning & Identification (https://forum.jellyfin.org/f-media-scanning-identification)
+---- Thread: Subtitle Extract plugin not working (/t-subtitle-extract-plugin-not-working)



Subtitle Extract plugin not working - babrah - 2024-08-21

I installed Subtitle Extract plugin. On triggering the "Subtitle Extract" Scheduled Task, it seems like subtitle extraction keeps failing.

Failure Log: https://pastebin.com/RAGTTQd1

I was able to find one instance of successful subtitle extraction from the logs, is there anyway to tell if extraction was successful for a file from media info/metadata information?

Success log: https://pastebin.com/zeUmJpPz


Would be very helpful if someone can help me understand why the extraction process is failing so often. Thanks.


RE: Subtitle Extract plugin not working - TheDreadPirate - 2024-08-21

What server version are you running? There was a bug a couple versions back that caused metadata files to be locked unnecessarily.

You can't really tell if it succeeded or not without looking in the log. If you use a SRT sub and you DON'T see a log entry about extracting the sub title before playback starts, that means it is using the pre-extracted subtitle.

But the info for the subtitle doesn't change in the UI.


RE: Subtitle Extract plugin not working - babrah - 2024-08-21

I am running server version 10.9.9. Also I only installed the plugin because I was facing issues using subtitles on Android TV app, on every other client(Android, iPad) that I tried, I am able to achieve direct playing and don't face any issues with subtitles.

Only on the ATV app, I get the error message saying 'Unable to load subtitles'. From what I gathered from other forum posts and logs, it seems like it begins extraction process and once its over, the subtitles work fine on ATV as well.

So if there is some setting on the server/client side to enable subtitles on ATV just like on other clients without the need for extraction(hence no need for subtitle extraction plugin), please let me know as that would eliminate the need for the plugin entirely.

Playing the exact same file on iPad works fine, but on same playing that file again on ATV seems to trigger a ffmpeg command to extract subtitle even though the playback method is "DirectPlay" for both. And extraction triggered outside of the plugin does not seem to error out, but the plugin never seems to work.

Back to back playback on iPad and ATV for same file: https://pastebin.com/AnymdN4d

Also attaching the logs containing installation of plugin and multiple invocations and multiple failures to extract subtitles when triggered by plugin.

https://drive.google.com/file/d/1BCehyxTUxG84YGGR28_XXXtdN-b2cA8k/view?usp=drive_link
https://drive.google.com/file/d/1uvn1E9v03IKcnUtju-4cLLPIqdusfwZM/view?usp=drive_link


RE: Subtitle Extract plugin not working - TheDreadPirate - 2024-08-21

One issue I see is that you've disabled transcoding AND remuxing. Try turning on remuxing and see if that changes anything. Not sure if that will resolve the issues with subtitle extraction, but may help with clients unable to start playback.


RE: Subtitle Extract plugin not working - babrah - 2024-08-21

Yes, under User setting, under "Media playback" I have only enabled the first option(allow media playback) and disabled the rest. I want to disable all transcoding as I don't have very capable hardware. I assumed I could still use direct play(which I crudely understand to work as: server uploads content -> client downloads and plays it as is without changes).

Does ATV client on play store not support direct play(I am facing this issue with simple SRT subs which should be supported out of the box)? I have been able to achieve near flawless playback on using clients such as Jellyfin andorind client, Findroid, Swiftfin etc. Is it not possible to achieve the same on ATV without transcoding?

Also, when I attempt to restart the server using the web client(or from jellyfin app) from the dashboard, it fails to start. Works fine when I stop and start from Windows Tray Icon. Sorry to pile on, let me know if I should open a separate thread for this specific issue

[2024-08-22 02:46:58.750 +05:30] [FTL] [81] Main: Error while starting server
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 8: 'attempt to write a readonly database'.
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Emby.Server.Implementations.Data.SqliteExtensions.Execute(SqliteConnection sqliteConnection, String commandText)
at Emby.Server.Implementations.Data.ManagedConnection.Execute(String commandText)
at Emby.Server.Implementations.Data.BaseSqliteRepository.Initialize()
at Emby.Server.Implementations.Data.SqliteItemRepository.Initialize()
at Emby.Server.Implementations.ApplicationHost.InitializeServices()
at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)

My User has full control permission on the C:\ProgramData\Jellyfin folder, so not sure about the cause for permission error.


RE: Subtitle Extract plugin not working - TheDreadPirate - 2024-08-22

As with most things related to media servers, it depends on what the client is capable of. For the record, remuxing is simply changing the container before sending it to the client. No encoding. A potato can remux in real time.

Remuxing is sometimes necessary TO direct play the video/audio/subtitles. Some clients don't support playing audio and subtitle tracks that aren't the first one. Remuxing is necessary in those situations.

As for your database error. Do you have the Playback Reporting plugin installed? Disable it. I've reported this bug to the plugin git.

You can leave it disabled or delete the separate database the plugin creates and start over (I did the latter).


RE: Subtitle Extract plugin not working - babrah - 2024-08-22

I should enable this option to enable remuxing right? "Allow video playback that requires conversion without re-encoding". Although I dont really see how this will as on ATV the video and audio play fine with Direct Play and from what I understand SRT subs are the most cross compatible. Would be more understandable if it were say ASS subs which are more tricky.

Also, in Subtitle Extract plugin, I enabled to option to extract subtitles during library scan. Triggered a scan, which did not trigger subtitle extraction for items already scanned in library(not sure if this is the intended behavior). So I added a series, triggered another library scan, and the subtitle extraction worked fine. Definitely seem like the problem only occurs when the plugin itself triggers subtitle extraction.

Logs for successful subtitle extraction of multiple new episodes found during library scan: https://pastebin.com/Ju5JMDZ1.

Thanks, for letting me know about the Playback Reporting plugin. I do have it installed. Will disable it and try to restart server from dashboard once library scan is completed.


RE: Subtitle Extract plugin not working - babrah - 2024-08-22

(2024-08-22, 01:49 AM)TheDreadPirate Wrote: As for your database error.  Do you have the Playback Reporting plugin installed?  Disable it.  I've reported this bug to the plugin git.

You can leave it disabled or delete the separate database the plugin creates and start over (I did the latter).

Can confirm that disabling the Playback Reporting plugin fixed the issue. Thanks.


RE: Subtitle Extract plugin not working - TheDreadPirate - 2024-08-22

(2024-08-22, 02:36 AM)babrah Wrote: So I added a series, triggered another library scan, and the subtitle extraction worked fine. Definitely seem like the problem only occurs when the plugin itself triggers subtitle extraction.

Interesting.  That sounds like a bug.  Go ahead and submit a github issue.

https://github.com/jellyfin/jellyfin-plugin-subtitleextract/issues


RE: Subtitle Extract plugin not working - babrah - 2024-08-25

Done. https://github.com/jellyfin/jellyfin-plugin-subtitleextract/issues/36