Image based subtitles are displayed very small over a cropped video

Hi there,

recently I was encountered an issue with the Windows desktop player and also with the HTPC version regarding subtitles.
The problem is that when playing a cropped video (e.g. 1920x800) with image-based subtitles (e.g. PGS 1920x1080), the subtitles are very small and almost in the middle of the image, which is very annoying. On other platforms like Android and webOS it works as expected.

here are two example screenshots:
unwanted behavior (Plex) vs wanted behavior (MPC-HC)

It seems like Plex is trying to match the height of the subtitles with the video though it would be a lot better if this would be done by the video width or screen size.

Is there a way to fix this problem?

1 Like

Could you prepare a sample file (30 seconds or so) which shows the issue?

Alternatively, you could experiment yourself with the multiple advanced parameters in the mpv.conf mpv.io

Sure, here is a 30 sec. sample of the file with a PGS subtitles:

The advanced mpv parameters also sound like an interesting idea, I will definitely take a look.

The problem is that the positioning instructions in the PGS stream are made for the uncropped video dimensions.
You can instruct the player to scale the subtitles differently, with
--image-subs-video-resolution=yes
in the mpv.conf, but the results will be sub-optimal.

You will also probably see that the size and position of the subs will change, as you change the size and aspect ratio of the player window.

IMHO, your best course of action is to send the subs through an OCR process to generate an SRT version of it. Introduction: convert image-based subtitles to SRT with Subtitle Edit

1 Like

Thank you for the tip with the mpv.conf file, now it is working as it should. :slight_smile:
Because I’m using Plex on a 16:9 screen which matches the subtitle resolution, there are no scaling problems.

Converting all the subtitles to SRT is already on my to-do list, though it takes quite a lot of time with a library of ~1000 movies and needing to manually correct a lot of OCR errors…

Recent versions of Subtitle Edit come with Tesseract updated to version 5, which reduced the need for manual corrections significantly (at least in my experience).
Of course this still depends on the used language and the subtitle font of the bitmap subtitles.
But I’ve sent those 6 lines of your sample through it and they came back correctly.

1
00:00:01,752 --> 00:00:03,545
Even if it is joke.

2
00:00:03,629 --> 00:00:04,922
-Idiot.
-[chuckles]

3
00:00:05,005 --> 00:00:07,716
There is more complexity
in my tomato soup

4
00:00:07,799 --> 00:00:10,093
than in both of your brains combined.

5
00:00:10,177 --> 00:00:13,013
Valdo, that is so unkind. It's so--

6
00:00:13,096 --> 00:00:15,641
One day I will put Ebola
in your tea.

7
00:00:15,724 --> 00:00:19,478
And then I will watch
as your faces sweat blood,

8
00:00:19,561 --> 00:00:21,355
-and I will be laughing.
-[phone ringing]

9
00:00:21,438 --> 00:00:23,440
-Nice. Keep your hair on.
-Wow.

10
00:00:23,523 --> 00:00:28,523
He's got a terrifying imagination,
hasn't he?

That’s good to know. I always used “Binary Image Compare” because it is the fastest method (though it produced a lot of errors) but maybe I should try Tesseract instead. The languages are mainly German and English with Arial font, so let’s see how good it works…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.