LAVFilters icon indicating copy to clipboard operation
LAVFilters copied to clipboard

Support string-search for advanced subtitle mode

Open Kokujou opened this issue 4 years ago • 3 comments

Hello. I want to realize the following scenario: When having german audio (ger), i want to have only forced subtitles. the syntax for this would be ger:*|f

now, the problem for this is, not all subtitle creators are as nice as normal people to set the forced flag for their sub instead, they will just name it "German Forced [ger] (ass) [default]"

so i want to request a pattern, that allows me to select the subtitle by name. my proposal would be something like this: ger:forced meaning, for the german language select subtitles containing the word "forced", similar would be ger:forced if you want to make the "contains"-functionality explicit or ger:"forced" if you want to make it clear that we're talking about string-search

i already tried some things to work around, but i can't think of any way to do it with negations. ger:|!n wouldn't work because you would still select default subtitles - i don't want that ger:|!n!d would'nt work in case the forced subtitle is a default subtitle - like in my current case

Kokujou avatar Apr 05 '22 11:04 Kokujou

You can already match against the name

"ger@forced" would look for a german track that contains the string "forced" in its title.

The @ should always be the last part, so you can also do eg. "ger|d@forced" if you want to include a flag.

The only limitation is that the string cannot contain spaces (or commas or semicolons), so you can only match a single word, but for checking for Forced that should be plenty.

Nevcairiel avatar Apr 05 '22 11:04 Nevcairiel

awesome :o then my only suggestion is to put that as an example in the git documentation^^ thank you!

Kokujou avatar Apr 05 '22 16:04 Kokujou

ah ... and another request: please make it case insensitive ^^

Kokujou avatar Apr 05 '22 16:04 Kokujou