Giter VIP home page Giter VIP logo

jellyfin-plugin-subtitleextract's Introduction

Subtitle Extract for Jellyfin Plugin

Part of the Jellyfin Project

Plugin Banner

GitHub Workflow Status MIT License Current Release

About

Plugin to automatically extract embedded subtitles.

Installation

See the official documentation for install instructions.

Build

  1. To build this plugin you will need .Net 6.x.

  2. Build plugin with following command

dotnet publish --configuration Release --output bin
  1. Place the dll-file in the plugins/subtitleextract folder (you might need to create the folders) of your JF install

Releasing

To release the plugin we recommend JPRM that will build and package the plugin. For additional context and for how to add the packaged plugin zip to a plugin manifest see the JPRM documentation for more info.

Contributing

We welcome all contributions and pull requests! If you have a larger feature in mind please open an issue so we can discuss the implementation before you start. In general refer to our contributing guidelines for further information.

Licence

This plugins code and packages are distributed under the MIT License. See LICENSE for more information.

jellyfin-plugin-subtitleextract's People

Contributors

crobibero avatar jellyfin-bot avatar kakoluz avatar methbkts avatar shemanaev avatar thornbill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jellyfin-plugin-subtitleextract's Issues

Only extract specific languages

Hi, thanks for this plugin, it helps me deal with the problem of embedded subtitles.
I'm wondering if it would be possible to add configuration options in the plugin details for selecting one or more specific languages and make it so that only subtitles of those languages are extracted. Perhaps even offer the option to filter out HI/SDH subs?

It would help with some 4K videos that are over 20GB and have over 30 subtitles. The extraction from these files can take over an hour depending on the hardware where the extraction is running.

How does it work ?

Hi,

I would like to use this extension, but I don't have any clue on how it is supposed to behave within Jellyfin.
How to automatically extract subtitles when a new movie/serie is added ?
Does it need to be set up as a reccurent task ?

Regards,

Extract font attachments related to subtitles

It would be nice to be possible the plugin to extract not only the subtitles, but the font attachments too. This way jellyfin will not need to do this when video is played and it will be possible to offload all the work when server is less loaded. This will help alot to machines with slower storage.

Extraction of the subs and font attachments can be batched all in 1 ffmpeg request to make things faster.

Other addition to the plugin can be a scheduled task to cleanup subtitles and font attachments that are left behind when videos/shows are deleted.

Inclusion as default plugin for new installations of Jellyfin?

Hello! I ran into the slow subtitle loading issue today, and realized after half an hour of research that this was already fixed with this plugin. I was wondering if the plugin could be included by default in new Jellyfin installations as part of a proposal, as it is quite the bad experience for users if they fire up their content and the subtitles exhibit buggy behavior (slow loading, not loading at all, "Fetching additional data" spinning infinitely at the bottom right).

Or maybe this plugin can be recommended as part of the admin installation process ("you may want to install the subtitle extraction plugin to optimize your viewing experience"). Anything other than what I had to go through would be great for those just installing Jellyfin! Please let me know if this is a dumb idea and feel free to close the issue if so. :)

EDIT: reading over this I probably should clarify that I'm proposing for the plugin to be installed alongside Jellyfin for new installations. I'm already aware this is an official Jellyfin plugin included in the default repositories.

Log storm with subtitleextract plugin v3 and jellyfin server v10.9.0

Hi,

after upgrading subtitleextract plugin to v3 and jellyfin server to v10.9.0 I see many many log lines every time subtitleextract task is fired, exactly one for each media file.

I suspect the cause is the extraction method change, as now all subtitles tracks in one file are extracted in one command.

But there is a way to avoid such log storm (for example checking before if there is the need to extract before do it)?

ps. I'm not sure if the issue should be opened in subtitleextract plugin repo or jellyfin server repo.

Add an option to specify a library and have it run for only that library.

I'm generally happy with this plugin, but I don't need to have it ran for my entire library, most movies and normal tv shows come with SRT subtitles, and they tend to just work immediately. My main issue is naturally ASS/SSA subtitles, as they take a lot longer to load.

I made a bash script for now that does this for me sort of(extracts the ASS/SSA subtitles next to the container as an external subtitle). Being able to select a specific or multuple specific libraries in this plugin would be hugely appreciated.
I've built from source and the config option to extract on library scan is huge!

I would try to figure this out myself, but I have no idea where or how I would begin implementing it.

Config page not visible

Noticed in the source there is a config page with a relatively handy setting to extract subs on library scan instead of a scheduled job, but trying to access the config page gives an alert with message: "This plugin has no settings to set up."

Other subtitles types

This plugin only support extraction of SRT and SSA/ASS sub types.
Why are other subs (vtt, idx, pgs, ...) excluded? Is there no benefit for Jellyfin to have these subtitles extracted?

Broken Image for Subtitle Extract

Overview

When looking at the plugin in the Catalog It will not show a Icon or the default icon in jellyfin

image

Steps to reproduce

  1. Open Catalog
  2. View Plugin

Subtitle "Unsupported format" errors with subtitleextract plugin v3 and jellyfin server v10.9.0

Hi,

after upgrading subtitleextract plugin to v3 and jellyfin server to v10.9.0 I see many "Unsupported format" during subtitle extraction.

For now I see two "Unsupported format" error types:

[2024-05-12 16:53:29.643 +02:00] [INF] [10] Jellyfin.Plugin.SubtitleExtract.Tools.SubtitlesExtractor: Extracting subtitles from "<FILE_PATH>"
[2024-05-12 16:53:29.649 +02:00] [WRN] [10] Jellyfin.Plugin.SubtitleExtract.Tools.SubtitlesExtractor: Unable to extract subtitle File:"<FILE_PATH>"
System.ArgumentException: Unsupported format: srt
   at MediaBrowser.MediaEncoding.Subtitles.SubtitleEditParser.Parse(Stream stream, String fileExtension)
   at MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder.ConvertSubtitles(Stream stream, String inputFormat, String outputFormat, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder.MediaBrowser.Controller.MediaEncoding.ISubtitleEncoder.GetSubtitles(BaseItem item, String mediaSourceId, Int32 subtitleStreamIndex, String outputFormat, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
   at Jellyfin.Plugin.SubtitleExtract.Tools.SubtitlesExtractor.Run(BaseItem video, CancellationToken cancellationToken)

[2024-05-12 16:53:29.652 +02:00] [INF] [10] Jellyfin.Plugin.SubtitleExtract.Tools.SubtitlesExtractor: Extracting subtitles from "<FILE_PATH>"
[2024-05-12 16:53:29.745 +02:00] [WRN] [10] Jellyfin.Plugin.SubtitleExtract.Tools.SubtitlesExtractor: Unable to extract subtitle File:"<FILE_PATH>"
System.ArgumentException: Unsupported format: mov_text
   at MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder.GetWriter(String format)
   at MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder.ConvertSubtitles(Stream stream, String inputFormat, String outputFormat, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder.MediaBrowser.Controller.MediaEncoding.ISubtitleEncoder.GetSubtitles(BaseItem item, String mediaSourceId, Int32 subtitleStreamIndex, String outputFormat, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
   at Jellyfin.Plugin.SubtitleExtract.Tools.SubtitlesExtractor.Run(BaseItem video, CancellationToken cancellationToken)

The case one is very strange, as srt subtitle format should be supported (maybe there was a string comparison check issue?).

In case two mov_text subtitle format should be converted in srt as done in subtitleextract plugin v2 for every subtitle form that is not srt, ass, or ssa.

ps. I'm not sure if the issue should be opened in subtitleextract plugin repo or jellyfin server repo.

Subtitle Extract webhook

Is it possible to trigger a subtitle extract through a webhook?
I'd like to improve my sonarr/radarr setup by also extracting the subtitles when finishing the download of new content as it currently does with reloading jellyfin.

I do this with a webhook, so I'd like to be able to trigger subtitle extract in the same way.

Please provide more documentation

As someone who is new to JF, it doesn't really help to read that a "Subtitle Extract" plugin "Extracts Subtitles" or to be more specific "Extracts embedded subtitles." :).

It would help if you explained why I'd want this, how it does it, etc.

Does "extract" mean, the subtitles are moved out of the video container or just "copied" for example.

Store subtitles alongside file?

Hello, thanks for the plugin, was really nice to see this in the plugin list!

If I'm not mistaken it seems subtitles are being stored in "Jellyfin\Server\data\subtitles", is it possible to store the subs alongside the media files with the same name?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.