AiSrt: translate, extract and transcribe your subtitles with AI
AiSrt: translate, extract and transcribe your subtitles with AI
Subtitles in your language for any video, with a single command.
A film with English subtitles, a conference without a single subtitle, a Blu-ray whose subtitles are images, an entire season to process in one go: you give the video to AiSrt, it takes care of the rest. It finds the track that's there, translates it with AI, reads image subtitles, or listens to the audio if there's nothing at all.
I wrote this tool first and foremost for accessibility: a deaf or hard-of-hearing person shouldn't have to wait for a publisher to deign to subtitle a video. With AiSrt, it takes a few minutes.
Free and open sourceWindows, Linux and macOSMore than 15 AI services100% local possibleAll languages
aisrt "film.mkv"That's it. This line gives you a subtitle in your default language, whatever the video.
The tool
What AiSrt is for
Four jobs in a single little program, and AiSrt chooses on its own which one your video needs.
1
Translate
A subtitle file, a folder or an entire series, into one or several languages all at once. The AI model translates lines, not words: the humor and expressions come through.
2
Extract
Subtitles already present in a video (MKV, MP4...) are extracted into .srt or .ass files. If they're already in your language, AiSrt stops there.
3
Read Blu-rays
On a Blu-ray, subtitles are images. AiSrt reads them using character recognition or a vision model, then translates them.
4
Transcribe
No subtitles at all? AiSrt listens to the audio with Whisper, detects the spoken language, writes the subtitles and translates them.
A translation in progress: each batch is sent to the chosen service, the bar shows the remaining time.
Why you’ll love it
The AI service of your choice
OpenAI, Claude, Gemini, Grok, Mistral, DeepSeek, OpenRouter and many others. Or for free, on your own machine, with Ollama or LM Studio.
A whole season in one go
Give it a folder: each episode is processed, anything already translated is skipped, and a summary is waiting for you at the end. It can even monitor a NAS folder.
Names that don’t change
A small glossary, and the hero’s nickname stays the same from the first episode to the last.
Readable subtitles
Lines that scroll too fast to be read are spotted, and shortened if you want.
No nasty surprises
Estimated cost before you pay, key and service checked before starting, automatic resumption if you stop it along the way.
Ready for Plex and Jellyfin
Files named according to the language, .ass styles preserved, and a copy of the video with its new tracks if you ask for it.
Installation
Ready in three steps
Download
Choose your system’s archive with the download buttons at the bottom of this page:
- Windows:
win-x64for a standard PC,win-arm64for a Snapdragon PC - Linux:
linux-x64, orlinux-arm64for a 64-bit Raspberry Pi - macOS:
osx-arm64for an Apple Silicon Mac,osx-x64for an Intel Mac
Install
Unzip the archive and run the script it contains. It makes aisrt available in all your terminals.
# Windows (PowerShell)
.\install.ps1
# Linux et macOS
sudo ./install.shNo runtime to install, and the macOS versions are signed by Apple.
Configure
aisrt setupThe assistant asks for the AI service, your key and your language, checks that everything responds, then saves. Your settings survive updates.
No key yet? At OpenAI, it takes two minutes: create an account, add a few dollars of credit, create a key on the API keys page and paste it when aisrt setup asks for it. A full movie costs a few cents. And if you don't want to pay anything at all, Ollama runs the AI on your machine, with no account or key.
First steps
# Une vidéo : sous-titres dans votre langue par défaut
aisrt "film.mkv"
# Plusieurs langues, et une copie de la vidéo qui les embarque
aisrt "film.mkv" -t fr,es,pt-BR --mux
# Un fichier de sous-titres : la langue source est détectée toute seule
aisrt "film.srt" -t de
# Une série entière, sous-dossiers compris
aisrt "D:\Series\The Wire" -r -t fr
# Surveiller un dossier et traduire tout ce qui y arrive
aisrt "/media/incoming" --watch -t frWhat you need
| For | You need |
|---|---|
| Translate | a key from an online service, or a free local server (Ollama, LM Studio, llama.cpp, vLLM) |
| Read a video | ffmpeg, downloaded automatically on Windows and Linux ; brew install ffmpeg on Mac |
| Transcribe the audio | whisper.cpp, downloaded automatically on Windows x64 and Linux ; brew install whisper-cpp on Mac |
| Read a Blu-ray subtitle | Tesseract, which you install yourself, or a vision model (nothing to install) |
Extraction and transcription require neither an account nor a key, and send nothing anywhere.
Going further
The technical side
Everything that follows is optional: the default settings are suitable for most uses. This is where I explain how AiSrt works and how to adapt it to your needs.
How AiSrt chooses its path
When faced with a video, AiSrt always takes the least expensive path:
- a track already exists in the requested language: it extracts it, nothing more ;
- a text track exists in another language: it extracts and translates it (the language from
-sfirst, then English, then the others) ; - there is only an image track: it reads it with OCR, then translates it ;
- there are no subtitles: it transcribes the audio, then translates it.
--extract and --transcribe force a specific path. The source language is inferred from the name (film.en.srt), the track label, Whisper, or the model taking a glance at the text: -s only serves to force it.
Translation services
AiSrt talks directly to Anthropic (Claude), Google (Gemini), xAI (Grok), OpenAI and Ollama, as well as everyone who speaks the same language as OpenAI: Mistral, DeepSeek, Groq, OpenRouter, Together, Fireworks, Cerebras, Azure OpenAI, LM Studio, llama.cpp and vLLM.
| Name to give | Service | Default model |
|---|---|---|
openai | OpenAI | gpt-5-mini |
anthropic | Anthropic Claude | claude-haiku-4-5 |
gemini | Google Gemini | gemini-3.6-flash |
xai | xAI Grok | grok-4.5 |
mistral | Mistral | mistral-small-latest |
openrouter | OpenRouter | openrouter/auto |
deepseek, groq, together, fireworks, cerebras | other compatible services | chosen from the service list |
ollama, lmstudio, llamacpp, vllm | local, free servers | the loaded model |
For services whose catalog changes every month, I deliberately don't lock in any model: AiSrt reads the service's list, lets you choose and keeps your choice. aisrt --providers tells you which ones are ready.
aisrt "film.srt" -t fr -p mistral # pour cette commande seulement
aisrt config set provider mistral # pour toutes les suivantesBefore a paid translation, AiSrt estimates the cost and asks for confirmation above 0.50 dollar (adjustable). At the end, it displays the tokens (the units of text charged by the service) actually consumed.
Locally with Ollama
ollama pull gpt-oss:20b
aisrt "film.srt" -t fr -p ollamaI tested several models, three times each. gpt-oss:20b, the one I ship by default, never lost a single block, but it weighs about 14 GB and takes its time. llama3.1:8b goes about ten times faster for an almost equally clean result. qwen2.5, for its part, slipped comments in Chinese into the middle of the subtitles, three times out of three: avoid it. Locally, it's free but slower, and the quality remains a notch below the best online services.
Glossary and reading speed
# aisrt-glossary.txt, dans le dossier de la série
Walter White
Heisenberg
the Cousins = les CousinsA term on its own is kept as is, a term followed by = is always translated the same way. The file is found automatically in the episode, season or series folder, and only the terms present in each batch are sent.
A translation is often longer than the original. After each file, AiSrt counts the subtitles displayed for too little time for their length (above 20 characters per second; Netflix aims for 17). With --condense, the model shortens them, and any rewrite that would not be shorter is thrown out. All the texts sent to the model can be modified in the configuration.
Formats and files produced
- a
.srtgives a.srt, an.assgives an.asswith its styles (--to-srtfor a simple.srt) ; .vtt,.sub,.sbv,.smiand.ttmlare converted with ffmpeg ;- the files are named according to the language (
film.fr.srt,film.pt-BR.srt), as Plex and Jellyfin expect ; --muxwritesfilm.aisrt.mkv, a copy of the video with the new tracks labelled ;- an existing file is always backed up as
.bak.srtbefore being replaced, and an interrupted translation resumes where it left off.
Blu-ray subtitles
The PGS tracks on Blu-rays store a picture of the words, not the words. Two engines can read them:
Tesseract (by default, local and free), an optical character recognition (OCR) program, it reads the text in an image. It's the only dependency AiSrt doesn't download, because it installs differently on every system:
winget install tesseract-ocr.tesseract # Windows
sudo apt install tesseract-ocr # Linux
brew install tesseract # macOS
The recognized text is then reread by your AI service, with a strict instruction: correct reading errors (a slash instead of an I, an "rn" read as an "m"), without translating or rephrasing anything. Out of 100 test subtitles, 14 were corrected and none were moved. I prefer a visible typo to a perfect line stuck in the wrong place, so any doubtful answer keeps the raw text.
A vision model reads the images directly, much better with stylized fonts, without installing anything:
aisrt config set ocr-engine visionA feature-length film contains about a thousand images: AiSrt announces the number of requests before starting, and rereads frame by frame any response that does not return exactly one text per image. Fades, where the disc displays the same image with a different transparency, no longer cut a line into pieces: AiSrt keeps the most readable rendering.
The transcription
When a video has no subtitles, AiSrt uses whisper.cpp, the optimized version of OpenAI's Whisper speech recognition model. The spoken language is detected, and under Windows an NVIDIA card is used when one is present.
aisrt --transcribe "conference.mp4" -tt fr # transcrire, puis traduire en français| Model | Size | Languages |
|---|---|---|
base, small, medium | 150 MB, 500 MB, 1.5 GB | all |
large-v3 | 3 GB | all, best accuracy |
base.en, small.en, medium.en | 150 MB, 500 MB, 1.5 GB | English only |
When faced with French audio, the .en models do not crash: they invent very confidently worded English text. AiSrt therefore rejects this combination. Only speech is transcribed, music and noises produce no subtitles.
Checks before sending
Before the first paid call, AiSrt checks that the service responds: invalid key, account without credit, unknown model, local server turned off. Each case has its message and the setting to correct. It also checks the nature of each file: nothing binary is sent to the translation service.
Automate
aisrt "film.mkv" -t fr --non-interactive
aisrt --extract "episode.mkv" --stream 2 --translate-to fr,es --non-interactiveWith --non-interactive, each question uses its default value and the log says which one. An explicitly given value is never ignored: asking for track 7 of a file that only has two stops everything and lists the available tracks. Exit codes: 0 success (including nothing to do), 1 at least one file failed, 2 cancellation by Ctrl+C.
| Option | Role |
|---|---|
-t, --target | target language(s), separated by commas |
-s, --source | source language, detected if absent |
-p, --provider | translation service for this command |
-r, --recursive | includes subfolders |
-w, --watch | watches the folder and processes new files |
--mux | adds the subtitles to a copy of the video |
-g, --glossary | glossary to use |
--condense | shortens subtitles that are too fast to read |
--to-srt | an .ass as input, a simple .srt as output |
-st, --streams | lists the subtitle tracks of a video |
-ex, --extract | extracts the tracks from a video |
-tr, --transcribe | transcribes the audio with Whisper |
--stream | track to use (index, or all) |
-tt, --translate-to | translates the result of an extraction or a transcription |
-m, --model | Whisper model |
-al, --audio-language | spoken language, to force it |
-y, --yes | accepts the cost estimate |
-ni, --non-interactive | never asks a question |
-l, --languages | lists the languages |
--providers | lists the services and their status |
Configuration
aisrt config list # les réglages en vigueur, clés masquées
aisrt config set target pt-BR # langue par défaut
aisrt config set Translation:ConfirmCostAbove 2
aisrt config path # où chaque réglage est luThe settings live in your user folder (%APPDATA%\AiSrt on Windows, ~/.config/aisrt elsewhere). A key can also come from an environment variable under the service's usual name (OPENAI_API_KEY, MISTRAL_API_KEY...), and every configuration key can be overridden with a variable prefixed AISRT_, handy in a container.
What does not work yet
Image subtitles from DVDs and DTT are not decoded: they are read using information stored elsewhere in the file, that is another project. AiSrt detects them and warns you instead of silently ignoring them.
Who is it for?
Deaf and hard-of-hearing people, first of all. But also content creators who want to reach an audience beyond their language, teachers whose online courses deserve better than approximate subtitling, translators who want a first draft in a few minutes, organisations that distribute videos internationally, and movie buffs who have a shelf of Blu-rays in their original version.
AiSrt is free. Download the archive for your system at the bottom of this page, launch aisrt setup, and give it your first video.

Join the conversation
You need an account to comment on this article. Creating one is free and takes under a minute.
No comments yet.