shift
Move SRT or WebVTT subtitle cues earlier or later by a constant millisecond or frame offset, optionally from a specific cue onward, and write the adjusted file.
Instructions
Move cues later (positive) or earlier (negative) by a constant amount, either in milliseconds or in frames at a frame rate (frames=24, fps=29.97 is exact: 29.97 means 30000/1001). Optionally only from a given cue to the end of the file. Fails instead of producing a time before 00:00:00. SRT and WebVTT only; writes a new file.
For a subtitle that is early/late by a different amount at the start and the end, use resync instead.
Args: path: .srt or .vtt file. offset_ms: milliseconds to add (negative = earlier). Give this OR frames+fps. frames: number of frames to add (negative = earlier); needs fps. fps: frame rate for frames, e.g. 23.976, 24, 25, 29.97. from_cue: 1-based cue number to start shifting from (default: every cue). output: where to write (default: .shifted. next to the input). overwrite: allow replacing an existing output file (default false). encoding: force the input text encoding. output_encoding: encoding of the written file (default utf-8).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | ||
| path | Yes | ||
| frames | No | ||
| output | No | ||
| encoding | No | ||
| from_cue | No | ||
| offset_ms | No | ||
| overwrite | No | ||
| output_encoding | No | utf-8 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |