Subtitles & Scripts Runs Locally in Your Browser

Subtitle Timestamp Shifter & Drift Resync

Shift all .srt or .vtt subtitle cues forward or backward by milliseconds, or apply linear frame-rate drift scaling across a full timeline.

Interactive Workspace: Timestamp Sync 100% Local Browser Processing (Zero Server Upload)
Timestamps shifted.

Methodology, Formulas & Parameter Reference

Subtitle desynchronization falls into two mathematical categories: constant offset and linear clock drift. A constant offset occurs when a broadcast slate, studio bumper, or commercial break is trimmed or prepended to the video master, causing every caption cue from start to finish to appear a fixed number of milliseconds too early or too late. Shifting each cue start time \(t_{\text{start}}\) and end time \(t_{\text{end}}\) by an offset \(\Delta t\) resolves constant sync errors:

\[ t^{\prime} = \max(0, \; t \cdot k_{\text{scale}} + \Delta t) \]

Linear clock drift occurs when subtitles timed against a 23.976 fps (\(\frac{24000}{1001}\text{ fps}\)) master are paired with a 24.000 fps or 25.000 fps PAL transfer. Because a 23.976 fps timeline runs \(0.1\%\) slower than true 24.000 fps, subtitles that start in perfect sync at 00:00:00 drift behind by \(3.6\text{ seconds}\) after one hour of playback. Applying the linear scale factor \(k_{\text{scale}} = \frac{\text{FPS}_{\text{source}}}{\text{FPS}_{\text{target}}}\) together with the constant offset \(\Delta t\) recalculates every millisecond timestamp and clamps negative values at 00:00:00,000 so no cue becomes invalid.

Common Frame-Rate Drift Multipliers & 1-Hour Sync Drift
Timing Conversion Scale Factor (k) Drift After 10 Minutes Drift After 60 Minutes
No Drift (Constant Offset Only) 1.000000 0 ms 0 ms
23.976 fps -> 24.000 fps 0.999000 -600 ms (-0.6s) -3,600 ms (-3.6s)
24.000 fps -> 23.976 fps 1.001000 +600 ms (+0.6s) +3,600 ms (+3.6s)
25.000 fps (PAL) -> 23.976 fps 1.042709 +25,625 ms (+25.6s) +153,755 ms (+2m 33.8s)
23.976 fps -> 25.000 fps (PAL) 0.959040 -24,576 ms (-24.6s) -147,456 ms (-2m 27.5s)

Production Workflow Verification & Quality Control

Before committing a full batch transcode or publishing a final master, verify the generated parameters against a five-second test slice of your source timeline. In post-production pipelines, container metadata headers, variable frame rate (VFR) timebases from mobile or screen-capture recordings, and non-square pixel aspect ratios can alter how downstream players interpret stream flags. Running every calculation and file conversion locally in browser memory ensures your production assets remain private while providing deterministic numbers you can paste directly into terminal automation scripts, NLE export presets, or camera prep checklists.

Frequently Asked Questions

What happens if I apply a negative offset larger than the first subtitle timestamp?

Subtitle specifications forbid negative timestamps. Any cue timestamp that calculates below zero is safely clamped to 00:00:00,000 (or 00:00:00.000 in WebVTT) and flagged in the status summary.

How do I tell whether I have a constant offset or frame-rate drift?

Check the sync error at the first minute of dialogue and again near the end of the video. If both are off by the same amount (for example, 1.5 seconds late), use a constant offset of -1500 ms. If the start is in sync but the end is 3.6 seconds off after an hour, apply a frame-rate scale factor.

Does shifting timestamps alter multi-line text or speaker labels inside cues?

No. Only lines matching the timestamp arrow pattern (HH:MM:SS,mmm --> HH:MM:SS,mmm) are recalculated; all dialogue lines and styling remain untouched.