ForHosting KIT · Video

Shift SRT subtitle timing by milliseconds

Subtitle timing can be consistently early or late even when every individual cue is internally correct.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

This tool shifts a complete SRT file by one signed offset measured in milliseconds, making a precise global correction without rewriting captions or changing their order. Positive values move subtitles later; negative values move them earlier. Any shifted timestamp that would become negative is clamped to zero. The parser validates each numbered cue and reports malformed timestamps instead of quietly returning a damaged subtitle file.

Choose the offset from a reliable sync point

Start by finding a clear event near the beginning of the video, such as a door closing, a speaker beginning a sentence, or a title appearing. Compare that event with the matching subtitle cue and measure the difference in milliseconds. If the subtitle appears before the event, use a positive offset to move it later. If the subtitle appears after the event, use a negative offset to move it earlier. Apply the same check near the end of the program before committing to a global shift. When the difference stays constant, one offset is the right correction. When the difference grows over time, the problem is probably playback-rate drift or a frame-rate conversion, which a constant shift cannot repair. Submit the complete SRT text and the signed integer offset. The returned text retains cue numbering and caption lines while replacing every valid start and end timestamp with its shifted value. This makes the result easy to save as a new `.srt` file and compare with the original before it replaces anything in a production workflow.

Understand validation and zero clamping

Each SRT cue must contain a numeric index, a timing line, and at least one caption line. Timing values use the standard `hours:minutes:seconds,milliseconds` form, with two or more hour digits, two minute digits, two second digits, and exactly three millisecond digits. Minutes and seconds must be between zero and fifty-nine. The tool rejects a cue when its timing line does not follow that structure, when either timestamp is malformed, or when the original end precedes the original start. This strict behavior prevents a partial transformation that looks successful but leaves broken cues hidden inside the output. A negative offset is applied independently to both boundaries. If a result falls below zero, it becomes exactly `00:00:00,000`. Consequently, a cue that originally starts and ends before the magnitude of a large negative offset can collapse to a zero-length cue at the beginning. That is intentional clamping, not an arithmetic error. Review early cues after a large negative adjustment and remove or retime any that no longer have useful duration.

Use the shifted file safely in a subtitle workflow

Keep the original subtitle file and save the shifted result under a new name until it has been checked against the intended video. Test dialogue, music cues, and scene transitions at several points rather than relying on a single opening cue. The operation changes timestamps only: it does not translate text, renumber entries, correct spelling, infer missing cues, or compensate for timing drift. Line breaks inside caption text remain intact, so multi-line subtitles continue to display as authored. Input line endings are normalized in the result, and cue blocks are separated consistently, which is accepted by common SRT consumers. Because the algorithm is deterministic and uses no network, random values, or model calls, the same input and offset always produce the same output. You can run it interactively in the browser or automate it through the API for $0.002 per request. For batch jobs, record the offset beside the source video version: a subtitle correction derived for one edit may be wrong after an intro, advertisement, or distributor slate is inserted into another cut.

Correct a constant audio delay

Move all captions later when a muxing or playback setup makes subtitle cues appear ahead of the spoken audio.

Account for a removed intro

Move every cue earlier after a fixed-length leader, countdown, or title sequence is removed from the video.

Normalize a delivery file

Apply a measured editorial offset and receive consistently formatted SRT timing before packaging subtitles with a release.

Should I use a positive or negative offset?

Use a positive offset to make subtitles appear later and a negative offset to make them appear earlier.

What happens when a timestamp shifts below zero?

That individual start or end timestamp is clamped to `00:00:00,000`; it never becomes negative.

Does this fix subtitle drift?

No. A constant offset fixes a constant timing difference. A difference that grows through the video requires a rate or frame-timing correction.

Will caption text or numbering change?

No. Cue numbers and caption lines are retained; only timestamp lines are replaced, while line endings and block spacing are normalized.

What happens if one cue has an invalid timestamp?

The entire request fails with an invalid-input error identifying the affected entry, so no partially shifted file is returned.

How much does an API request cost?

The API price is $0.002 per request. The same deterministic operation is also available in the browser.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/video/subtitle-srt-shift

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/video/subtitle-srt-shift \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"srt":"1\n00:00:01,250 --> 00:00:03,500\nOpening line.\n\n2\n00:00:05,000 --> 00:00:07,250\nSecond line.","offset_ms":-1500}'
{
  "srt": "1\n00:00:01,250 --> 00:00:03,500\nOpening line.\n\n2\n00:00:05,000 --> 00:00:07,250\nSecond line.",
  "offset_ms": -1500
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "video.subtitle_srt_shift",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb500
max_minutes60
max_megapixels3.9
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →