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. --- DOCS/man/en/options.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'DOCS/man') diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index b53d86b744..fac446c0ba 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -110,6 +110,10 @@ OPTIONS rendering of ASS/SSA subtitles. It can sometimes be useful to forcibly override the styling of ASS subtitles, but should be avoided in general. + .. note:: + + Try using ``--ass-style-override=force`` instead. + ``--ass-force-style=<[Style.]Param=Value[,...]>`` Override some style or script info parameters. @@ -158,18 +162,21 @@ OPTIONS Using this option may lead to incorrect subtitle rendering. -``--ass-style-override=`` +``--ass-style-override=`` Control whether user style overrides should be applied. :yes: Apply all the ``--ass-*`` style override options. Changing the default for any of these options can lead to incorrect subtitle rendering (default). :no: Render subtitles as forced by subtitle scripts. - :force: Like ``yes``, but also override the style named ``Default`` to - make it look like the like text subtitle style implied by the + :force-default: Like ``yes``, but also override the style named ``Default`` + to make it look like the like text subtitle style implied by the ``--sub-text-...`` option. This won't always work, because the dialogue style doesn't necessary use this name, and it might break other advanced uses of the ASS format. + :force: Try to force the font style as defined by the ``--sub-text-*`` + options. Requires a modified libass, can break rendering easily. + Probably more reliable than ``force``. ``--ass-use-margins`` Enables placing toptitles and subtitles in black borders when they are -- cgit v1.2.3