jellyfin / jellyfin-kodi

Jellyfin Plugin for Kodi
https://jellyfin.org
GNU General Public License v3.0
820 stars 111 forks source link

Is there a way to use subtitles extracted via the Extract Subtitles plugin? #887

Open nothing2obvi opened 3 months ago

nothing2obvi commented 3 months ago

Describe the bug Sorry, not exactly a bug.

I understand that Kodi v21.0 cannot use embedded WebVTT subtitles, but can use external WebVTT subtitles. I ran the Extract Subtitles plugin, thinking this would make the embedded subtitles now external, so Kodi would be able to use them, but I still could not play WebVTT subtitles on Kodi.

To Reproduce

  1. Run Extract Subtitles plugin
  2. Try to enable subtitles on video
  3. Subtitles don't work; Not sure if they're still the embedded subtitles

Expected behavior Extracted subtitles work on Jellyfin for Kodi

Logs n/a

Screenshots n/a

System (please complete the following information):

mcarlton00 commented 3 months ago

I suspect this has very little to do with subtitle extract and more it being webvtt, which is kinda a niche format and I don't have any in my library to test with. Without trying to track some down to test myself, my guess is that that device profile needs updating to indicate that we can support them. If you'd like to try changing that yourself, this is the location you'd need to update: https://github.com/jellyfin/jellyfin-kodi/blob/9fe904f16776e8cb83bd9cd7752be2362d04e71b/jellyfin_kodi/helper/playutils.py#L444-L461.

nothing2obvi commented 3 months ago

Thank you, I'll play around with it when I get some extra time.

oddstr13 commented 3 months ago

You can convert vtt to srt with ffmpeg; ffmpeg -i input.mkv -vn -an output.srt.

YouTube (since 2013 according to Wikipedia) and other HTML5 video players use WebVTT for subs, so an easy source for test files is yt-dlp.