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.
This commit is contained in:
wm4 2016-04-30 14:25:23 +02:00
parent 8d51f08010
commit 3a8058658d
4 changed files with 15 additions and 7 deletions

View File

@ -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)

View File

@ -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

View File

@ -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),

View File

@ -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;