Shift caption timing
shift_captionsMove all caption cues earlier or later by a fixed offset to correct timing that runs ahead of or behind the audio, with an option to adjust only cues from a set time onward.
Instructions
Move every cue earlier or later by a fixed offset — the fix for captions that are consistently ahead of or behind the audio. Optionally only shift cues from a given time onward (e.g. after an ad break or a cut).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"offset": "<offset>"
},
"name": "shift_captions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Only shift cues starting at or after this time, e.g. "00:12:30" or "750s". | |
| path | No | Local caption file (.srt, .vtt, .ass/.ssa, .json). ~ is expanded. | |
| format | No | Input format. Detected automatically when omitted. | |
| offset | Yes | Positive = later, negative = earlier. Number = milliseconds, or a string like "2.5s", "-1500ms", "-00:00:01,200". | |
| content | No | Caption text, if you don't have a file. | |
| overwrite | No | Allow replacing an existing file. | |
| output_path | No | Write the result here. Format follows the extension unless `to` is set. Omit to get the text back inline. | |
| output_format | No | Output format. Defaults to the input format (or the output_path extension). |