clsid2 / mpc-hc

Media Player Classic
GNU General Public License v3.0
11.37k stars 499 forks source link

ASS rendered incorrectly #1487

Closed tormento closed 2 years ago

tormento commented 2 years ago

I have found an issue with some ASS rendering, Here it is on PasteBin

This is how it should be rendered (it works fine with mpv)

image

here is how it is rendered by MPC-HC

image

tormento commented 2 years ago

I found that XySubFilter by Pinterf renders it correctly.

The funny thing is that part of it is based on fixes from MPC-HC users :)

Perhaps it's time to update the internal renderer.

clsid2 commented 2 years ago

Neither of those screenshots match what the subtitle actually specifies. The subtitle is created badly.

MPC is working correctly.

tormento commented 2 years ago

@clsid2 that ass works fine with MPV, VLC, Kodi and MPC-(HC/BE) with external Pinterf XySubFilter.

Just load it into Aegisub and you will see it's perfectly fine as syntax and structure.

The Japanese part is the video, not the subtitle...

clsid2 commented 2 years ago

I need a link to the video file.

tormento commented 2 years ago

@clsid2 please provide me a way to send you a private link.

clsid2 commented 2 years ago

Pm me on Doom9

clsid2 commented 2 years ago

One of the differences is the handling of the BorderStyle value in the style. Value 1 means outline+shadow. Value 3 means to draw an opaque box. The relevant subtitle line uses value 3.

MPC always draws the opaque box. VLC only draws it if border or outline value is non-zero. The specification does not mention any explicit rules for drawing the opaque box.

[Script Info]
ScriptType: v4.00+
Collisions: Normal
PlayResX: 640
PlayResY: 360
Timer: 0.0000
WrapStyle: 0

[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,Trebuchet MS,24,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,1,2,0010,0010,0015,0
Style: Test1,Times New Roman,24,&H00DDB546,&H000000FF,&H00FEFEFE,&H00000000,-1,0,0,0,100,100,0,0,3,0,0,2,0010,0010,0015,1
Style: Test2,Times New Roman,24,&H00DDB546,&H000000FF,&H00FEFEFE,&H00000000,-1,0,0,0,100,100,0,0,3,1,0,2,0010,0010,0015,1
Style: Test3,Times New Roman,24,&H00DDB546,&H000000FF,&H00FEFEFE,&H00000000,-1,0,0,0,100,100,0,0,3,0,1,2,0010,0010,0015,1
Style: Test4,Times New Roman,24,&H00DDB546,&H000000FF,&H00FEFEFE,&H00000000,-1,0,0,0,100,100,0,0,3,1,1,2,0010,0010,0015,1

[Events]
Format: Layer,Start,End,Style,Name,MarginL,MarginR,MarginV,Effect,Text
Dialogue: 0,0:00:00.00,0:00:10.00,Test1,,0000,0000,0000,,Test 1
Dialogue: 0,0:00:10.00,0:00:20.00,Test2,,0000,0000,0000,,Test 2
Dialogue: 0,0:00:20.00,0:00:30.00,Test3,,0000,0000,0000,,Test 3
Dialogue: 0,0:00:30.00,0:00:40.00,Test4,,0000,0000,0000,,Test 4
adipose commented 2 years ago

Might be worth testing with the libass branch.

clsid2 commented 2 years ago

I have already committed a fix to make behavior equal to the other renderers.

tormento commented 2 years ago

@clsid2 I sent you a PM on doom9 with the video sample.

I have read that the Masaiki build has some color matching problems, while Pinterf one is correct.

clsid2 commented 2 years ago

Fixed