RepositoryTypeScriptESSpain
midudev

midudev/subvid.app

Put subtitles to any video directly from your browser and free

185stars
48forks
0issues
0views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: video-subtitles

#1 Repository of the week

6
TINIX TRENDING·Topic: subtitles

#6 Repository of the week

1
TINIX TRENDING·Topic: video-subtitles

#1 Repository of the month

subvid.app

Generate, edit, translate, and export subtitles for any video or audio — entirely in your browser.

No uploads. No backend. No API keys.

🌐 Live site · 📦 Repository · 🚀 Getting started


subvid.app — subtitle editor with timeline and live preview

Astro Tailwind CSS Whisper Cloudflare Workers

What it does

  1. Upload a video or audio — drag & drop or browse. Supports MP4, MOV, WebM, MKV, MP3, WAV, and OGG.
  2. Configure languages — pick the audio language (or auto-detect) and the subtitle language.
  3. Generate subtitles — Whisper transcribes the audio; NLLB translates when needed.
  4. Edit in the timeline — fix text, timing, and styling with undo/redo.
  5. Export — download an .srt file or a new video with burned-in captions (video files only).

Everything runs client-side. Your files never leave your device.

Features

  • AI transcription — Whisper via transformers.js, with optional WebGPU acceleration.
  • AI translation — NLLB-200 for multilingual subtitle tracks.
  • Subtitle editor — segment list, timeline scrubbing, multi-language tracks, caption presets (font, color, background, outline, position).
  • Export options
    • .srt subtitle file
    • MP4 with hard-coded subtitles (WebCodecs + mediabunny when available; canvas + MediaRecorder as fallback)
  • Internationalization — English (default) and Spanish, with static pages per locale.
  • Offline-friendly models — AI weights are downloaded once and cached in the browser (IndexedDB).
  • Audio-only mode — upload MP3, WAV, or OGG files to generate subtitle files without needing video.

Tech stack

LayerTechnology
FrameworkAstro 6 (static site)
StylingTailwind CSS 4
Speech recognition@xenova/transformers (Whisper)
Translationtransformers.js (NLLB-200)
Audio extraction@ffmpeg/ffmpeg (WASM)
Video exportmediabunny + WebCodecs
DeploymentCloudflare Workers (static assets)

Requirements

  • Node.js ≥ 22.12.0
  • pnpm (recommended package manager for this repo)

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.

Getting started

# 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.

Scripts

CommandDescription
pnpm devStart Astro dev server at localhost:4321
pnpm buildBuild the production site to ./dist/
pnpm previewPreview the production build locally
pnpm preview:cfBuild and preview with Wrangler (Cloudflare Workers runtime)
pnpm deployBuild and deploy to Cloudflare Workers

Project structure

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.

Architecture notes

  • Main thread — UI, video playback, timeline, FFmpeg orchestration, export rendering.
  • Transcriber worker — loads Whisper/NLLB and runs inference off the main thread so the UI stays responsive.
  • FFmpeg worker — extracts audio from the uploaded video before transcription.
  • Model downloads — fetched from Hugging Face on first use (~150 MB for Whisper base + translation model). Progress is shown in the status dock; models can be cleared from the downloads panel.

Browser capabilities

CapabilityUsed for
WebGPUFaster Whisper inference (when supported)
WebCodecsFast MP4 export with burned-in subtitles
SharedArrayBuffer / cross-origin isolationRequired by FFmpeg WASM in some environments

Deployment

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).

Adding a language

  1. Add the locale code to i18n.locales in astro.config.mjs.
  2. Create src/pages/<code>/index.astro (copy src/pages/es/index.astro).
  3. Add a translation block in src/i18n/ui.ts mirroring the English keys.
  4. Register the display name in languages inside src/i18n/ui.ts.

Privacy

subvid.app is designed around local-first processing:

  • Videos are read from disk via the File API — never uploaded.
  • AI models run in Web Workers with WASM/WebGPU.
  • No analytics backend or user accounts in this codebase.

License

See the repository for license details.

Author

Built by midudev.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
harry0703/MoneyPrinterTurbo

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

147.3k
Dec 1, 2026
RepositoryTypeScript
remotion-dev/remotion

🎥 Make videos programmatically with React

77.2k
Dec 2, 2026
RepositoryPython
kajisho5/ffmpeg-skill

Local video editor for coding agents: 41 FFmpeg tools with a machine-readable contract and an MCP server, for Claude Code, Cursor and Codex. Cut, captions, reframe, loudness, platform exports. No cloud, no API keys.

13.6k
Dec 2, 2026
RepositoryTypeScript
mifi/lossless-cut

The swiss army knife of lossless video/audio editing

46.6k
Nov 25, 2026
RepositoryTypeScript
videojs/video.js

Video.js v10 - open source media player framework for HTML and React.

40.3k
Nov 27, 2026
RepositoryTypeScript
immich-app/immich

High performance self-hosted photo and video management solution.

120.6k
Dec 1, 2026
RepositoryC
FFmpeg/FFmpeg

Mirror of https://git.ffmpeg.org/ffmpeg.git

68.4k
Nov 29, 2026
RepositorySwift
iina/iina

The modern video player for macOS.

47.4k
Dec 1, 2026
RepositoryJava
TeamNewPipe/NewPipe

A libre lightweight streaming front-end for Android.

41.1k
Dec 1, 2026