ass_align_lines_to_silence
Aligns subtitle line starts to the end of detected audio silence, shifting line timing so cues do not begin in silent gaps. Returns a dry-run plan before applying changes.
Instructions
Move line starts out of audio silence (ffmpeg silencedetect).
A line whose start falls inside a silent interval is pushed to the end of
that interval: shift_only="both" (default) moves the end by the same
delta, "start" keeps the end where it is and shortens the line. Lines
that start on audio are left alone and are not reported as suggestions.
Args:
selection: lines to consider.
video: media file; defaults to the workspace video/audio.
noise_db: silence threshold in dBFS.
min_silence_s: shortest silence to act on.
doc_id: document id.
dry_run: when True (the default) the plan is returned and nothing is
written.
shift_only: None/"both" or "start".
max_shift_ms: ignore suggestions longer than this.
Returns:
The same plan as :func:ass_align_to_silence plus "dry_run" and
"applied" so the caller always knows whether the document changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| video | No | ||
| doc_id | No | ||
| dry_run | No | ||
| noise_db | No | ||
| selection | No | ||
| shift_only | No | ||
| max_shift_ms | No | ||
| min_silence_s | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||