How the Subtitle Editor Works
AnyTool edits subtitles entirely on the main thread — no ffmpeg is needed for the editing itself. It parses SRT or VTT into cues and syncs them to a native HTMLVideoElement by listening to the timeupdate event, drawing the active cue in a styled caption overlay so you preview exactly what plays. Timing fixes are plain math: shift every cue by an offset or scale timings to fix drift. Edited SRT/VTT is exported instantly as a blob. An optional burn step renders the captions into the picture using the self-hosted ffmpeg libass subtitles filter (no CDN) with a bundled font. Single-threaded ffmpeg is deliberate: the multi-threaded core needs SharedArrayBuffer + cross-origin isolation (COOP/COEP), which would block cross-origin ad iframes.
- Runs client-side — the video and captions are never uploaded
- Pure main-thread editing — no ffmpeg for the edit itself
- Parses SRT/VTT; syncs cues to HTMLVideoElement via timeupdate
- Styled caption overlay preview; shift / scale timings as plain math
- Instant SRT/VTT export
- Optional burn via self-hosted ffmpeg libass subtitles filter + bundled font (no CDN)
