-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
options: add --sub-newline-to-space #13139
base: master
Are you sure you want to change the base?
options: add --sub-newline-to-space #13139
Conversation
Enables replace newline with space in subtitles when they are available, if the subtitles are in a plain text format (or ASS if ``--sub-ass-override``, ``--secondary-sub-ass-override`` is set to strip). Useful when secondary sub postion is adjacent to main subtitle. Default: no.
Download the artifacts for this pull request: |
Do you have an example where this is useful? How frequently does this option help? This seems too niche to be a mpv option |
Could a script process subtitles? |
basically when enable secondary subtitle at the bottom with main subtitle, you will want to enable this option , otherwise the experience is poor without sub-newline-to-space ( without overlap minimum secondary-sub-pos=84) with sub-newline-to-space ( without overlap minimum secondary-sub-pos=92) extra backgroud info: |
As mentioned above, this usage scenario is too niche and has significant limitations.
The new option may only be beneficial for the first uses and may disrupt the other two uses. |
Libass has built in overflow detect and soft wrap accordingly Basic on my local test, most movie and tvshow will be fine(mostly with built in English subtitle, translated secondely sub is added on the fly), since is a option, we can programly switch it on and off anyway sub-filter-regex-*, as the name suggests complete discard the match subtitle event (I didn't tested or check it thoroughly though, only briftly read the doc) have consider add a more universal sub-replace-regrex option, but it seems overkill for this replace newline to space purpose |
As mentioned above, the usage scenario you mentioned is too niche, and I personally believe that adding a dedicated option for this is not necessary enough.
The benefit of adding a universal |
I agree that a general find/replace would be a better solution. The only problem is that I don't think the regex filter actually works on windows? Not sure. |
as more and more videos include built in multi language subtitle, the usage scenario will increase(assuming more people will want to display two subtitle at the bottom as the issue #3022 suggest) a universal sub-replace-regrex options does seems more appropriate though, is being so many years,but there is no sub-replace option,so i assume is not added by design(only filter to discard the entire event) |
does --sub-replace-string more suitable for this option than --sub-replace-regex,it cover more usage case while maintaining simplicity, and has the benefit of supporting no posix system(like windows) |
Sorry for the really late reply here. The thing is that if we add a really simple We do actually have |
Enables replace newline with space in subtitles when they are available, if the subtitles are in a plain text format (or ASS if
--sub-ass-override
,--secondary-sub-ass-override
is set to strip). Useful when secondary sub postion is adjacent to main subtitle (Default: no).replace newline with space when display two subtitle at the bottom will have a better user experience, is adding a new option --sub-newline-to-space acceptable?