From 015399f6967c683eb27265f81c4e93a61bc1b389 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 5 Jun 2014 00:25:24 +0200 Subject: sub: add --ass-style-override=force option (The old "force" choice of that option is renamed to "force-default".) This allows overriding native ASS script subtitle styles with the style provided by the --sub-text-* options (like --sub-text-font etc.). This is disabled by default, and needs to be explicitly enabled with the --ass-style-override=force option and input property. This uses in fact exactly the same options (--sub-text-*) and semantics as the ones used to configure unstyled text subtitles. It's recommended to combine this with this in the mpv config file: ass-force-style="ScaledBorderAndShadow=1" # work around dumb libass behavior Also, adding a key binding to toggle this behavior should be added, because overriding can easily break: L cycle ass-style-override This would cycle override behavior on Shift+L and allows quickly disabling/enabling style overrides. Note: ASS should be considered a vector format rather than a subtitle format. There is no easy or reliable way to determine whether the style of a given subtitle event can be changed without destroying visuals or not. This patch relies on a simple heuristic, which often works and often breaks. --- options/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'options/options.c') diff --git a/options/options.c b/options/options.c index 9ac4a63632..cb0ddd9c30 100644 --- a/options/options.c +++ b/options/options.c @@ -427,7 +427,7 @@ const m_option_t mp_opts[] = { OPT_CHOICE("ass-shaper", ass_shaper, 0, ({"simple", 0}, {"complex", 1})), OPT_CHOICE("ass-style-override", ass_style_override, 0, - ({"no", 0}, {"yes", 1}, {"force", 2})), + ({"no", 0}, {"yes", 1}, {"force-default", 2}, {"force", 3})), OPT_FLAG("osd-bar", osd_bar_visible, 0), OPT_FLOATRANGE("osd-bar-align-x", osd_bar_align_x, 0, -1.0, +1.0), OPT_FLOATRANGE("osd-bar-align-y", osd_bar_align_y, 0, -1.0, +1.0), -- cgit v1.2.3