sd_ass: introduce sub-ass-prune-delay

Disabled by default because it breaks sub-seek and playback in cases
where the user changes play-dir from + to - during runtime and past
"seen" events need to be re-rendered.

Available since dcc9eb722e
This commit is contained in:
llyyr
2024-10-30 17:44:42 +05:30
committed by Kacper Michajłow
parent 9bf0c53763
commit 22116734e7
5 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
add `sub-ass-prune-delay` option to control libass automatic pruning of past
events

View File

@@ -2533,6 +2533,22 @@ Subtitles
``complex`` is the default. If libass hasn't been compiled against HarfBuzz,
libass silently reverts to ``simple``.
``--sub-ass-prune-delay=<-1|seconds>``
Set the delay for automatic pruning of events from memory in libass. When
enabled, subtitle events are removed from memory once their end timestamp is
older than the specified delay.
:-1: disables automatic pruning (default).
:seconds: specify how many seconds after an event is no longer displayed
should the pruning occur. ``0`` prunes events as soon as they're
off screen.
.. note::
This breaks sub-seek and subtitle rendering when changing play-direction
from forward to backward during runtime for events that were already
"seen" and need to be rendered again, if those events got pruned.
``--sub-ass-styles=<filename>``
Load all SSA/ASS styles found in the specified file and use them for
rendering text subtitles. The syntax of the file is exactly like the ``[V4