jellyfin-tizen icon indicating copy to clipboard operation
jellyfin-tizen copied to clipboard

Subtitles never display regardless of selection

Open BarkerB opened this issue 5 years ago • 19 comments

I built and deployed this to my two Samsungs TVs with the latest code (as of a few days ago). On both TVs subtitles will not display, I have tried selecting them before starting the show, selecting them during the show, and giving them time to show up but they never do. I have tried this with multiple video files.

Subtitles do work on the other platforms I have tried so this does seem specific to the Tizen app.

I thought that the problem I was seeing was the exact same as described in: https://github.com/jellyfin/jellyfin-web/issues/1872 but I checked and the code I built with has that change in it and it still does not work so this could be a different or perhaps related issue?

One of the TVs I am testing with is: UN55MU6290 with the latest software updates the other TV is a very similar model number from the same year. I can get it if it would be helpful.

BarkerB avatar Feb 26 '21 05:02 BarkerB

So you have Tizen 3.0 (https://developer.samsung.com/smarttv/develop/specifications/tv-model-groups.html). The change you mentioned concerns Tizen 2.x (they use WebKit instead of Chrome).

Possible fix: https://github.com/jellyfin/jellyfin-web/pull/2443

dmitrylyzo avatar Feb 26 '21 18:02 dmitrylyzo

Yes it does look like my TV uses Tizen 3.0

I pulled the changes now that they've merged to master and rebuilt and redeployed the app to my TV but unfortunately the no subtitles will show still.

BarkerB avatar Feb 28 '21 03:02 BarkerB

Actually after further testing subtitles did show up for one specific movie I have, but won't for any of my anime shows that I was attempting to use. I'm not sure what the significant difference is between them though that would affect subtitles.

BarkerB avatar Feb 28 '21 06:02 BarkerB

That "possible fix" fixes embedded fonts. What kind of subtitles are not shown? SRT/ASS, embedded, custom fonts?

dmitrylyzo avatar Feb 28 '21 06:02 dmitrylyzo

The movie that works is an mp4 file with a separate srt file for the subtitles. The show(s) that don't work are mkv with the subtitles embedded in the container.

(Hopefully that is helpful, sorry I'm very new to media software like this and understanding how video formats work and whatnot. Happy to provide any info I can though :) )

BarkerB avatar Feb 28 '21 07:02 BarkerB

ffprobe YOUR_MKV_FILE will show what subs you have. Or you can use mediainfo. But I am pretty sure it's SSA/ASS.

On my side, I test ASS subtitles with karaoke. On PC in Chrome, I got fast rendering (it uses SubtitlesOctopus like on TV). But on TV, I got ~15s delay before I saw some subtitles. Pause at the beginning helps a bit, but still not as smooth as on PC.

dmitrylyzo avatar Feb 28 '21 10:02 dmitrylyzo

Okay using ffprobe I can confirm that the subtitles are ASS. I also thought there may just be a delay, but I let it play through for a few minutes and have tried pausing at the start to see if it would help but no luck.

BarkerB avatar Feb 28 '21 19:02 BarkerB

Hmm, are they extracted at all?

Extracted subtitles are located in data folder. On Linux, it is /var/lib/jellyfin/data/subtitles. There should be some .ass file. In logs (/var/log/jellyfin) I have:

[2021-02-28 22:57:15.650 +03:00] [INF] [171] MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-i file:\"/mnt/hgfs/jellyfin-test/movies/test-gray-fonts.1080p.mkv\" -map 0:1 -an -vn -c:s copy \"/var/lib/jellyfin/data/subtitles/c/cd694e88-a2c6-f458-1220-6720776380e2.ass\""
...
[2021-02-28 22:57:15.837 +03:00] [INF] [177] MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder: ffmpeg subtitle extraction completed for file:"/mnt/hgfs/jellyfin-test/movies/test-gray-fonts.1080p.mkv" to /var/lib/jellyfin/data/subtitles/c/cd694e88-a2c6-f458-1220-6720776380e2.ass

Also, can you extract subtitles and drop them somewhere so I can grab them?

dmitrylyzo avatar Feb 28 '21 20:02 dmitrylyzo

It looks like the Windows equivalent is: C:\ProgramData\Jellyfin\Server\data\subtitles

I cleared out that folder, and watched the video on a Chrome browser and sure enough the subtitles are extracted and put there. I then cleared out the folder again, played through the video using the Tizen app on my TV and nothing appears in that directory. So it would appear that it's probably not a display issue, but rather they're not getting extracted and sent to the client at all.

I've gone ahead and uploaded the file here for your reference: https://www.mediafire.com/file/303o6h6od2trmch/89e8dfd7-40bf-cad2-6dd4-ce54c32655e7.ass/file

Please note that I will delete the file from there within a couple of days.

Thanks!

BarkerB avatar Mar 04 '21 05:03 BarkerB

I tested master web + (unstable and 10.6.4) server. But it is recommended to use the appropriate version of jf-web. With your subtitles (extracted and embedded), it took ~2 minutes before they appeared on LT27H390 (Tizen 3.0). ~40sec on UE65NU7400 (Tizen 4.0). Being embedded, they are extracted instantly and I see the message in the log. So the subtitles are fine (but really heavy).

To verify if they work, place extracted subtitles next to the video file naming them as <filename without extension>.(Extracted).ass and run Refresh metadata for that episode. Then they will be selectable as (Extracted).

Maybe the logs on the server will tell more. To enable debug logging: in etc/logging.default.json (or logging.json) set Serilog/MinimumLevel/Default to Debug and restart the server. You should see ... [DBG] ... entries.

Could you also try to debug the app on TV from Tizen Studio? To see app log in the browser console.

dmitrylyzo avatar Mar 04 '21 20:03 dmitrylyzo

On my Tizen 3.0 TV, subtitles will not appear no matter what I do.

I've tested Demon Slayer: Infinity Train and found the following:

  • On Chrome it transcodes and shows the subtitles. At the same time, the .ass file is extracted to the subtitle folder.
  • In the Jellyfin desktop client, it doesn't transcode and subtitles are shown instantly.
  • On the Samsung TV app, subtitles are never shown, even when I copy the .ass file to the movie folder as instructed above and select it as subtitle track. Instead of (Extracted), it shows as Undefined.

Using current master branches of jellyfin-web and -tizen and running Jellyfin Docker latest, so version 10.7.7.

reconman avatar Sep 13 '21 23:09 reconman

If I enable subtitle burn-in for ASS, the subtitles work, since the Jellyfin server will transcode the stream before it's sent to the TV. But I want to avoid transcoding, that's why I'm in the process of switching from Plex to Jellyfin.

reconman avatar Sep 13 '21 23:09 reconman

I think the issue is that (some?) TVs with Tizen 3.0 can't deal with SSA subtitles. #34 was only tested with Tizen 4.0 and 5.0.

reconman avatar Sep 18 '21 09:09 reconman

iirc, ASS/SSA subtitles were displayed even on webOS 2 (~Tizen 2.4). But heavy styled subtitles may be a problem.

@reconman Could you check the response in the Network tab of the browser like {your_server}/Videos/{?}/{?}/Subtitles/{steam_index}/{?}/Stream.ass?api_key={}? Currently, I am testing unstable server and getting not ASS but SRT with some HTML, but MIME is text/x-ssa. That's why SubtitlesOctopus fails.

SRT with HTML
1
00:00:00,000 --> 00:00:05,000
<font face="Angie" size="66"><b></b></font>

2
00:00:02,700 --> 00:00:03,850
<font face="Angie" size="66"><b>Fight.</b></font>

3
00:00:06,200 --> 00:00:07,610
<font face="Angie" size="66"><b>Fight.</b></font>

4
00:00:07,610 --> 00:00:09,110
<font face="Angie" size="66"><b>What are you doing?</b></font>

5
00:00:10,110 --> 00:00:12,760
<font face="Angie" size="66"><b>Were you talking to your reflection just now?</b></font>

...

dmitrylyzo avatar Sep 18 '21 11:09 dmitrylyzo

Content type is text/x-ssa,

Body
[Script Info]
Title: English (US)
Original Translation: 
Original Editing: 
Original Timing: 
Synch Point: 
Script Updated By: 
Update Details: 
ScriptType: v4.00+
Collisions: Normal
PlayResX: 640
PlayResY: 360
WrapStyle: 0
ScaledBorderAndShadow: yes

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Roboto Medium,22,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,1.3,0,2,20,20,23,1
Style: main,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,1.3,0,2,20,20,23,0
Style: top,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,1.3,0,8,20,20,23,0
Style: italics,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,-1,0,0,100,100,0,0,1,1.3,0,2,20,20,23,0
Style: italicstop,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,-1,0,0,100,100,0,0,1,1.3,0,8,20,20,23,0
Style: flashback,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,1.3,0,2,20,20,23,1
Style: flashback italics,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,-1,0,0,100,100,0,0,1,1.3,0,2,20,20,23,1
Style: flashbacktop,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,1.3,0,8,20,20,23,0
Style: flashbackitalicstop,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,-1,0,0,100,100,0,0,1,1.3,0,8,20,20,23,0
Style: sign_3927_25_Night_One_Failed,Times New Roman,17,&H00B8C9C9,&H000000FF,&H646B776B,&H00000000,-1,0,0,0,100,100,0,0,1,0,0,1,30,30,20,1
Style: sign_17341_199_Louisa__Job__Ble,Arial,12,&H001F0700,&H000000FF,&H00DE916A,&H00000000,-1,0,0,0,100,100,0,0,1,4,0,1,30,30,20,1
Style: sign_33977_374_Next_Time,Verdana,12,&H00070406,&H000000FF,&H00757E80,&H00000000,-1,0,0,0,100,100,0,0,1,1,0,2,261,261,10,1
Style: sign_34000_375_Black_Spider_of_,Verdana,19,&H00070406,&H000000FF,&H00757E80,&H00000000,-1,0,0,0,100,100,0,0,1,1,0,8,30,30,20,1
Style: sign_8268_83_Winner,Trebuchet MS,12,&H00655962,&H000000FF,&H00F0F0E8,&H00000000,-1,0,0,0,100,100,0,0,1,4,0,2,30,30,20,1
Style: sign_23250_288_What_Is_an_Illus,Trebuchet MS,34,&H00070B08,&H000000FF,&H00FDFFFD,&H00102B68,-1,0,0,0,100,100,0,0,1,4,0,2,30,30,20,1
Style: sign_14538_144_Demiplane_Rankin,Trebuchet MS,34,&H0016171C,&H000000FF,&H00F5F5F4,&H00102B68,-1,0,0,0,100,100,0,0,1,2,0,8,30,30,20,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.14,0:00:02.73,main,MAKOTO,0,0,0,,What happened?
Dialogue: 0,0:00:04.08,0:00:05.23,main,MAKOTO,0,0,0,,Mio, stop the bleeding.
Dialogue: 0,0:00:05.56,0:00:07.60,main,MAKOTO,0,0,0,,I'm heading to the site of the explosion.

reconman avatar Sep 18 '21 11:09 reconman

@reconman Yours is fine.

With fixed unstable, I got the ASS subtitles on a real Tizen 3 (as before https://github.com/jellyfin/jellyfin-tizen/issues/64#issuecomment-790893041). But it takes too long to load the subtitles. I feel that we need some delay before the start to let JavascriptSubtitlesOctopus to render the first events.

To see if they work (or not), try stripping it, leaving 10 Events.

dmitrylyzo avatar Sep 18 '21 22:09 dmitrylyzo

Just so it's clear for me, Jellyfin Web also calls the subtitle URL when it's direct streaming, right?

In Chrome, it's transcoding, on Tizen it's not.

reconman avatar Sep 19 '21 06:09 reconman

Just so it's clear for me, Jellyfin Web also calls the subtitle URL when it's direct streaming, right?

Yes, as long as you don't make ASS/SSA burn-in (in the subtitles settings), they will be handled the same way (rendered on the client by JavascriptSubtitlesOctopus) regardless of video transcoding/streaming. The URL I mentioned earlier is requested by JavascriptSubtitlesOctopus.

In Chrome, it's transcoding, on Tizen it's not.

No, they work the same way (see above).

iirc, if subtitles are burnt-in, there will be Transcoding and SubtitlesNotSupported in the playback data.

dmitrylyzo avatar Sep 19 '21 09:09 dmitrylyzo

To see if they work (or not), try stripping it, leaving 10 Events.

Even with 10 Events, it takes 2.4 seconds for the subtitles to load in Chrome. For the full embedded subtitles it's around 6.5 seconds.

And the subtitles still don't show on my TV.

reconman avatar Sep 19 '21 13:09 reconman