Subtitles to bright or picture to dim during 4K playback

Past weekend a watched a 4K remux of Edge of Tomorrow (Live. Die. Repeat.) The subtitles were very white and bright and detracting from the image. The movie itself appeared very dark but for me very watchable without subtitles. However with subs the difference in brightness really stood out.
I watched this on a Sony 4K OLED.

Why is this? Has it to do with how the Vero 4K+ handles the HDR info of the movie file? Or are the subs rendered wrong? Can you adjust sub color of brightness?

We plan to correct this in kernel 4.9. Meanwhile there are workarounds in this forum.

The darkness of the image will probably have something to do with the encode as Edge of Tomorrow has not yet been released on UHD Bluray.
There are lots of threads on here about overly bright subtitles and HDR sources, search for “bright subtitles HDR”.
I don’t think there were any solutions but there were a couple of workarounds.

I think the workaround, which seemed reasonable, was to change the font colour to light gray.

Indeed. I have a script that automatically detects UHD releases and recolors any SRT files belonging to said release. Works a charm!

Care to share?

Sure, it’s actually not as clever as I made it sound, but it works for me :slight_smile:

https://paste.osmc.tv/bikixumima.coffee

Only very recently I’ve been seeing non-2160p HDR releases, so now the script isn’t fully covering 100% of my use cases anymore.

1 Like

can you share it again please?

Sure: http://paste.osmc.tv/ucojerefub.coffee

or:

#!/usr/bin/python3
import glob
import os.path
from datetime import datetime
import os

movie_path = "/mnt/media/movies/"
tv_path = "/mnt/media/tv/"
sub_color = "858585"

def badLine(inputString):
    inputString = inputString.replace(',','')
    inputString = inputString.replace(':','')
    inputString = inputString.replace('1','')
    inputString = inputString.replace('2','')
    inputString = inputString.replace('3','')
    inputString = inputString.replace('4','')
    inputString = inputString.replace('5','')
    inputString = inputString.replace('6','')
    inputString = inputString.replace('7','')
    inputString = inputString.replace('8','')
    inputString = inputString.replace('9','')
    inputString = inputString.replace('0','')
    inputString = inputString.replace('-','')
    inputString = inputString.replace('>','')
    inputString = inputString.replace(' ','')

    # print(inputString.encode("utf-8"))
    # print(len(inputString.encode("utf-8")))

    if len(inputString.encode("utf-8")) == 0:
        return True
    else:
        return False

def processFile(file):
    if "2160p" in file:
        stop = False
        try:
            open(file, encoding="utf-8").read()
        except UnicodeDecodeError:
            print("UnicodeDecodeError on: " + str(file) + ". Removing it.")
            os.remove(file)
            stop = True

        if not stop:
            if sub_color not in open(file, encoding="utf-8").read():
                print(str(datetime.now()) + ": Detected HDR subtitle that needs work: {}".format(file))
                with open(file, encoding="utf-8") as f:
                    newlines = []
                    lines = f.readlines()
                    for index, line in enumerate(lines):
                        # remove newlines
                        line = str(line.rstrip())
                        # skip if line is empty or has numbers only
                        if badLine(line) or not line.strip() or index ==0:
                            newlines.append(line)
                        else:
                            line = "<font color=\"#{}\">".format(sub_color) + line + "</font>"
                            newlines.append(line)
                    f.close()

                    # overwrite the subs
                    thefile = open(file, 'w', encoding="utf-8")
                    for item in newlines:
                        thefile.write("%s\n" % item)

# Movies
for file in glob.iglob(movie_path + '/**/*.srt', recursive=True):
    processFile(file)

# TV
for file in glob.iglob(tv_path + '/**/*.srt', recursive=True):
    processFile(file)

You may wish to copy and paste the script here to avoid our Pastebin archiving it periodically

Sam

1 Like

I read that Kodi 19 has better support for HDR subtitles but I see my OSMC on my Vero4k’s is stuck on version 18.9.

“An often-overlooked feature, but immensely useful to so many people, subtitles get some attention in this release: timestamp overlays get fixed, plus you can now select a dark grey colour and set an opacity for the captions (particularly useful in HDR - protect your eyes, kids, you’ll miss them when they’re gone).”

Now I know the support of that Vero4k is limited but is there any chance of getting Kodi/OSMC version 19 on my 2 Vero4K’s?
It’s currently the only missing feature (better HDR subtitles). Feels like a waste just to buy the new Vero4K just for this.

Did you tried the hotfix from the Kodi19 OSMC Release FAQ?

No I didn’t. I thought if “look for updates” in OSMC didn’t give any results it had to do with the limited support so didn’t look any further.

I’ll have a look at how to get it on there by reading the FAQ then. From what you say it seems I should be able to update then. Thanks!

Sure you are.

Not sure which limited support you are talking about. The Vero4k is fully supported with the latest software version.

1 Like

I meant the 5 year support I read somewhere but maybe I’m wrong. Not that I think of it perhaps I bought is less than 5 years ago :). I can’t remember.

I’ve tried to apply the hotfix (first one mentioned here) but after that still no new update. Also did a reboot in between.
Latest version OSMC still: November 2020 2020.11.1
Here my log file: http://paste.osmc.tv/xuxanekasa.vhdl
I prefer not to do a reinstall.

Any idea? Or should I make a new topic about this? Thanks

Hi,

Could you please create a new topic, with the output of the following from the commandline:

sudo apt-get update && sudo apt-get dist-upgrade

Regards Tom.

1 Like

Support was extended.

See Vero 4K + support and manufacturing updates - OSMC.

We are well past the five years anyway.

There was a breaking change in Debian which the hotfix covered (but is now deprecated) and you’ll need to run this command to be able to update properly:

sudo apt-get update --allow-releaseinfo-change
sudo apt-get update
sudp apt-get dist-upgrade

Your hardware is still supported.