mirror of https://github.com/mpv-player/mpv
sub: add --osd-blur and --sub-text-blur options
These require bleeding edge libass (latest git version), and will be ignored otherwise. I'm not sure about the blur factor and scaling. The ASS/VSFilter semantics for blur scaling are a bad mess. Might require further investigation.
This commit is contained in:
parent
3097176ff1
commit
df8a481eba
|
@ -1351,6 +1351,9 @@
|
|||
--osd-back-color=<#RRGGBB>, --sub-text-back-color=<#RRGGBB>
|
||||
See ``--osd-color``. Color used for OSD/sub text background.
|
||||
|
||||
--osd-blur=<0..20.0>, --sub-text-blur=<0..20.0>
|
||||
Gaussian blur factor. 0 means no blur applied (default).
|
||||
|
||||
--osd-border-color=<#RRGGBB>, --sub-text-border-color=<#RRGGBB>
|
||||
See ``--osd-color``. Color used for the OSD/sub font border.
|
||||
|
||||
|
|
|
@ -69,6 +69,9 @@ void mp_ass_set_style(ASS_Style *style, struct osd_style_opts *opts)
|
|||
style->MarginV = opts->margin_y * scale;
|
||||
style->ScaleX = 1.;
|
||||
style->ScaleY = 1.;
|
||||
#if LIBASS_VERSION >= 0x01020000
|
||||
style->Blur = opts->blur;
|
||||
#endif
|
||||
}
|
||||
|
||||
ASS_Track *mp_ass_default_track(ASS_Library *library, struct MPOpts *opts)
|
||||
|
|
|
@ -79,6 +79,7 @@ const struct m_sub_options osd_style_conf = {
|
|||
OPT_FLOATRANGE("spacing", spacing, 0, -10, 10),
|
||||
OPT_INTRANGE("margin-x", margin_x, 0, 0, 300),
|
||||
OPT_INTRANGE("margin-y", margin_y, 0, 0, 600),
|
||||
OPT_FLOATRANGE("blur", blur, 0, 0, 20),
|
||||
{0}
|
||||
},
|
||||
.size = sizeof(struct osd_style_opts),
|
||||
|
|
Loading…
Reference in New Issue