Paying per minute for subtitles makes no sense when you can make them on your own PC for free. OpenAI’s Whisper turns speech into accurate, timed captions in almost 100 languages, and it can write the SRT or VTT file that YouTube, Premiere, DaVinci Resolve, VLC and every other video tool understands.
This guide is all about subtitles.
You will learn how to create SRT and VTT files with Whisper, keep lines short enough to read, translate foreign speech into English captions, add speaker labels, and either attach the subtitles to your video or burn them in permanently with FFmpeg.
We also compare the four best Whisper tools so you can pick the fastest one for your hardware.
Commands and flags below are checked against the official openai/whisper, faster-whisper, WhisperX and whisper.cpp repositories in November 2026.
- Install:
pip install -U openai-whisperplus FFmpeg. - Make an SRT:
whisper video.mp4 --model turbo --output_format srt - Readable lines: add
--word_timestamps True --max_line_width 42 --max_line_count 2 - English captions from foreign speech: use
--model medium --task translate. The turbo model does not translate. - Faster: WhisperX or faster-whisper on an NVIDIA GPU. No GPU or Mac: whisper.cpp with
-osrt. - Burn in:
ffmpeg -i video.mp4 -vf subtitles=video.srt out.mp4. Soft subs: upload the SRT to YouTube instead.
Which Whisper Tool Should You Use?
| Tool | Best for | Subtitle output | Notes |
|---|---|---|---|
| openai-whisper | Simplest setup, any OS | srt, vtt, txt, tsv, json | The original. Good line control with word timestamps. |
| faster-whisper | Speed on NVIDIA GPUs and CPUs | Python code (write your own SRT) | CTranslate2 engine. Very fast, lower memory. |
| WhisperX | Precise word timing and speaker labels | srt, vtt, txt, tsv, json | Built on faster-whisper with forced alignment and diarization. |
| whisper.cpp | Macs, CPUs, laptops, no Python | srt, vtt, txt and more | C/C++ port. Runs well on Apple Silicon. |
If you just want subtitles today, start with openai-whisper. If you have long videos or many files, WhisperX is worth the extra setup. For general transcription (meetings, notes, dictation) see our broader guide to running Whisper locally. Prefer a paid cloud service with no setup? Compare it with our ElevenLabs Scribe v3 guide.
Install Whisper and FFmpeg
- Install Python 3.9 to 3.11 (3.10 is a safe choice).
- Install FFmpeg. Whisper uses it to read audio and video.
- Windows:
winget install ffmpeg,choco install ffmpegorscoop install ffmpeg - Mac:
brew install ffmpeg - Ubuntu or Debian:
sudo apt update && sudo apt install ffmpeg
- Windows:
- Create a virtual environment (recommended):
python -m venv whisper-env, then activate it. - NVIDIA GPU? Install a CUDA build of PyTorch first from the PyTorch website so Whisper does not fall back to the CPU.
- Install Whisper:
pip install -U openai-whisper - Check it works:
whisper --help
If pip fails on tiktoken, the official README says to install Rust, or run pip install setuptools-rust and try again.
Create an SRT File in One Command
Whisper reads video files directly, so there is no need to extract the audio first:
whisper myvideo.mp4 --model turbo --language English --output_format srt --output_dir subs
This creates subs/myvideo.srt. Here is what each part does:
| Flag | What it does |
|---|---|
--model turbo |
Uses the fast large-v3 turbo model (the default) |
--language English |
Skips language detection and avoids wrong-language guesses |
--output_format srt |
Writes only the SRT. Choices: txt, vtt, srt, tsv, json, jsonl, all (default) |
--output_dir subs |
Saves files to a folder instead of the current one |
Need WebVTT for a website player? Use --output_format vtt. You can pass several files at once: whisper ep1.mp4 ep2.mp4 ep3.mp4 --output_format srt.
Make Subtitles Easy to Read
By default Whisper writes one subtitle per speech segment, which can be a long block of text on screen for several seconds. Turn on word timestamps and set line limits to get proper captions:
whisper myvideo.mp4 --model turbo --output_format srt --word_timestamps True --max_line_width 42 --max_line_count 2
| Flag | Good value | Effect |
|---|---|---|
--word_timestamps True |
Required | Times each word. The line options below need it. |
--max_line_width |
42 for landscape, 20 to 25 for Shorts and Reels | Maximum characters per line |
--max_line_count |
2 (or 1 for vertical video) | Maximum lines per subtitle |
--max_words_per_line |
3 to 5 for punchy short-form captions | Words per subtitle (no effect if max_line_width is set) |
--highlight_words True |
Optional | Underlines each word as it is spoken in SRT and VTT (karaoke style) |
About 42 characters and two lines is the common broadcast guideline for landscape video. For vertical Shorts, a few big words at a time reads better on a phone.
Pick the Right Model
| Model | VRAM | Speed (vs large) | Use it for |
|---|---|---|---|
| tiny / tiny.en | ~1 GB | ~10x | Quick drafts, very weak PCs |
| base / base.en | ~1 GB | ~7x | Clear English speech on a CPU |
| small / small.en | ~2 GB | ~4x | Good balance on older GPUs |
| medium / medium.en | ~5 GB | ~2x | Accents, translation to English |
| large | ~10 GB | 1x | Best accuracy, hard audio, many languages |
| turbo | ~6 GB | ~8x | Best default for transcribing in the original language |
Figures are from the official Whisper README. The .en models are English only and tend to be more accurate for English at small sizes.
Translate Foreign Speech to English Subtitles
Whisper can listen to Hindi, Japanese, Spanish or many other languages and write English subtitles directly:
whisper interview.mp4 --model medium --language Hindi --task translate --output_format srt
- Do not use turbo for this. The official README notes that turbo is not trained for translation and returns the original language even with
--task translate. Use medium or large. - Whisper only translates into English. For English to other languages, create the English SRT first, then translate the text with a local LLM or a translation tool, keeping the timestamps unchanged.
- For subtitles in the original language (for example Hindi captions for a Hindi video), use
--task transcribe(the default) with--language Hindi.
Faster Subtitles: WhisperX, faster-whisper and whisper.cpp
WhisperX (best timing)
- Install:
pip install whisperx - Run:
whisperx myvideo.mp4 --model large-v2 --output_format srt --max_line_width 42 --max_line_count 2 - Add
--language ento skip detection and--compute_type int8if you are short on VRAM.
WhisperX aligns every word with a separate alignment model, so subtitles appear exactly when words are spoken. Its README quotes about 70x real time with large-v2 on a GPU.
faster-whisper (fastest in Python)
faster-whisper has no SRT writer of its own, but a few lines of Python do the job:
from faster_whisper import WhisperModel
def ts(t):
h, r = divmod(t, 3600); m, s = divmod(r, 60)
return f"{int(h):02}:{int(m):02}:{int(s):02},{int((s % 1) * 1000):03}"
model = WhisperModel("turbo", device="cuda", compute_type="float16")
segments, info = model.transcribe("myvideo.mp4", vad_filter=True)
with open("myvideo.srt", "w", encoding="utf-8") as f:
for i, seg in enumerate(segments, 1):
f.write(f"{i}\n{ts(seg.start)} --> {ts(seg.end)}\n{seg.text.strip()}\n\n")
Use device="cpu", compute_type="int8" without a GPU. Current faster-whisper builds need CUDA 12 and cuDNN 9 for GPU use; the README lists pip install nvidia-cublas-cu12 nvidia-cudnn-cu12==9.* as one way to get them on Linux.
whisper.cpp (Mac and CPU)
- Build it:
git clone https://github.com/ggml-org/whisper.cpp, thencmake -B buildandcmake --build build --config Release. - Download a model:
sh ./models/download-ggml-model.sh large-v3-turbo(use the.cmdscript on Windows). - Convert your audio to 16 kHz WAV:
ffmpeg -i myvideo.mp4 -ar 16000 -ac 1 -c:a pcm_s16le audio.wav - Make the SRT:
./build/bin/whisper-cli -m models/ggml-large-v3-turbo.bin -f audio.wav -osrt -ml 42 -sow
-osrt writes an SRT (-ovtt for VTT), -ml sets the maximum line length and -sow splits on whole words instead of mid-word.
Add Speaker Labels
For interviews and podcasts, WhisperX can tag who is speaking:
- Create a free read token at Hugging Face (Settings > Access Tokens).
- Accept the user agreement on the
pyannote/speaker-diarization-community-1model page. - Run:
whisperx podcast.mp3 --model large-v2 --diarize --hf_token YOUR_TOKEN --output_format srt - Add
--min_speakers 2 --max_speakers 2if you know how many people talk.
Lines are labelled SPEAKER_00, SPEAKER_01 and so on. Find and replace them with real names in any text editor. The WhisperX README itself notes that diarization is “far from perfect”, so check overlapping speech by hand.
Add the Subtitles to Your Video
| Method | Viewer can turn off? | How |
|---|---|---|
| Upload to YouTube | Yes | YouTube Studio > Subtitles > Add language > Upload file > With timing > pick the SRT |
| Soft subtitles in MP4 | Yes | ffmpeg -i video.mp4 -i video.srt -c copy -c:s mov_text out.mp4 |
| Soft subtitles in MKV | Yes | ffmpeg -i video.mp4 -i video.srt -c copy out.mkv |
| Burned in (hard subs) | No | ffmpeg -i video.mp4 -vf subtitles=video.srt -c:a copy out.mp4 |
| Video editor | Your choice | Import the SRT into Premiere Pro, DaVinci Resolve, CapCut and style it there |
Burned-in captions are best for Shorts, Reels and TikTok, where many people watch with the sound off. To style them, add force_style, for example -vf "subtitles=video.srt:force_style='FontName=Arial,FontSize=22,Outline=2'". On Windows, use a path without a drive letter or escape the colon, because FFmpeg treats : as a separator in filters.
Uploading captions to YouTube also helps your video get found, because YouTube can read the text. Need a voiceover as well? Our Kokoro TTS local guide makes natural narration for free on the same PC.
Get More Accurate Captions
- Set the language with
--language. Auto-detection guesses from the first 30 seconds and can pick the wrong one if there is music. - Prime names and jargon with
--initial_prompt "Freakyjolly, ComfyUI, Ollama, RTX 5080"so spellings come out right. - Use a bigger model for accents, noise or technical speech.
- Clean the audio first. Removing background music with a vocal separator helps a lot.
- Stop hallucinated lines in long silences: use a VAD (WhisperX and faster-whisper have it built in), or
--hallucination_silence_threshold 2with word timestamps in openai-whisper. - Stuck repeating the same sentence? Add
--condition_on_previous_text False. - Always proofread before publishing. Open the SRT in Subtitle Edit or Aegisub to fix words and timing quickly.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| “ffmpeg not found” | FFmpeg missing or not on PATH | Install FFmpeg and open a new terminal |
| Very slow, “FP16 is not supported on CPU” | Running on the CPU | Install a CUDA PyTorch build, or use faster-whisper or whisper.cpp |
| Translation stays in the original language | Using turbo | Use --model medium or large with --task translate |
| max_line_width has no effect | Word timestamps off | Add --word_timestamps True |
| Subtitles drift out of sync | Variable frame rate video or long silences | Use WhisperX alignment, or shift timing in Subtitle Edit |
| Same line repeated many times | Whisper stuck in a loop | --condition_on_previous_text False and a VAD |
| faster-whisper: cuDNN or cuBLAS DLL errors | Wrong CUDA libraries | Install CUDA 12 cuBLAS and cuDNN 9, or use the CPU |
| whisper.cpp gives garbage | Input not 16 kHz WAV | Convert with the FFmpeg command above |
| Burned subtitles fail on Windows | Colon in the path breaks the filter | Run FFmpeg from the video’s folder and use only the file name |
FAQ
Is Whisper free for subtitles?
Yes. Whisper is open source under the MIT licence and runs offline on your own computer at no cost.
SRT or VTT: which should I use?
SRT for YouTube, video editors and media players. VTT for HTML5 web players. Whisper can write both at once with --output_format all.
Can Whisper make Hindi subtitles?
Yes. Use --language Hindi. Accuracy is better with medium, large or turbo than with the small models.
How long does it take?
On a modern NVIDIA GPU, turbo or WhisperX can caption an hour of audio in a few minutes. On a CPU it can take as long as the video or longer with the bigger models.
Can I edit the subtitle file?
Yes. SRT is plain text. Open it in Notepad, VS Code, Subtitle Edit or Aegisub.
Does Whisper add punctuation and capital letters?
Yes. Whisper writes punctuated, capitalised text, which is one reason its captions read better than many auto-caption tools.
Can I caption a YouTube video I do not own?
Only caption videos you own or have permission to use. For your own uploads, captioning locally and uploading the SRT is the cleanest route.




