subtitle.lol
Subtitles made from a video's own audio, in its language or yours.
For when Plex can't find subtitles, or the English subtitles don't match the English dub. Each episode takes 1–2 minutes, and 95–100% of lines come out right.
How to check
The security policy at the top of this page's source only allows connections to
ElevenLabs and Google, and your browser enforces it. Keys are used only in
core/speech/elevenlabs.js and core/translation/gemini.js. To limit a leaked key,
give the ElevenLabs key only Speech to Text access with a credit limit, and restrict the Gemini key to the
Generative Language API in the
Google Cloud console.
Only the audio track is uploaded. Save the .srt next to the video with the same name, and Plex, VLC and IINA load it.
The same program for a terminal, for whole folders. It needs Node 23.6 or later.
Install
git clone https://github.com/lionpal/subtitler.git cd subtitler npm link
Use
Run it in a folder of videos and check the ones you want. Each .srt is saved next to its video. The first run asks for your ElevenLabs key.
cd "/Volumes/Media/TV Shows/Frieren/Season 01" subtitler
# list only the files that match subtitler Frieren* # for videos with several audio tracks, use the Japanese one subtitler --audio ja # also write an English translation (asks for a Gemini key) subtitler --translate en # every video without subtitles, without the list subtitler --all # everything else subtitler --help
Keys can also come from ELEVENLABS_API_KEY and GEMINI_API_KEY.
Runs are logged to subtitler.log.
Skip subtitle.lol and have a coding agent make the files with you. Paste this in:
i need subtitles for some videos. walk me through making .srt files from the audio, asking me whenever you need something: which videos, which audio track if there's more than one, and what language i want the subtitles in. by default use elevenlabs speech to text (it gives per-word timings) and gemini to translate, but check which providers i want and ask for my keys. send only the audio track, not the whole video. build the subtitles from the word timings, one or two lines each, breaking at pauses and full stops, shown 0.2 s before the voice, and for japanese or chinese break between phrases, not inside words. if i want them in a different language from the audio (say english subtitles for a japanese track), transcribe in the original language first, then go through the whole episode for names, places and special terms, look up the official spellings (the official release or the show's wiki), fix any the transcription misheard, show me that list, and translate using it so names stay the same across episodes. save each file as Episode 1.en.srt next to its video so plex picks it up, and keep the transcripts so i don't pay twice.
How it works
- Speech to text. The audio goes to ElevenLabs Scribe, which gives the time of every word. An hour of audio takes under a minute and about 1,200 credits ($0.22 on the Creator plan).
- Lines. Each subtitle has 1–2 lines, breaks at pauses and full stops, and appears 0.2 s before the voice, as professional subtitles do. Japanese, Chinese and Thai break between phrases found by Google's BudouX.
- Glossary, when translating. Names are where translation fails most visibly, so Gemini first lists every name, place and term in the episode, looks up the official spellings online, and flags names that were misheard.
- Translation. Gemini translates the lines in batches, each with the glossary and the lines before it, and must return every line.