jellyfin / jellyfin-webos

WebOS Client for Jellyfin
https://jellyfin.org
Mozilla Public License 2.0
647 stars 68 forks source link

OLED55CX9LA and ASS Subtitles #143

Open Snipy2k4 opened 1 year ago

Snipy2k4 commented 1 year ago

Hello,

I have a question about ASS subtitles and LG TV's.

I have an OLED55CX9LA with WebOS 5 and the latest Jellyfin app from the store. When I start a movie file in x265-HEVC with ASS subtitles, the subtitles are not displayed.

Is this a bug or is it the LG TV?

If I extract the ASS subs with a tool and paste them in the External interface, the subtitles work as they should at first glance.

Unfortunately, with a large collection, that would be a really big effort and I thought I'd ask the reason here?!

I would be very happy about an answer - thank you

PS: Sorry, I'm using google translator. Hope you understand my "problem"

dmitrylyzo commented 1 year ago

We have similar issues in the Tizen app repo.

  1. It takes some time to extract the subtitles (from MKV), but this is only done once per item (at least it should be). As a test, you can try extracting it and placing it next to the video and rescanning that item. They should appear as External.
  2. Preparing subtitles with a bunch of fonts takes much longer. For some of them, it took about 2 minutes on my TV, but was almost instant on the PC. After they appeared, I was able to rewind and they were displayed normally.
Snipy2k4 commented 1 year ago

Other subtitles such as VobSub, SRT or PGS are played or transcoded directly from the file, but ASS subtitles are not.

Neither the app on my TV nor the server on my QNAP extracts anything here by itself. I don't know where you got this information from, but that doesn't happen.

I would have to do this for each file individually and then add it to the file in the admin web interface. Putting the file in the folder and scanning does not help here.

I wonder why ASS subtitles don't work like the other subtitles (SRT, VobSub or PGS) from the movie file.

All subs work on the Windows app. Not in browsers like Edge or Chrome. On the FireTV you can set an external player like VLC and then everything will work. ASS Subs don't work with the regular player on the FireTV Stick either.

I really wonder why this doesn't work...

dmitrylyzo commented 1 year ago

Other subtitles such as VobSub, SRT or PGS are played or transcoded directly from the file, but ASS subtitles are not.

SRT can be rendered natively, PGS must be encoded, iirc. Not sure about VobSub. SSA/ASS is not supported by HTMLVideoElement, so they are rendered by JSO (our fork). It uses WASM in modern browsers and JS, which is slower, in legacy ones.

Neither the app on my TV nor the server on my QNAP extracts anything here by itself. I don't know where you got this information from, but that doesn't happen.

They should be extracted in data/subtitles (iirc) with some hash name. There is also an option in the Dashboard to extract them during scan.

I would have to do this for each file individually and then add it to the file in the admin web interface. Putting the file in the folder and scanning does not help here.

Make sure you follow the naming patterns: https://jellyfin.org/docs/general/server/media/external-files/#naming

Not in browsers like Edge or Chrome.

First, get them to appear (when extracted manually) and play in a browser (say, in Chrome), then try them on the TV. Is there any error in the browser console when you start playback?

Snipy2k4 commented 1 year ago

They should be extracted in data/subtitles (iirc) with some hash name. There is also an option in the Dashboard to extract them during scan.

There is no such option, or if I can't find it, I can only scan the entire database.

That's it.

I just don't want to have to extract and rename the subtitle file for every file... that's just a lot of work.

Why doesn't the other subtitle formats and ASS work, why doesn't he just encode it like the others? I do not get it.

A scan does NOT automatically extract subtitles, I don't know what you mean by that because it doesn't seem to be working.

I have to use an MKV tool to extract and rename each file individually and/or set it in the interface.

Surely that can't be the point?!

ASS subtitles are not displayed on my LG Oled TV and the Jellyfin APP if I do not insert them externally.

If the ASS subtitles were to be extracted into the folder you said it would work, but it doesn't.

I just don't get it and it's annoying

First, get them to appear (when extracted manually) and play in a browser (say, in Chrome), then try them on the TV. Is there any error in the browser console when you start playback?

There is no error message, just no ASS subtitles that are in the MKV container. As I said above, I would have to extract and rename each file individually so that it works....

Snipy2k4 commented 1 year ago

Addition:

I found something very strange... for which I have no explanation.

If I extract the ASS file with the MKVToolNix or the plugin gMKVExtractGUI and then add it again and create a new file with MKVToolNix to replace it with the old one and run a scan, the subtitles work at once in the app and in Edge. It will extract the ASS subtitles into this folder as you said.

I'm really at a loss as to why this is suddenly working...

do you have any idea?****

dmitrylyzo commented 1 year ago

There is no such option, or if I can't find it, I can only scan the entire database.

Sorry, I confused the Dashboard / Playback / Allow subtitle extraction on the fly option with the Subtitle Extract module.

do you have any idea?

Could you run ffprobe on both files to see the difference?

This one extracts fine (Stream #0:2):

Input #0, matroska,webm, from 'jf-gray_1080p_h264_m40.fonts_ttf2.mkv':
  Metadata:
    title           : H264 SDR Main L4.0
    MINOR_VERSION   : 512
    COMPATIBLE_BRANDS: isomiso2avc1mp41
    MAJOR_BRAND     : isom
    ENCODER         : Lavf58.76.100
  Duration: 00:01:29.93, start: 0.000000, bitrate: 225 kb/s
  Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 60 fps, 60 tbr, 1k tbn, 120 tbc (default)
    Metadata:
      HANDLER_NAME    : VideoHandler
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:00:29.999000000
  Stream #0:1: Audio: mp3, 22050 Hz, mono, fltp, 48 kb/s (default)
    Metadata:
      HANDLER_NAME    : SoundHandler
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:00:30.015000000
  Stream #0:2: Subtitle: ass (default)
    Metadata:
      DURATION        : 00:01:29.930000000
  Stream #0:3: Attachment: ttf
    Metadata:
      filename        : SourceSansPro-SemiBold.ttf
      mimetype        : application/x-truetype-font
  Stream #0:4: Attachment: ttf
    Metadata:
      filename        : CabinCondensed-Regular.ttf
      mimetype        : application/x-truetype-font
Snipy2k4 commented 1 year ago

Sorry, I confused the Dashboard / Playback / Allow subtitle extraction on the fly option with the Subtitle Extract module.

u mean the "plugin"? msedge_SJIQ0cm1mQ

i didn't install it but with the activated option you said it still extracts the subtitles but only after i reloaded the ass files with mkvtool and created the file.

Should I install that or is that something else?

I have to test the other one, so where is the difference. but the tool ffprobe says nothing to me and my english is bad i always need a little longer

dmitrylyzo commented 1 year ago

u mean the "plugin"?

yes

i didn't install it but with the activated option you said it still extracts the subtitles but only after i reloaded the ass files with mkvtool and created the file.

Should I install that or is that something else?

I don't think you need it because the server extracts subtitles on the fly. In theory, this plugin would provide a faster start. I haven't tested it - that's what I've heard.

I have to test the other one, so where is the difference. but the tool ffprobe says nothing to me and my english is bad i always need a little longer

I mean, to look at lines like:

  Stream #0:2: Subtitle: ass (default)
    Metadata:
      DURATION        : 00:01:29.930000000

Maybe the "bad" file has the wrong MIME for the subtitle stream or something like that?

Btw, did the subtitles of the "bad" file appear in the item details (drop-down list)?

Snipy2k4 commented 1 year ago

Btw, did the subtitles of the "bad" file appear in the item details (drop-down list)?

yes, and with the windows jellyfin app they also work without any problems.

I only have x265 files with subtitles in the container. As I said, if I extract subtitles myself and paste them back in with the mkvtool, jellyfin extracts the files as you said and the subtitles are also displayed. I don't know why I have to re-insert the ass subtitles and recreate the mkv file to make it work...

I mean, to look at lines like:

  Stream #0:2: Subtitle: ass (default)
    Metadata:
      DURATION        : 00:01:29.930000000

I don't know where to see this sry

dmitrylyzo commented 1 year ago

yes, and with the windows jellyfin app they also work without any problems.

So, the server sees them, but cannot extract them. Is there any error in the server log at the start of playback (Dashboard / Logs / jellyfin<date>.log)? Maybe ffmpeg crashes when trying to extract subtitles?

Jellyfin Media Player uses MPV (afaik) so it can probably skip errors in the file, as well as VLC. Also, it probably doesn't require subtitles to be extracted.

I don't know why I have to re-insert the ass subtitles and recreate the mkv file to make it work...

Re-embedding the subtitles probably fixes something in the file so that ffmpeg becomes capable to extract the subtitles.

I don't know where to see this sry

You need to run ffprobe application on files: the original one (which does not work) and the one after the re-embedding the subtitles. You can also use MediaInfo application.

ZeaKyX commented 1 year ago

Hi @dmitrylyzo. There are some ASS subtitles issues with WebOS 3, have you looked at this bug analysis? https://github.com/jellyfin/jellyfin-webos/issues/31#issuecomment-1095401463

dmitrylyzo commented 1 year ago

Hi @dmitrylyzo. There are some ASS subtitles issues with WebOS 3, have you looked at this bug analysis? #31 (comment)

Now, yes. Thanks for heads up. But that is not relevant to the current issue.

nurunet commented 8 months ago

Hi! I thought I had the same issue here. However, the ASS subtitles did display after a while. I guess the extraction just took a moment.

sundermann commented 5 months ago

There exists subtitle luna endpoints (undocumented) that can show external and embedded subtitles using the media framework. Probably better to discuss on the OpenLGTV discord if any of the devs is interested in this.