Why subtitles go out of sync
Subtitles lose sync with a video for three main reasons.
- A fixed delay. The subtitles come from a different release of the film, or the video has a different intro. Every line is early or late by the same amount.
- Drift that grows over the film. The subtitles match at the start but slip further apart as the film plays. The usual cause is a frame-rate mismatch, such as 25 fps against 23.976 fps. A different cut of the film can also cause it.
- One scene added or removed. The subtitles match up to a point and then jump out of sync. This needs editing by hand.
This tool fixes the first two causes.
How to use the tool
- Paste your subtitles, click Open file, or drop a file onto the editor.
- Choose a method in Adjust timing and fill in its fields.
- Pick a format in Save as, and turn on any clean-up options you want.
- Read the result and the summary below it. Click Download to save the file, or Copy to copy the text.
The tool reads and changes your file in your browser. Nothing is uploaded.
The three ways to fix timing
Shift everything
Use this when every line is off by the same amount. Enter the amount in Shift by (seconds).
- A positive number makes subtitles appear later.
- A negative number makes them appear earlier.
- You can type seconds, such as
2.5or-1.2, or a time, such as00:01:02,500.
If a shift pushes a subtitle entirely before 00:00:00, the tool removes it.
Fix drift (two points)
Use this when the offset grows over the film. Watch the video and note when the first line and the last line are actually spoken. Enter those times in First subtitle at and Last subtitle at.
The placeholder in each field shows the subtitle’s current time. Leave a field empty to keep that time as it is.
The tool then stretches every time between the two points in a straight line:
new = firstAt + (old − firstOld) × (lastAt − firstAt) / (lastOld − firstOld)
Here old is a subtitle’s current time, firstOld and lastOld are the current start times of the first and last subtitles, and firstAt and lastAt are the times you entered.
Change frame rate
Use this when the subtitles were timed for one frame rate and your video runs at another. Choose the first rate in Subtitles were made for and the second in Your video runs at.
The most common case is 25 → 23.976, the gap between PAL and film releases. The tool multiplies every time by the first rate divided by the second. For 25 → 23.976, a subtitle 90 minutes into a film moves about 3.8 minutes later.
SRT and WebVTT
The tool reads SRT and WebVTT files, and can save either one.
This is an SRT file with two cues:
1
00:00:01,000 --> 00:00:03,500
Where are you going?
2
00:00:04,000 --> 00:00:06,000
Home.
This is the same in WebVTT:
WEBVTT
00:00:01.000 --> 00:00:03.500 align:start
Where are you going?
00:00:04.000 --> 00:00:06.000
Home.
The formats differ in a few ways:
- A WebVTT file starts with the line
WEBVTT. An SRT file does not. - WebVTT puts a dot before the milliseconds. SRT uses a comma.
- WebVTT cues do not need numbers. SRT cues are numbered.
- WebVTT can hold cue settings such as
align:start, andSTYLEblocks. SRT cannot.
When you convert WebVTT to SRT, the tool drops the cue settings, the STYLE blocks and the cue names. It always numbers SRT cues from 1, which also fixes files with broken numbering.
A blank line inside a cue’s text would end the cue early, so the tool removes it.
Character sets and non-Latin scripts
The tool always saves files as UTF-8.
With Character set on “Detect automatically”, the tool first looks for a byte order mark (BOM). If there is none, it tries UTF-8. If that fails, it falls back to Windows-1252, the most common older encoding for subtitles.
If letters look wrong, for example é instead of é, the guess was wrong. Choose the right option in Character set and the tool reads the file again.
Sinhala, Tamil, Arabic and Chinese subtitles work when the file is UTF-8 or UTF-16. Old Sinhala subtitles made with legacy fonts such as FM Abhaya are different: they store Latin letters, and the font draws them as Sinhala. Run those files through a Unicode converter first.
Some older TVs and media players show garbled text even when the file is valid UTF-8. Turn on Add UTF-8 BOM (for older TVs) to help them recognise the encoding.
Cleaning up
Remove formatting tags strips:
<i>,<b>and<font color="…">tags{\an8}positioning codes
Remove hearing-impaired notes strips:
- sound notes such as
[MUSIC]and(laughs) - lyrics between ♪ signs
- speaker labels in capitals at the start of a line, such as
JOHN:
If a subtitle has no text left after cleaning, the tool removes it. The summary says how many were removed.
Doing it on the command line
ffmpeg can convert between subtitle formats. It picks the output format from the file extension:
ffmpeg -i subs.srt subs.vtt
For heavier editing, such as fixing one scene by hand, try Subtitle Edit. It is free and open source.