ass_shift_times
Shift ASS subtitle line start and end times by a millisecond offset, including negative values to move lines earlier, with optional clamping to preserve relative timing.
Instructions
Shift the start/end of lines by offset_ms (negative shifts allowed).
Args:
selection: which lines to shift — None/"all", an index, a list of
indices, "0-4,7" or any selector base.resolve_indices takes.
offset_ms: milliseconds to add; negative values move lines earlier.
doc_id: document id; defaults to the current document.
clamp: when True the shift is limited so that no selected line starts
before zero. The same (reduced) offset is applied to every line so
the relative timing of the selection is preserved.
only_selected: when False every line in the document is shifted and
selection is ignored.
Returns:
{"doc_id", "requested_offset_ms", "applied_offset_ms", "clamped", "only_selected", "indices", "count", "applied", "changes": [{"index", "start_ms", "end_ms", "new_start_ms", "new_end_ms", "start", "end"}]}
where the new_* values are what the document actually holds after the
write (ASS stores centiseconds).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clamp | No | ||
| doc_id | No | ||
| offset_ms | No | ||
| selection | No | ||
| only_selected | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||