rockbenben

subtitle-translator: Batch-Translate Subtitle Files

A browser-based tool and CLI for translating batches of subtitle files while preserving their timing and structure. Useful for subtitle editors and localization workflows that need multiple languages, formats, or translation providers.

View on GitHub Compare
Stars
1.1k
Forks
156
Stars, last 30 days
+33

Our take

Health score

45/100

How it is scored
Activity
65
Community
22
Issues
56
Pull requests
35

+33 stars in the last 30 days

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

1,199

Forks

173

Change since Nov 13, 2026: +1 stars·0 forks

Overview

Subtitle Translator batch-translates .srt, .ass, .vtt, and .lrc files through traditional machine-translation services or LLM providers. It separates dialogue from timing and file structure before sending text for translation, then restores the original structure in the output.

It is aimed at people translating many subtitle files, such as a full season, as well as users who want bilingual output or a scriptable workflow. The web app runs in the browser, and a CLI uses the same translation engine for headless runs.

Key Features

  • Batch-process multiple subtitle files and translate to several target languages in one pass.
  • Supports SRT, ASS, VTT, and LRC, with options for bilingual output and format conversion.
  • Connects to traditional translation APIs and LLM providers, including custom OpenAI-compatible endpoints.
  • Preserves timecodes and cue structure by extracting dialogue locally before translation.
  • Offers context-aware translation for LLMs and local caching for translated text.
  • Provides a CLI for scripted translation, with resumable runs and settings exported from the web app.
  • Keeps subtitle parsing and API-key storage in the browser; requests go to the selected translation endpoint.

Use Cases

  • Subtitle editors can translate a season of episodes without manually processing each file.
  • Fansub and localization teams can produce bilingual subtitles or exports in multiple languages.
  • Video creators can translate SRT or VTT captions while retaining the original timing.
  • Developers can script repeatable translation jobs with the CLI or connect a local model endpoint.

Getting Started

Try the web app, or run the project locally:

yarn install
yarn dev

See the repository README for CLI usage, provider setup, and deployment details.

Considerations

  • Translation quality and cost depend on the selected service; LLM usage may incur token charges, while free services can be rate-limited.
  • Some providers require API keys or relay configuration. Requests are made to the configured provider, so browser-based use depends on that endpoint being accessible.
  • Local development and the CLI require Node.js 24 or later, according to the README.

Found this useful?

Share it with someone who would like subtitle-translator.

Comparisons