mpv-player / mpv

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

Subtitle antialiasing (or independent scaling) #2820

Open D4Ndan opened 8 years ago

D4Ndan commented 8 years ago

Aliasing in ASS subtitles can be "solved" with blend-subtitles=video:scale=ewa_lanczossharp:scale-blur=1.5:dscale=bicubic/mitchell, but this also applies blur to whole image, causing loss of detail.

It would be great to have the option to apply blur only to the ASS subtitles or use different upscaling/downscaling methods for the subs (independently from the video scalers).

Some ideas:

#Independent subtitle scaling
scale=ewa_lanczossharp:ass-scale=bicubic
dscale=anysharpdownscaler:ass-dscale=mitchell
#Blur/antialiasing
scale=ewa_lanczossharp:scale-blur=1.15:ass-scale=ewa_lanczos:ass-scale-blur=1.6
scale=ewa_lanczossharp:dscale=mitchell:ass-aa=yes
#AA/blur when not scaling
wns-ass-blur=1.12
wns-ass-aa=yes
ass-scale=bicubic:ass-dscale=mitchell:wns-ass-blur=1.12
#drawing subtitles to window resolution and then apply a soft downscaling to video resolution
ass-autoscaling #not supposed to work with _blend-subtitles=video_
ass-autoscaling:wns-ass-aa=yes
ghost commented 8 years ago

Seems unlikely to get implemented, unless someone wants to work on it.

haasn commented 8 years ago

It would be very easy to add a sub-blur=<strength> option that just does a gaussian blur or something.

Is supporting the whole scale-filter mechanism really necessary? It wouldn't be too difficult but I'd be opposed to the extra option bloat more than anything else.

ghost commented 8 years ago

Wrong issue.

ghost commented 8 years ago

Also there is --sub-gauss, which does it in software, and only works for bitmap subtitles.

co5mo commented 4 years ago

this is preventing me from using this app the subs are horribly pixelated even vobsub has better rendering