summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-04-30 14:25:23 +0200
committerwm4 <wm4@nowhere>2016-04-30 14:25:23 +0200
commit3a8058658d3c0fadc607460d0411bbdea55a8edb (patch)
treea09ba5fcc3268e33fa7b4a8994399ba8a923c376
parent8d51f080104f33e6ba4b0749e0722e68c108ce23 (diff)
downloadmpv-3a8058658d3c0fadc607460d0411bbdea55a8edb.tar.bz2
mpv-3a8058658d3c0fadc607460d0411bbdea55a8edb.tar.xz
sd_add: replace --sub-ass=no with --ass-style-override=strip
--sub-ass=no / --ass=no still work, but --ass-style-override=strip is preferred now. With this change, --ass-style-override can control all the types of style overriding.
-rw-r--r--DOCS/interface-changes.rst2
-rw-r--r--DOCS/man/options.rst15
-rw-r--r--options/options.c2
-rw-r--r--sub/sd_ass.c3
4 files changed, 15 insertions, 7 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 3be16933ba..d1d8d870e2 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -23,6 +23,8 @@ Interface changes
- now ab-loops are active even if one of the "ab-loop-a"/"-b" properties is
unset ("no"), in which case the start of the file is used if the A loop
point is unsert, and the end of the file for an unset B loop point
+ - deprecate --sub-ass=no option by --ass-style-override=strip
+ (also needs --embeddedfonts=no)
--- mpv 0.17.0 ---
- deprecate "track-list/N/audio-channels" property (use
"track-list/N/demux-channel-count" instead)
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index f7f92caabf..bb92133396 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -1429,7 +1429,7 @@ Subtitles
Using this option may lead to incorrect subtitle rendering.
-``--ass-style-override=<yes|no|force>``
+``--ass-style-override=<yes|no|force|signfs|strip>``
Control whether user style overrides should be applied.
:yes: Apply all the ``--ass-*`` style override options. Changing the default
@@ -1439,6 +1439,8 @@ Subtitles
:no: Render subtitles as forced by subtitle scripts.
:force: Try to force the font style as defined by the ``--sub-text-*``
options. Can break rendering easily.
+ :strip: Radically strip all ASS tags and styles from the subtitle. This
+ is equivalent to the old ``--no-ass`` / ``--no-sub-ass`` options.
``--ass-force-margins``
Enables placing toptitles and subtitles in black borders when they are
@@ -1535,6 +1537,13 @@ Subtitles
``--sub-ass``, ``--no-sub-ass``
Render ASS subtitles natively (enabled by default).
+ .. note::
+
+ This has been deprecated by ``--ass-style-override=strip``. You also
+ may need ``--embeddedfonts=no`` to get the same behavior. Also,
+ using ``--ass-style-override=force`` should give better results
+ without breaking subtitles too much.
+
If ``--no-sub-ass`` is specified, all tags and style declarations are
stripped and ignored on display. The subtitle renderer uses the font style
as specified by the ``--sub-text-`` options instead.
@@ -1545,10 +1554,6 @@ Subtitles
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.
-
``--sub-auto=<no|exact|fuzzy|all>``, ``--no-sub-auto``
Load additional subtitle files matching the video filename. The parameter
specifies how external subtitle files are matched. ``exact`` is enabled by
diff --git a/options/options.c b/options/options.c
index 90a72ee7c3..30ae218ba2 100644
--- a/options/options.c
+++ b/options/options.c
@@ -374,7 +374,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", 3}, {"signfs", 4})),
+ ({"no", 0}, {"yes", 1}, {"force", 3}, {"signfs", 4}, {"strip", 5})),
OPT_FLAG("sub-scale-by-window", sub_scale_by_window, 0),
OPT_FLAG("sub-scale-with-window", sub_scale_with_window, 0),
OPT_FLAG("ass-scale-with-window", ass_scale_with_window, 0),
diff --git a/sub/sd_ass.c b/sub/sd_ass.c
index 788b78f3a4..e52795f7eb 100644
--- a/sub/sd_ass.c
+++ b/sub/sd_ass.c
@@ -422,7 +422,8 @@ static void get_bitmaps(struct sd *sd, struct mp_osd_res dim, double pts,
{
struct sd_ass_priv *ctx = sd->priv;
struct MPOpts *opts = sd->opts;
- bool no_ass = !opts->ass_enabled || ctx->on_top;
+ bool no_ass = !opts->ass_enabled || ctx->on_top ||
+ opts->ass_style_override == 5;
bool converted = ctx->is_converted || no_ass;
ASS_Track *track = no_ass ? ctx->shadow_track : ctx->ass_track;
ASS_Renderer *renderer = ctx->ass_renderer;