AI Subtitle Translator: Open-Source Pipeline for Any Video
An AI subtitle translator generates translated SRT files automatically. WhisperX transcribes, an LLM translates, and a script aligns timing.
💡 What You Will Learn
An AI subtitle translator generates translated SRT files automatically. WhisperX transcribes, an LLM translates, and a script aligns timing.
Subtitles are the fastest way to make content reach a new language - and the open-source pipeline now produces them automatically with timing preserved.
The Pipeline
whisperX (23,466 stars) transcribes the audio and outputs word-level timestamps, so the SRT timing is already there. An LLM translates each subtitle line - DeepSeek-V3 (104,114 stars) or a local model via Ollama (177,874 stars). The final script rewrites the SRT with translated text and original timings. ffmpeg (63,025 stars) burns the subtitles in or muxes them as a track.
Quality Tips
Translate line-by-line, not as one block - models keep timing and context better. Keep names and numbers verbatim: instruct the model to copy them unchanged. For slang-heavy content, add a glossary to the prompt.
FAQ
Q: Does timing break during translation?
A: Not if you keep the original timestamps and only replace text - that is the whole trick.
Q: Can it handle burning subtitles into video?
A: Yes - ffmpeg subtitles filter renders them directly; no re-encoding quality loss beyond the required pass.
