Put subtitles to any video directly from your browser and free
Generate, edit, translate, and export subtitles for any video — entirely in your browser.
No uploads. No backend. No API keys.
🌐 Live site ·
📦 Repository ·
🚀 Getting started
.srt file or a new video with burned-in captions.Everything runs client-side. Your video never leaves your device.
.srt subtitle file| Layer | Technology |
|---|---|
| Framework | Astro 6 (static site) |
| Styling | Tailwind CSS 4 |
| Speech recognition | @xenova/transformers (Whisper) |
| Translation | transformers.js (NLLB-200) |
| Audio extraction | @ffmpeg/ffmpeg (WASM) |
| Video export | mediabunny + WebCodecs |
| Deployment | Cloudflare Workers (static assets) |
For end users, a modern Chromium-based browser (Chrome, Edge, Brave) or Firefox is recommended. Safari works but WebCodecs export may fall back to the slower MediaRecorder path.
# Clone the repository
git clone https://github.com/midudev/subvid.app.git
cd subvid.app
# Install dependencies
pnpm install
# Start the dev server (http://localhost:4321)
pnpm dev
No environment variables or external services are required for local development.
| Command | Description |
|---|---|
pnpm dev |
Start Astro dev server at localhost:4321 |
pnpm build |
Build the production site to ./dist/ |
pnpm preview |
Preview the production build locally |
pnpm preview:cf |
Build and preview with Wrangler (Cloudflare Workers runtime) |
pnpm deploy |
Build and deploy to Cloudflare Workers |
src/
├── components/ # Astro UI (upload, config, editor, export modal, …)
├── i18n/ui.ts # Translations (en, es) — server + client strings
├── layouts/ # HTML shell, hreflang, meta tags
├── pages/ # Routes: / (en), /es/ (es)
├── scripts/
│ ├── app.ts # Main client logic (state, transcription, export)
│ ├── transcriber.worker.ts # Web Worker for AI models
│ └── dom.ts # DOM helpers
└── styles/ # Global and app-specific CSS
The app is a multi-stage SPA embedded in static Astro pages. Server-rendered copy lives in src/i18n/ui.ts; runtime strings for the active locale are injected into window.__I18N__ so only one language ships per page.
| Capability | Used for |
|---|---|
| WebGPU | Faster Whisper inference (when supported) |
| WebCodecs | Fast MP4 export with burned-in subtitles |
| SharedArrayBuffer / cross-origin isolation | Required by FFmpeg WASM in some environments |
The site is deployed as static assets on Cloudflare Workers. Configuration lives in wrangler.jsonc:
pnpm deploy
You need a Cloudflare account and Wrangler authenticated (wrangler login).
i18n.locales in astro.config.mjs.src/pages/<code>/index.astro (copy src/pages/es/index.astro).src/i18n/ui.ts mirroring the English keys.languages inside src/i18n/ui.ts.subvid.app is designed around local-first processing:
See the repository for license details.
Built by midudev.