Documentation:Modules/subsdelay

From VideoLAN Wiki
Jump to navigation Jump to search
Module: subsdelay
Type Video sub-filter
First VLC version 1.2.0
Last VLC version -
Operating system(s) all
Description Change subtitles delay
Shortcut(s) -

The subsdelay filter can help slow readers to keep up with the subtitles.
It extends the subtitles duration without changing their original appearance time, so the subtitles are piled up on the video. To help keep track of the appearance order, existing subtitles gets more transparent as new subtitles arrive.

The subtitles duration factor is configurable through the synchronization dialog. Other options can be set through the preferences (show all settings → Video → Subtitles/OSD → Subsdelay).

Options

  • subsdelay-mode <integer> { 0, 1, 2 } : Delay calculation mode default value: 1
  • subsdelay-factor <float [0.0 .. 20.0]> : The delay calculation parameter default value: 2.0
  • subsdelay-overlap <integer [1 .. 4]> : Maximum number of subtitles allowed at the same time default value: 3
  • subsdelay-min-alpha <integer [0 .. 255]> : Alpha value of the earliest subtitle, where 0 is fully transparent and 255 is fully opaque.
    Subtitles alpha is somewhere between fully opaque and this value according to the appearance order and the maximum overlapping allowed default value: 70

Overlap fix

These rules help fixing some "flickering" effects caused by the overlapping. They are applied after the initial delay is calculated in the following order:

  • subsdelay-min-stops <integer> : Minimum time (in milliseconds) that a subtitle should stay after its predecessor has disappeared (subtitle delay will be extended to meet this requirement) default value: 1000
  • subsdelay-min-stop-start <integer> : Minimum time (in milliseconds) between subtitle disappearance and a newer subtitle appearance (earlier subtitle delay will be extended to fill the gap) default value: 1000
  • subsdelay-min-start-stop <integer> : Minimum time (in milliseconds) that a subtitle should stay after a newer subtitle has appeared (earlier subtitle delay will be shortened to avoid the overlap) default value: 1000

Examples

Example command line use (VLC 1.2.0 and above) :

% vlc --sub-filter subsdelay --subsdelay-mode 1 --subsdelay-factor 2 --subsdelay-overlap 3
Multiply subtitles duration by 2, up to 3 subtitles can be overlapped at a given time.
% vlc --sub-filter subsdelay --subsdelay-mode 0 --subsdelay-factor 0 --subsdelay-overlap 1 --subsdelay-min-stop-start 0
Don't change subtitles duration but fix any existing overlaps.

Source code

Appendix

For option --subsdelay-mode:

0
new_delay = original_delay + factor
Absolute delay - add an absolute delay to each subtitle.
In this mode the factor represents seconds
1
new_delay = original_delay * factor
Relative to source delay - multiply subtitles delay.
2
new_delay = f(original_text, factor)
Relative to source content - determine subtitles delay from its content.
The delay calculation is based on the number and length of the words in the subtitle.
This mode could only work for plain subtitles sources (like SubRip, MicroDVD, etc), for other formats the "relative to source delay" mode is used instead
This page is part of official VLC media player Documentation (User GuideStreaming HowToHacker GuideModules)
Please read the Documentation Editing Guidelines before you edit the documentation
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.