sub: merge vsfilter-aspect and vsfilter-blur-compat options

The naming for "blur-compat" was misleading since the setting
actually affects more than just blur affects. Additionally
forwarding storage resolution but forcing an aspect ratio
of 1.0 for the video is likely to result in odd rendering
and there’s no known usecase for it.

Both options control which video properties are exposed to libass
so to fix the aforementioned issues merge these settings into one
tri-state sub-ass-use-video-data.

The default V keybind now cycles through all states of
use-video-data instead of toggling vsfilter-aspect-compat.

Resolves: https://github.com/mpv-player/mpv/issues/10680
This commit is contained in:
Oneric
2024-08-23 22:47:53 +02:00
committed by sfan5
parent f6d931301b
commit 207b1a2c91
8 changed files with 31 additions and 35 deletions

View File

@@ -0,0 +1,5 @@
Remove sub-ass-vsfilter-aspect-compat.
Remove sub-ass-vsfilter-blur-compat.
Add sub-ass-use-video-data.
Change default V keybind to cycle sub-ass-use-video-data
instead of toggling the now removed sub-ass-vsfilter-aspect-compat.

View File

@@ -181,8 +181,8 @@ u
style. See ``--sub-ass-override`` for more info.
V
Toggle subtitle VSFilter aspect compatibility mode. See
``--sub-ass-vsfilter-aspect-compat`` for more info.
Cycle through which video data gets used for ASS rendering.
See ``--sub-ass-use-video-data`` for more info.
r and R
Move subtitles up/down. The ``t`` key does the same as ``R`` currently, but

View File

@@ -2568,31 +2568,22 @@ Subtitles
Default: yes.
``--sub-ass-vsfilter-aspect-compat=<yes|no>``
Stretch SSA/ASS subtitles when playing anamorphic videos for compatibility
with traditional VSFilter behavior. This switch has no effect when the
video is stored with square pixels.
``--sub-ass-use-video-data=<none|aspect-ratio|all>``
Controls which information about the video stream is passed to libass.
Any option but ``all`` is incompatible with standard ASS and VSFilters.
The renderer historically most commonly used for the SSA/ASS subtitle
formats, VSFilter, had questionable behavior that resulted in subtitles
being stretched too if the video was stored in anamorphic format that
required scaling for display. This behavior is usually undesirable and
newer VSFilter versions may behave differently. However, many existing
scripts compensate for the stretching by modifying things in the opposite
direction. Thus, if such scripts are displayed "correctly", they will not
appear as intended. This switch enables emulation of the old VSFilter
behavior (undesirable but expected by many existing scripts).
For certain kinds of broken ASS files which got repurposed across
several video resolutions without either setting ``LayoutRes`` headers
or adjusting affected effects, it may be desirable to withhold storage resolution
information from libass to ensure consistent rendering across resolutions.
Among others this affects 3D rotations and blurs.
When encountering such files, try setting ``aspect-ratio``.
Enabled by default.
Even more broken files on anamorphic video might also exhibit stretching
unless aspect ratio information is also faked, in this case you can try
using ``none``. This has never an effect on non-anamorphic video.
``--sub-ass-vsfilter-blur-compat=<yes|no>``
Scale ``\blur`` tags by video resolution instead of script resolution
(enabled by default). This is bug in VSFilter, which according to some,
can't be fixed anymore in the name of compatibility.
Note that this uses the actual video resolution for calculating the
offset scale factor, not what the video filter chain or the video output
use.
Default: ``all``
``--sub-vsfilter-bidi-compat=<yes|no>``
Set implicit bidi detection to ``ltr`` instead of ``auto`` to match ASS'