Local generation of subtitles for your TV Shows and Movies

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrew Davie

I found out that subtitle generation can be done for free and at reasonable quality on your local machine. I use subtitles all the time because I'm quite "hard of hearing" these days.  So when a show comes along I sometimes just don't watch it becuase the audio is not quite "comfortably legible" for me.

The attached script does it all -- MacOS, but you can delve into it if you're unfortunate enough to be using Windows and I'm sure you'll be able to make it work there, too. Or Linux.

# Usage:
#   ./make_subtitles.sh [--model MODEL] [--force] video1.mkv [video2.mkv ...]
#
# Supports batch/glob usage, e.g.:
#   ./make_subtitles.sh "/path/to/Season 1/"*.mkv
#
# --model  optional: tiny, base, small (default), medium, large-v3
#          Bigger models are more accurate but slower.
# --force  re-transcribe even if a matching .srt already exists next to the video
#          (default: skip files that already have one, so a batch run can be
#          safely re-run over a folder without redoing finished episodes)
#
# Output: an .srt file next to each video, with the same base filename,
# so most players (VLC, etc.) will auto-load it.

I have it hardwired to 40 chars/line max, and 2 lines at a time max.
You can, of course, change those in the script to whatever you like.

SpiceWare

The 2nd half of that Grok discussion that I mentioned earlier was about autogenerating subtitles with translation for a couple other German series I have that I couldn't find subtitles for. Search that discussion for Das Blaue Palais to find it.

Grok's first recommendation was AutoSRT which worked, but had odd issues like subtitles for speech after a long period of silence would show up at beginning of the silence, long before it was needed.  Other times it would repeat subtitles numerous times such as this sequence of 2 subtitles repeated well over 50 times:


Sogar bei mir in
Even at my place

der Wohnung.
even at my place.


The German and English translation appear onscreen at the same time for review, after which you can export the subtitles for each language separately.

Grok's second recommendation was MacWhisper, though I haven't tried it yet.  Is that the same as the Whisper referred to in your script?

Andrew Davie

Quote from: SpiceWare on 15 Sep 2026, 05:11 AMGrok's second recommendation was MacWhisper, though I haven't tried it yet.  Is that the same as the Whisper referred to in your script?

According to Claude, "MacWhisper is a separate third-party Mac app (a GUI wrapper) that also uses OpenAI's Whisper models under the hood, but it's a different product with its own packaging. What we installed is openai-whisper, the original open-source Python package/CLI straight from OpenAI, installed via pip into a local venv at ~/.whisper-venv. No GUI, no separate app — just the command-line tool the script calls directly."

So, yes but no.

Andrew Davie

Here's a simple GUI to drive it. I literally asked Claude "make a GUI for it"