From 9bf0c5376301dc6c2729f6b33d76f9e859cfb3b3 Mon Sep 17 00:00:00 2001 From: llyyr Date: Sun, 3 Nov 2024 09:05:52 +0530 Subject: [PATCH] sub/sd_ass: set ASS_OVERRIDE_BIT_BLUR if available https://github.com/libass/libass/commit/4df64d060a8a89b2cd54678190426079bb9d49a6 Fixes: https://github.com/mpv-player/mpv/issues/14852 --- DOCS/interface-changes/sub-ass-override-blur.txt | 1 + DOCS/man/options.rst | 6 ++++-- sub/sd_ass.c | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 DOCS/interface-changes/sub-ass-override-blur.txt diff --git a/DOCS/interface-changes/sub-ass-override-blur.txt b/DOCS/interface-changes/sub-ass-override-blur.txt new file mode 100644 index 0000000000..dc10676e9d --- /dev/null +++ b/DOCS/interface-changes/sub-ass-override-blur.txt @@ -0,0 +1 @@ +`sub-blur` is now applied by `sub-ass-override=force` with new enough libass diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 94aede5636..a570991bdf 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2545,7 +2545,8 @@ Subtitles ``--sub-ass-override=`` Control whether user style overrides should be applied. Note that all of these overrides try to be somewhat smart about figuring out whether or not - a subtitle is considered a "sign". + a subtitle is considered a "sign" and try to be as non-destructive as + possible. :no: Render subtitles as specified by the subtitle scripts, without overrides. @@ -2554,7 +2555,8 @@ Subtitles rendering. :scale: Like ``yes``, but also apply ``--sub-scale`` (default). :force: Like ``yes``, but also force all ``--sub-*`` options. Can break - rendering easily. + rendering easily. Certain options aren't overridden if they can + potentially be too destructive. :strip: Radically strip all ASS tags and styles from the subtitle. This is equivalent to the old ``--no-ass`` / ``--no-sub-ass`` options. diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 46327e14a6..c01b7af720 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -533,6 +533,9 @@ static void configure_ass(struct sd *sd, struct mp_osd_res *dim, | ASS_OVERRIDE_BIT_COLORS | ASS_OVERRIDE_BIT_BORDER | ASS_OVERRIDE_BIT_SELECTIVE_FONT_SCALE; +#if LIBASS_VERSION >= 0x01703020 + set_force_flags |= ASS_OVERRIDE_BIT_BLUR; +#endif } if (shared_opts->ass_style_override[sd->order] == ASS_STYLE_OVERRIDE_SCALE) set_force_flags |= ASS_OVERRIDE_BIT_SELECTIVE_FONT_SCALE;