mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.71k stars 2.93k forks source link

sub/osd: adjust osd margins #15342

Closed norinoriko closed 4 days ago

norinoriko commented 4 days ago

Subtle difference, but --osd-margin-*=16 looks better in terms of console/OSD alignment, especially when using the new osd-box profile.

Old (15):

old

New (16):

new

kasper93 commented 4 days ago

cc @guidocella

raziel711 commented 4 days ago

Would it be possible to change the osd margins to osd-margin-*=18 instead? Changing the margins of the osd to 16 still doesn't cause the stats and console boxes to line up correctly.

osd-margin-*=16: 16

osd-margin-*=18: 18

It's extremely subtle, but if you look at the bottom left corner of the stats box using osd-margin-*=16, it doesn't line up with the console window; however, everything lines up with osd-margin-*=18.

guidocella commented 4 days ago

These all look the same to me. Anyway, stats can be slightly different because it scales differently from the rest. OSC and console decrease the PlayResY to 720, while stats increases the font, border and shadow sizes instead, because it uses show-text instead of osd-overlay.

norinoriko commented 4 days ago

Would it be possible to change the osd margins to osd-margin-*=18 instead? Changing the margins of the osd to 16 still doesn't cause the stats and console boxes to line up correctly.

I can't reproduce with --no-config.

These all look the same to me.

Set --scale=nearest and zoom in to the left border of the OSD background. Here's how changing the margin affects the console and screenshot OSD message alignment for example.

15: 15

16: 16

guidocella commented 4 days ago

Ok, I see you what you mean. Probably even numbers round better as 17 is also not aligned and 18 is aligned.

norinoriko commented 4 days ago

Probably even numbers round better as 17 is also not aligned and 18 is aligned.

Yes, 16 and 18 are both aligned. Funnily enough, The next "good" value that maintains alignment after 18 is actually 23. But that's probably too large and goes against the purpose of making the console respect osd-margin in b71ab51996608da4a7ce862f95a4f79a8ff1b755.