summaryrefslogtreecommitdiffstats
path: root/DOCS/man/options.rst
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2021-07-23 20:31:15 +0300
committeravih <avih@users.noreply.github.com>2021-08-05 21:32:22 +0300
commit41650203c32e179e5f3cf89e176ef6caccba05d9 (patch)
tree21bb2a4682f33be0ff99f52a3ba3efe847b4d1cb /DOCS/man/options.rst
parent7c264950c0bff588f6852c461c26b37a550a5abb (diff)
downloadmpv-41650203c32e179e5f3cf89e176ef6caccba05d9.tar.bz2
mpv-41650203c32e179e5f3cf89e176ef6caccba05d9.tar.xz
sub: sub-filter-regex and jsre: support ass-to-plaintext
Using --sub-filter-regex-plain (default:no) The ass-to-plaintext functionality already existed at sd_ass.c, but it's internal and uses a private buffer type, so a trivial utility wrapper was added with standard char*/bstr interface. The plaintext can be multi-line, and the multi-line regexp flag is now always set, but only affects plaintext (the ASS source is one line).
Diffstat (limited to 'DOCS/man/options.rst')
-rw-r--r--DOCS/man/options.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index c540400c74..c08161f338 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -2804,7 +2804,7 @@ Subtitles
List items are matched in order. If a regular expression matches, the
process is stopped, and the subtitle line is discarded. The text matched
- against is, currently, always the ``Text`` field of ASS events (if the
+ against is, by default, the ``Text`` field of ASS events (if the
subtitle format is different, it is always converted). This may include
formatting tags. Matching is case-insensitive, but how this is done depends
on the libc, and most likely works in ASCII only. It does not work on
@@ -2831,6 +2831,12 @@ Subtitles
Shares/affected-by all ``--sub-filter-regex-*`` control options (see below),
and also experimental. Requires only JavaScript support.
+``--sub-filter-regex-plain=<yes|no>``
+ Whether to first convert the ASS "Text" field to plain-text (default: no).
+ This strips ASS tags and applies ASS directives, like ``\N`` to new-line.
+ If the result is multi-line then the regexp anchors ``^`` and ``$`` match
+ each line, but still any match discards all lines.
+
``--sub-filter-regex-warn=<yes|no>``
Log dropped lines with warning log level, instead of verbose (default: no).
Helpful for testing.