Generate Video Subtitles
You can generate English subtitles (e.g., .srt
files) from MP4 videos using automatic speech recognition (ASR) tools.
OpenAI Whisper (Best Accuracy)
Of all the options, this is the one that I used for majority of my videos.
Whisper is an open-source ASR model by OpenAI, known for its accuracy and support for many languages.
-
Make sure Python 3.8+ and pip are available:
python3 --version
pip3 --versionIf not yet installed:
sudo apt update
sudo apt install python3 python3-pip -
Install Whisper and dependencies:
pip install openai-whisper
sudo apt install ffmpeg -
Generate subtitles:
whisper your_video.mp4 --language English --task transcribe --output_format srt
-
It will create
your_video.srt
in the same folder.
Note: It uses your CPU or GPU. Can be slow on large files without a GPU.
SubtitleEdit (GUI, Windows)
Subtitle Edit is a Windows app with built-in speech recognition using Whisper or Google APIs.
- Download Subtitle Edit: https://www.nikse.dk/subtitleedit/
- Open your MP4 video in the app.
- Go to
Video
>Audio to text (Whisper)
orGenerate Subtitles via Google
.
YouTube (Hacky but works)
If the video is not sensitive/private, upload it as unlisted to YouTube.
- Upload video as unlisted/private.
- Wait for auto-captions to generate.
- Download captions via YouTube Studio or use 3rd-party tools like DownSub.
Online Tools
There are websites that offer auto-captioning:
These often require a free account or have limits unless you subscribe.
(Optional) Transcribe All MP4s in a Folder
If you have multiple videos that you want to transcribe, you can use a script:
for f in *.mp4; do
whisper "$f" --language English --task transcribe --output_format srt
done