INTERACT FORUM

More => Old Versions => JRiver Media Center 31 for Windows => Topic started by: bogdanbz on November 16, 2023, 03:01:21 pm

Title: [BUG] SRT subtitles displayed with wrong size
Post by: bogdanbz on November 16, 2023, 03:01:21 pm
Copy the text below in a srt file and use it with any video file in JRiver and in MPC.

JRiver displays the subtitles extremely tiny and with a large space between the lines, while MPC displays them properly.

What's more, JRiver displays the first and second subtitle lines at the same time, while the line timestamps are not overlapping, and it should first display line 1, and later line 2.

Later edit: the first and second line are displayed at the right time, my mistake; it's the line spacing that's wrong

Code: [Select]
1
00:00:02,080 --> 00:00:07,070
<font face="Trebuchet MS" size="24"><i>This is the first line of text
to be displayed,</i></font>

2
00:00:07,070 --> 00:00:08,520
<font face="Trebuchet MS" size="24"><i>and this is the second line of text.</i></font>

3
00:00:14,590 --> 00:00:15,780
<font face="Trebuchet MS" size="24">Thank you for looking at this issue!</font>

4
00:00:31,450 --> 00:00:35,930
<font face="Trebuchet MS" size="24">All things considered, this is 
something that should not look like this.</font>

5
00:00:36,800 --> 00:00:38,080
<font face="Trebuchet MS" size="24">MPC's internal subtitle renderer seems to handle this better.</font>

Title: Re: [BUG] SRT subtitles displayed with wrong size
Post by: zybex on January 04, 2024, 08:00:05 am
MC interprets the size value as a percentage, with 100 being the normal size. So "24" is 24% of normal size. This is also how MC interprets the font size in tooltip tags and other content.

SRT format doesn't seem to clearly define this, but it seems to be commonly assumed that "24" means 24px, not 24%. MC is also ignoring an explicit size="24px" tag, so I think you're right - should be fixed.
Title: Re: [BUG] SRT subtitles displayed with wrong size
Post by: Hendrik on January 04, 2024, 12:23:00 pm
MC calculates the line spacing on the default text size, which isn't great for this. I'll look into this.

I'll also add support for explicit 24px/24pt instructions, as well as set SRT to interpret no unit as a pixel/point size, not a percentage. I can't change that globally as all sorts of things would fall apart.

SRT subtitles rarely specify a size, as its often better to just let the player figure it out.
Title: Re: [BUG] SRT subtitles displayed with wrong size
Post by: bogdanbz on January 10, 2024, 02:34:49 pm
Thank you for looking at this issue!
Title: Re: [BUG] SRT subtitles displayed with wrong size
Post by: Hendrik on January 11, 2024, 09:44:20 am
I fixed both the size handling as well as the spacing for the upcoming MC32. I'll also take a look at the other subtitle topics soon.
Title: Re: [BUG] SRT subtitles displayed with wrong size
Post by: bogdanbz on January 16, 2024, 01:25:22 pm
Thank you very much!