If this helped you, consider starring the repo ⭐
Subtitles Generator - Generate .srt Both Locally or Let it Run on your PC and use it On other Devices.
Turn any video into professional
.srtsubtitle files — locally, on your PC, powered by OpenAI Whisper.
No cloud upload. No subscription. Drag, drop, pick languages, done.
Portable, queue-based desktop app with a glassmorphism UI, GPU acceleration, phone/tablet support, and cinema-style phrase timing.
This is the only step you need to remember.
- Open the project folder on your PC.
- Double-click
run.bat. - Leave the black console window open while the app runs.
- When the app window appears, you are ready to add videos.
That is it. You do not need to install Python manually, run pip commands, or open a terminal — run.bat handles everything on first launch and every launch after.
Keep the console window open. Closing it stops the app.
First run takes longer (venv, packages, FFmpeg, Whisper model download). Later launches are much faster.
| Step | Action |
|---|---|
| 1 | Drag & drop videos or folders onto the window — or click Browse files / Browse folder |
| 2 | Set Source language (spoken in the video). Auto works for most content. |
| 3 | Check every Subtitle language you want (e.g. en, es, fr) |
| 4 | Click Process All |
| 5 | Wait for the progress bar. SRT files appear next to each video on disk |
Example result:
MyVacation.mp4
MyVacation - (en).srt
MyVacation - (es).srt
MyVacation - (fr).srt
Double-click run.bat. Wait until the app window appears.
- First launch: 5–20 minutes depending on internet speed (PyTorch + Whisper model).
- Later launches: usually under 30 seconds.
Three ways to add content:
| Method | How |
|---|---|
| Drag & drop | Drop video files or entire folders anywhere on the app window |
| Browse files | Click the button in the drop zone; pick one or more videos |
| Browse folder | Pick a folder — all supported videos inside are scanned recursively |
Global defaults (sidebar → Languages) apply to every video unless you override one card.
-
Source language — what is spoken in the video.
- Use Auto for mixed or unknown content.
- Set explicitly (e.g.
Japanese) if detection is wrong.
-
Target languages — check every language you want subtitles in.
- Tap ☆ next to a language to pin it as a favorite (sorted to the top).
- Favorites are saved in
user_settings.jsonon your PC.
-
Per-video override — click Select on a card, then change languages for that file only.
{video-filename} - ({language-code}).srt
| Video | Language | Output file |
|---|---|---|
lecture.mp4 |
English | lecture - (en).srt |
lecture.mp4 |
Spanish | lecture - (es).srt |
clip.mkv |
Japanese | clip - (ja).srt |
1
00:00:01,080 --> 00:00:03,180
Hello and welcome.
2
00:00:04,500 --> 00:00:07,200
Today we will learn something new.Compatible with VLC, MPC-HC, Plex, DaVinci Resolve, Premiere, YouTube upload, etc.
If Video - (en).srt already exists, that language is skipped automatically — safe to re-run after adding new target languages.
Whisper supports 90+ languages including Auto-detect. The UI lists every language Whisper can transcribe.
When target ≠ source, segments are translated via Google Translate (deep-translator). Translation runs in batches with automatic retries.
| Scenario | What happens |
|---|---|
Target = source (e.g. en → en) |
Transcription only — no translation |
Target ≠ source (e.g. es → en) |
Transcribe in source, translate to target |
| Source = Auto | Whisper detects spoken language first |
Tip: For best accuracy, set source language explicitly when you know it.
Change the model in Settings → Engine → Whisper model. The model file is cached in models/ after first download.
| Model | Speed | Quality | VRAM (approx.) | Best for |
|---|---|---|---|---|
tiny / tiny.en |
Fastest | Lowest | ~1 GB | Quick drafts, English-only with .en |
base / base.en |
Fast | Good | ~1 GB | Default — balanced daily use |
small / small.en |
Medium | Better | ~2 GB | Cleaner dialogue |
medium / medium.en |
Slow | High | ~5 GB | Podcasts, interviews |
large-v3 |
Slowest | Best | ~10 GB | Final exports, GPU recommended |
large-v2 / large |
Very slow | Excellent | ~10 GB | Legacy large models |
turbo |
Fast | High (EN-focused) | ~6 GB | English content, speed/quality balance |
Changing model or CUDA setting unloads and reloads Whisper automatically.
Enable Word-level timestamps in Settings when you need:
- Karaoke-style highlighting
- Per-word precision for editing in a DAW/NLE
- Linguistic analysis
Each word becomes its own SRT cue. Best when output language matches spoken language.
- Double-click
run.baton the PC (app must be running). - In the app sidebar, enable Allow LAN access (phone/tablet).
- Connect phone to the same Wi‑Fi as the PC (not guest network).
- Expand 📱 Same Wi‑Fi in the sidebar — open the URL shown (e.g.
http://192.168.1.42:8765).
Or tap ▣ to scan the QR code. - On the phone: use Browse files to upload videos from that device. Processing still runs on the PC.
When processing completes, tap ↓ en.srt (or other language) on the video card.
Disable Allow LAN access — remote devices on your Wi‑Fi get 403 Forbidden immediately. Your PC still works at 127.0.0.1.
Right-click PowerShell → Run as Administrator:
cd path\to\Subtitles-Generator
.\scripts\allow_lan_firewall.ps1This adds an inbound rule for TCP port 8765.
| Symptom | Likely cause | Fix |
|---|---|---|
| Page never loads | AP / client isolation on router | Disable isolation in router admin; avoid guest Wi‑Fi |
| Page never loads | Windows Firewall | Run allow_lan_firewall.ps1 as Admin |
| Connection refused | App not running | Double-click run.bat again |
| 403 Forbidden | LAN toggle OFF | Enable Allow LAN access in Settings |
| Blank page | Wrong URL | Use LAN IP from sidebar, not 127.0.0.1 |
Quick ping test: From the phone, ping the PC's LAN IP. No reply = network isolation or firewall — not an app bug.
| Data | Leaves PC? |
|---|---|
| Video files | No — processed locally |
| Audio for Whisper | No — extracted to logs/audio_cache/, deleted after use |
| Translation text | Yes — text segments sent to Google Translate API when target ≠ source |
| QR code | Yes — generated via api.qrserver.com (URL only, when you open QR modal) |
.mp4 · .mkv · .avi · .mov · .wmv · .flv · .webm · .m4v · .mpg · .mpeg · .3gp
Any format FFmpeg can decode works. FFmpeg is auto-installed by run.bat if missing.
On first run, run.bat copies .env.example → .env. Edit .env only when you need non-default behavior.
| Variable | Default | Description |
|---|---|---|
HOST |
127.0.0.1 |
Local URL host label |
PORT |
8765 |
Web UI port |
BIND_HOST |
0.0.0.0 |
Network bind address (LAN toggle enforces access) |
LAN_ONLY |
true |
Block public internet IPs |
WHISPER_MODEL |
base |
Starting model (also changeable in UI) |
WHISPER_DEVICE |
cuda |
Preferred device hint |
USE_CUDA |
true |
Default GPU toggle state in UI |
MODELS_DIR |
models |
Whisper model cache folder |
FFMPEG_PATH |
(empty) | Custom ffmpeg.exe path; auto-detect if empty |
LOG_LEVEL |
DEBUG |
Logging verbosity |
LOG_DIR |
logs |
Log file directory |
MAX_QUEUE_SIZE |
1000 |
Maximum queued jobs |
TRANSLATION_BATCH_SIZE |
20 |
Segments per translation batch |
TRANSLATION_RETRY_COUNT |
3 |
Retries on translation failure |
DEBUG |
false |
Flask debug mode (dev only) |
Note:
Allow LAN accessandWord-level timestampsare UI toggles only — always OFF when the app opens. They are not controlled by.env.
- Install Python from python.org — check “Add Python to PATH”.
- Double-click
run.batagain.
The app falls back to your default browser at http://127.0.0.1:8765. Functionality is identical.
Install WebView2 Runtime for the native window experience.
- Check internet connection.
- Delete
venv/folder. - Double-click
run.batto recreate the environment.
- Let
run.batauto-download FFmpeg. - Or install manually from gyan.dev/ffmpeg/builds into
ffmpeg\bin\. - Or set
FFMPEG_PATHin.env.
- Update NVIDIA drivers.
- Re-run
run.bat(triggers CUDA PyTorch install). - Try
scripts\install_cuda_torch.ps1manually. - As last resort: turn Use CUDA OFF and use a smaller model (
tiny/base).
Default phrase timing is tuned for natural viewing. For per-word precision, enable Word-level timestamps and re-process.
Switch to base or small, or disable CUDA to use system RAM instead of VRAM.
Change PORT=8766 in .env, restart via run.bat.
| File | Contents |
|---|---|
logs/app.log |
Full debug trail |
logs/errors.log |
Errors only |
logs/events.jsonl |
Structured JSON events (one per line) |
logs/startup.log |
run.bat launch history |
flowchart TB
subgraph UI["Desktop UI (pywebview)"]
DROP[Drag & drop / Browse]
SETTINGS[Languages & Engine settings]
end
subgraph API["Flask API (localhost:8765)"]
QUEUE[Job queue]
GUARD[LAN network guard]
end
subgraph Worker["Background worker (1 thread)"]
FF[FFmpeg → WAV 16 kHz mono]
WH[Whisper transcribe]
TR[Google Translate]
REF[Phrase timing refine]
SRT[Write .srt next to video]
end
DROP --> API
SETTINGS --> API
API --> QUEUE
QUEUE --> Worker
FF --> WH --> TR --> REF --> SRT
| Requirement | Details |
|---|---|
| OS | Windows 10 or later |
| Python | 3.10 – 3.13 (3.10 recommended; auto-detected by run.bat) |
| Internet | Required on first run (packages + model download) |
| GPU | Optional — NVIDIA + CUDA for 5–20× faster transcription |
| Disk | ~2 GB for venv + base model; up to ~10 GB for large-v3 |
Do I need to install Python?
run.bat finds it automatically. Install Python 3.10+ only if the script reports it missing.
Do videos get uploaded to the cloud?
No. Whisper runs entirely on your PC.
Can I process multiple videos at once?
They queue automatically, but transcribe one at a time for stability.
Can I use this on Mac or Linux?
YES The Python script can run manually on other OS with adjustments.
Why are LAN and word timestamps off by default?
Security (LAN) and readability (phrase timing). Both are opt-in.
Can I change the port?
Yes — set PORT in .env and restart via run.bat.
Where do phone uploads go?
uploads/ folder on the PC. SRT output still saves next to the uploaded file path.
- OpenAI Whisper — speech recognition
- auto-subtitle — original inspiration
- deep-translator — subtitle translation
- pywebview — native desktop window
- driver.js — interactive onboarding tour
Remember: double-click run.bat — everything else is optional.