Tools /
Shift timing
Move every cue earlier or later by a fixed amount, e.g. to fix subtitles that are consistently 2 seconds behind the video. Cues pushed before 00:00:00 are clamped to zero.
shift_subtitles
- Plan
- Basic+
- Usage
- 1 upload
- Effect
- Returns a new file
Parameters
| Parameter | Type | Description |
|---|---|---|
contentrequired | string | Full subtitle file contents as text (SRT, WebVTT, ASS/SSA, or the JSON produced by convert_subtitles). |
filenameoptional | string | Original file name. The extension helps detect the format. |
formatoptional | enum | Input format. Detected from the file name or contents when omitted."srt" · "vtt" · "ass" · "ssa" · "json" |
offsetMsrequired | integer | Milliseconds to shift by. Positive = later, negative = earlier.-86,400,000 to 86,400,000 |
outputFormatoptional | enum | Output format. Defaults to the format of the (first) input."srt" · "vtt" · "ass" · "json" |
Example
You ask your assistant:
“These subtitles show up 1.5 seconds too late. Fix them.”
It calls shift_subtitles with:
arguments
{
"filename": "movie.srt",
"content": "1\n00:00:01,000 --> 00:00:03,500\nHello there.\n",
"offsetMs": -1500
}and gets back:
result
Shifted 980 cues by -1.5s as SRT.
1
00:00:00,000 --> 00:00:02,000
Hello there.