mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 20:27:23 +00:00
options: slight cleanup of --sub-ass-style-override
List of changes: 1. Rename `signfs` to `scale`, to better match what it actually does (force --sub-scale to apply to ASS subtitles), and fix the blatantly wrong documentation (it actually specifically does *not* apply to signs) 2. Rename `--sub-ass-style-override` to `--sub-ass-override` to help reduce confusion between it and `--sub-ass-force-style`, as well as pointing out that it doesn't necessarily actually override styles. (The new `scale` option, for example, only sets ASS_OVERRIDE_BIT_FONT_SIZE, but not ASS_OVERRIDE_BIT_STYLE) 3. Mention that `--sub-ass-override` is generally sort of smart about only overriding dialog, not signs.
This commit is contained in:
parent
cd2baf6198
commit
4d1ffecabc
@ -25,6 +25,8 @@ Interface changes
|
||||
- introduce --replaygain... options, which replace the same functionality
|
||||
provided by the deprecated --af=volume:replaygain... mechanism.
|
||||
- drop the internal "mp-rawvideo" codec (used by --demuxer=rawvideo)
|
||||
- rename --sub-ass-style-override to --sub-ass-override, and rename the
|
||||
`--sub-ass-override=signfs` setting to `--sub-ass-override=scale`.
|
||||
--- mpv 0.25.0 ---
|
||||
- remove opengl-cb dxva2 dummy hwdec interop
|
||||
(see git "vo_opengl: remove dxva2 dummy hwdec backend")
|
||||
|
@ -1481,7 +1481,7 @@ Subtitles
|
||||
Changing styling and position does not work with all subtitles. Image-based
|
||||
subtitles (DVD, Bluray/PGS, DVB) cannot changed for fundamental reasons.
|
||||
Subtitles in ASS format are normally not changed intentionally, but
|
||||
overriding them can be controlled with ``--sub-ass-style-override``.
|
||||
overriding them can be controlled with ``--sub-ass-override``.
|
||||
|
||||
Previously some options working on text subtitles were called
|
||||
``--sub-text-*``, they are now named ``--sub-*``, and those specifically
|
||||
@ -1558,8 +1558,8 @@ Subtitles
|
||||
scales with the approximate window size, while the other option disables
|
||||
this scaling.
|
||||
|
||||
Affects plain text subtitles only (or ASS if ``--sub-ass-style-override`` is
|
||||
set high enough).
|
||||
Affects plain text subtitles only (or ASS if ``--sub-ass-override`` is set
|
||||
high enough).
|
||||
|
||||
``--sub-ass-scale-with-window=<yes|no>``
|
||||
Like ``--sub-scale-with-window``, but affects subtitles in ASS format only.
|
||||
@ -1638,16 +1638,19 @@ Subtitles
|
||||
|
||||
Using this option may lead to incorrect subtitle rendering.
|
||||
|
||||
``--sub-ass-style-override=<yes|no|force|signfs|strip>``
|
||||
Control whether user style overrides should be applied.
|
||||
``--sub-ass-override=<yes|no|force|scale|strip>``
|
||||
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".
|
||||
|
||||
:yes: Apply all the ``--sub-ass-*`` style override options. Changing the default
|
||||
for any of these options can lead to incorrect subtitle rendering
|
||||
(default).
|
||||
:signfs: like ``yes``, but apply ``--sub-scale`` only to signs
|
||||
:no: Render subtitles as forced by subtitle scripts.
|
||||
:force: Try to force the font style as defined by the ``--sub-*``
|
||||
options. Can break rendering easily.
|
||||
:no: Render subtitles as specified by the subtitle scripts, without
|
||||
overrides.
|
||||
:yes: Apply all the ``--sub-ass-*`` style override options. Changing the
|
||||
default for any of these options can lead to incorrect subtitle
|
||||
rendering (default).
|
||||
:force: Like ``yes``, but also force all ``--sub-*`` options. Can break
|
||||
rendering easily.
|
||||
:scale: Like ``yes``, but also apply ``--sub-scale``.
|
||||
:strip: Radically strip all ASS tags and styles from the subtitle. This
|
||||
is equivalent to the old ``--no-ass`` / ``--no-sub-ass`` options.
|
||||
|
||||
@ -1660,7 +1663,7 @@ Subtitles
|
||||
``--sub-use-margins``
|
||||
Enables placing toptitles and subtitles in black borders when they are
|
||||
available, if the subtitles are in a plain text format (or ASS if
|
||||
``--sub-ass-style-override`` is set high enough).
|
||||
``--sub-ass-override`` is set high enough).
|
||||
|
||||
Default: yes.
|
||||
|
||||
@ -1715,7 +1718,7 @@ Subtitles
|
||||
|
||||
Choosing anything other than ``no`` will make the subtitle color depend on
|
||||
the video color space, and it's for example in theory not possible to reuse
|
||||
a subtitle script with another video file. The ``--sub-ass-style-override``
|
||||
a subtitle script with another video file. The ``--sub-ass-override``
|
||||
option doesn't affect how this option is interpreted.
|
||||
|
||||
``--stretch-dvd-subs=<yes|no>``
|
||||
@ -1755,9 +1758,9 @@ Subtitles
|
||||
|
||||
.. note::
|
||||
|
||||
This has been deprecated by ``--sub-ass-style-override=strip``. You also
|
||||
This has been deprecated by ``--sub-ass-override=strip``. You also
|
||||
may need ``--embeddedfonts=no`` to get the same behavior. Also,
|
||||
using ``--sub-ass-style-override=force`` should give better results
|
||||
using ``--sub-ass-override=style`` should give better results
|
||||
without breaking subtitles too much.
|
||||
|
||||
If ``--no-sub-ass`` is specified, all tags and style declarations are
|
||||
@ -2000,7 +2003,7 @@ Subtitles
|
||||
|
||||
``--sub-ass-justify=<yes|no>``
|
||||
Applies justification as defined by ``--sub-justify`` on ASS subtitles
|
||||
if ``--sub-ass-style-override`` is not set to ``no``.
|
||||
if ``--sub-ass-override`` is not set to ``no``.
|
||||
Default: ``no``.
|
||||
|
||||
``--sub-shadow-color=<color>``
|
||||
|
@ -511,8 +511,8 @@ const m_option_t mp_opts[] = {
|
||||
OPT_CHOICE("sub-ass-shaper", ass_shaper, UPDATE_OSD,
|
||||
({"simple", 0}, {"complex", 1})),
|
||||
OPT_FLAG("sub-ass-justify", ass_justify, 0),
|
||||
OPT_CHOICE("sub-ass-style-override", ass_style_override, UPDATE_OSD,
|
||||
({"no", 0}, {"yes", 1}, {"force", 3}, {"signfs", 4}, {"strip", 5})),
|
||||
OPT_CHOICE("sub-ass-override", ass_style_override, UPDATE_OSD,
|
||||
({"no", 0}, {"yes", 1}, {"force", 3}, {"scale", 4}, {"strip", 5})),
|
||||
OPT_FLAG("sub-scale-by-window", sub_scale_by_window, UPDATE_OSD),
|
||||
OPT_FLAG("sub-scale-with-window", sub_scale_with_window, UPDATE_OSD),
|
||||
OPT_FLAG("sub-ass-scale-with-window", ass_scale_with_window, UPDATE_OSD),
|
||||
@ -844,6 +844,7 @@ const m_option_t mp_opts[] = {
|
||||
OPT_REPLACED("ass-shaper", "sub-ass-shaper"),
|
||||
OPT_REPLACED("ass-style-override", "sub-ass-style-override"),
|
||||
OPT_REPLACED("ass-scale-with-window", "sub-ass-scale-with-window"),
|
||||
OPT_REPLACED("sub-ass-style-override", "sub-ass-override"),
|
||||
OPT_REMOVED("fs-black-out-screens", NULL),
|
||||
OPT_REPLACED_MSG("loop", "loop-playlist", "--loop will be changed to map to"
|
||||
" --loop-file in future releases."),
|
||||
|
@ -313,7 +313,7 @@ static void configure_ass(struct sd *sd, struct mp_osd_res *dim,
|
||||
bool set_scale_by_window = true;
|
||||
bool total_override = false;
|
||||
// With forced overrides, apply the --sub-* specific options
|
||||
if (converted || opts->ass_style_override == 3) {
|
||||
if (converted || opts->ass_style_override == 3) { // 'force'
|
||||
set_scale_with_window = opts->sub_scale_with_window;
|
||||
set_use_margins = opts->sub_use_margins;
|
||||
set_scale_by_window = opts->sub_scale_by_window;
|
||||
@ -343,7 +343,7 @@ static void configure_ass(struct sd *sd, struct mp_osd_res *dim,
|
||||
int set_force_flags = 0;
|
||||
if (total_override)
|
||||
set_force_flags |= ASS_OVERRIDE_BIT_STYLE | ASS_OVERRIDE_BIT_FONT_SIZE;
|
||||
if (opts->ass_style_override == 4)
|
||||
if (opts->ass_style_override == 4) // 'scale'
|
||||
set_force_flags |= ASS_OVERRIDE_BIT_FONT_SIZE;
|
||||
#if LIBASS_VERSION >= 0x01201001
|
||||
if (converted)
|
||||
|
Loading…
Reference in New Issue
Block a user