Mpv: Does mpv support "filtering" subtitles in any way?

Created on 20 Jan 2020  Â·  4Comments  Â·  Source: mpv-player/mpv

It'd be extremely useful to filter out the characters enclosed in brackets for instance — the SDH tags are universal to my knowledge (refer to Subtitle Edit for more information). Regex support would also likely allow universally removing some advertising:

(?is).*opensubtitles.*

Currently I run Subtitle Edit locally, which isn't optimal.

question

All 4 comments

› mpv --list-options|grep sdh
 --sub-filter-sdh                 Flag (default: no)
 --sub-filter-sdh-harder          Flag (default: no)

There's also an option to adjust subtitle timing and a number of options to change subtitle styles, but the ones listed above are the only ones which actually "change" the subtitle text.
I thought of adding subtitle regex filters before (same reason as you, to remove opensubtitles annoyances), but haven't acted on that idea yet.

› mpv --list-options|grep sdh
 --sub-filter-sdh                 Flag (default: no)
 --sub-filter-sdh-harder          Flag (default: no)

Am I using the settings correctly? I still see [sound effects] lines after enabling both with SRT subtitles.

--sub-filter-sdh=yes
--sub-filter-sdh-harder=yes

I see that this has been reported (I'm also on Windows): https://github.com/mpv-player/mpv/issues/7188#issuecomment-569418635

Was this page helpful?
0 / 5 - 0 ratings