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

ParameterTypeDescription
contentrequiredstringFull subtitle file contents as text (SRT, WebVTT, ASS/SSA, or the JSON produced by convert_subtitles).
filenameoptionalstringOriginal file name. The extension helps detect the format.
formatoptionalenumInput format. Detected from the file name or contents when omitted."srt" · "vtt" · "ass" · "ssa" · "json"
offsetMsrequiredintegerMilliseconds to shift by. Positive = later, negative = earlier.-86,400,000 to 86,400,000
outputFormatoptionalenumOutput 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.