occivink / mpv-scripts

Various scripts for mpv
The Unlicense
417 stars 38 forks source link

[crop] Fix subtitle borders being too-wide or too-thin on crop #69

Closed llyyr closed 1 year ago

llyyr commented 1 year ago

Depends on: https://github.com/mpv-player/mpv/pull/12256

This is caused by libass 0.17.0 or newer scaling borders, shadows and other stuff in x-axis when it previously used to not do that. To fix it just change the PlayResX when inserting a crop filter.

fix_border=no and fix_border=yes

llyyr commented 1 year ago

The mpv PR is upstreamed now, so we can merge this

occivink commented 1 year ago

This feels a bit like a hack to be honest. This effect occurs always, e.g. if the user specified manually a crop filter? If that's the case, it should be handled by mpv directly imo.

llyyr commented 1 year ago

It is a hack, oh well I'll just keep these changes local for now.

And yes, I tried to handle it in mpv directly but they don't want it either https://github.com/mpv-player/mpv/pull/12157

occivink commented 1 year ago

I mean, anyway this change will be resolved by the new crop method introduced by your other PR, won't it?

llyyr commented 1 year ago

Nope, the video-crop has no affect on this issue. The end result is the same, libass sees the scaled resolution, not the base. And you don't even want it to see the base resolution in any case, all that'll do is result in subtitles being not visible unless you make your mpv window bigger than the video inside it

Either way closing this PR.