Jellyfin Forum
Differences between web and WebOS - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Development (https://forum.jellyfin.org/f-development)
+--- Forum: Client Development (https://forum.jellyfin.org/f-client-development)
+---- Forum: Smart TV Development (https://forum.jellyfin.org/f-smart-tv-development)
+---- Thread: Differences between web and WebOS (/t-differences-between-web-and-webos)



Differences between web and WebOS - Default - 2024-05-16

So i'm trying to understand how the wrapper for WebOS works, i'm not very experienced with web development but there is one thing that drives me crazy and i'm trying to understand so i can maybe fix it and make a contribution to the project.

My problem currently is, subtitles on HDR content are blinding, every time a subtitle appears on screen it brights the whole room, it's very distracting and uncomfortable watching media on a dark environment.

I've tried changing the subtitles color in the menu to gray (or any other option even) but to no result, it keeps appearing as solar flare white.

I was excited for the release of 10.9 because i knew that there would be a color selector, maybe that would allow me to change the color, but what happened was more confusing. The menu kept the same on the WebOS client, while accessing from the browser displayed the new menu where it allowed me to select whatever color i wanted.

I thought that it would be the same, since the WebOS client is basically a glorified redirect page to the web app, i imagine somewhere there is a check to see if the device supports x and y features and it fallback to something else to ensure the web project works with the biggest numbers of device possible, maybe it isn't possible to have a color selector on WebOS, but that doesn't explain why even changing on the current menu the subtitle doesn't change to the desired color.

Summarizing: The option for selecting the color of the subtitle doesn't seem to work on WebOS, furthermore the new menu for color selection is not present on WebOS.

Color selection on web:     
Color selection on WebOS:     


RE: Differences between web and WebOS - Host-in-the-Shell - 2024-05-16

Are you by any chance forcing to burn all subtitles or perhaps playing media that has burn in subtitles such as DVDSUB? I find that these are always white regardless of what color you choose there; from my experience, the color only applies to external subtitles that do not require burn in such as SRT format (at least on WebOS, which is my daily driver client).


RE: Differences between web and WebOS - bitmap - 2024-05-16

So you have to read the info above this setting. Only ASS, PGS, VOB (possibly other graphical implementations supported by ffmpeg) are affected. This means there are significant areas where this setting does nothing to affect subtitle color (SRT, VTT, SUB, TTML, SMI, possibly IMX and other formats).

The only route you can hope to utilize would be altering the subtitles that you're looking to utilize if they're not in ASS or graphical format. That would be the subtitles filter in ffmpeg -- specifically the force_style modifier -- for batched conversion or a program like AegiSub, which would be one by one.

Subtitles filter info: https://ffmpeg.org/ffmpeg-all.html#toc-subtitles-1

Linux sample for batches of AVI, M4V, MKV, MOV, MPG, MP4, SRT, VTT, SUB files:

Code:
for in in *.[amsv][4koprtUv][4Bgitv]; do \
  ffmpeg -hide_banner -v warning -stats \
  -i ${i} -c:s [copy|srt] \ # TTML not widely supported, must be converted to SRT

  # Set the subtitle stream index or remove ":s" and set the overall stream index
  # See list of video sizes (recommended): https://ffmpeg.org/ffmpeg-utils.html#toc-Video-size
  # If you set FontName, include fontsdir
  # ABGR not actual colorspace, special ASS format of: [ALPHA][BLUE][GREEN][RED], reversed HEX with first two digits for alpha
  # NOTE: With video input file, using SRT/similar for filename renders/burns subs onto video

  -filter:s:[X] "subtitles=filename=${i}:originalsize=hd1080:fontsdir=[/path/to/fonts]:stream_index=[X]:force_style='FontName=Arial,PrimaryColor=[ABGR_color]'" \
  "${i%.[amsv][4koprtUv][4Bgitv]}.srt"

I'll test this in just a few minutes, it's a proof of concept at the moment. You may need to fiddle with settings to get the desired output. I'm also unsure of whether this filter would expect ASS for output (possible) so it may need to be adjusted in that fashion. Seems like this could be added as a feature, but I'm not certain of the reliability nor the impact for transcoding requirements.

(2024-05-16, 05:37 PM)Host-in-the-Shell Wrote: Are you by any chance forcing to burn all subtitles or perhaps playing media that has burn in subtitles such as DVDSUB? I find that these are always white regardless of what color you choose there; from my experience, the color only applies to external subtitles that do not require burn in such as SRT format (at least on WebOS, which is my daily driver client).

Burning in requires transcoding, which would swap playback to SDR, since there is no HDR --> HDR transcoding. That would resolve the issue, but also preclude playback of HDR content at HDR levels.


RE: Differences between web and WebOS - Host-in-the-Shell - 2024-05-16

That is correct, but with tone mapping sometimes it's hard to tell the difference, at least if you're not a quality buff; this actually happened to me a few times where I was transcoding using intel's VPP tone mapping which I mistook for HDR playback before I was aware that that burn in subs disabled HDR due to the aforementioned limitation.