Open source
multilingual-subtitles
Subtitles in twenty languages, from one video file, in one command.
A local command-line tool. It extracts the audio, transcribes it with a timestamp on every word, builds a valid SRT, then translates that SRT into every language you name. The timecodes are never retyped, in any language.
- Role
- Author
- Year
- 2026
- Stack
- Node with no npm dependencies, ffmpeg, Mistral, AI Glot CLI
- Visit
- Source code
Transcribing is the half that's already solved
A dozen tools turn a video into one subtitle file. What stops most channels at one language is the other half: twenty languages is a day of retyping, so nobody does it. That's the half this tool is built for, and it's why the name says multilingual rather than transcription.
Words, not segments
The same Mistral endpoint returns whole segments or individual words, at the same price. A segment can be seven seconds of speech in one block, which is a sentence and not a subtitle: turning it into cues means guessing where inside those seven seconds each phrase was said, and the guess drifts. With word timings the cue builder groups on what reads well, and every cue still starts exactly on the word it shows.
Why an agent shouldn't translate the SRT
For one language, let it. For twenty it's the wrong tool three times over: the model retypes every timecode and eventually mistypes one, the whole file crosses the context window once per language, and you pay generation prices for a mechanical job. AI Glot reads SRT natively, keeps the numbering and the timecodes byte for byte, and costs one credit per three words.
What the rerun costs
Nothing you already paid for. A manifest holds the batch id and status per language, so a language already on disk is skipped and a batch that was created but never downloaded is resumed instead of bought twice. One language failing doesn't stop the others.
One command, and the timecodes are never retyped
The pipeline is five steps, and only the third one is worth having an opinion about.
npm run subs -- run ~/Downloads/clip.mp4 --to fr,de,ja- 1Extract the audioffmpeg, mono 16 kHz
- 2TranscribeEvery word gets a start and an end
- 3Build the cuesWhere the subtitle quality is decided
- 4Validate the SRTBefore anything is paid for
- 5TranslateOne batch per language, four at a time
Step three is lib/cues.mjs, and it is the whole file that makes the difference between a transcript and a subtitle. It breaks on sentence ends and on pauses over 0.6 seconds, holds each cue 1.2 seconds minimum without ever biting into the next one, and caps a cue at two lines of 42 characters and six seconds.
An agent doing itOne language at a time
- Retypes every timecode, and eventually mistypes one
- The whole file crosses the context window, once per language
- Generation prices for a mechanical job
- Nothing to resume if it stops halfway
A batch translatorTwenty at a time
- Numbering and timecodes kept byte for byte
- Four batches in flight, none of it through a model context
- One credit per three words
- A manifest, so a rerun pays for nothing twice
50languages, ordered by YouTube audience
34credits per language on a 101 word clip
0npm dependencies