[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-83135":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":14,"stars7d":17,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":31,"discoverSource":32},83135,"subvid.app","midudev\u002Fsubvid.app","midudev","Put subtitles to any video directly from your browser and free","https:\u002F\u002Fsubvid.app",null,"TypeScript",80,19,2,4,0,20,9,59.84,"Other",false,"main",true,[25,26,27],"subtitles","video","video-subtitles","2026-06-12 04:01:40","\u003Cdiv align=\"center\">\n\n# subvid.app\n\n**Generate, edit, translate, and export subtitles for any video — entirely in your browser.**\n\nNo uploads. No backend. No API keys.\n\n\u003Ca href=\"https:\u002F\u002Fsubvid.app\">🌐 Live site\u003C\u002Fa> ·\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmidudev\u002Fsubvid.app\">📦 Repository\u003C\u002Fa> ·\n\u003Ca href=\"#getting-started\">🚀 Getting started\u003C\u002Fa>\n\n\u003Cbr \u002F>\n\n\u003Cimg width=\"900\" alt=\"subvid.app — subtitle editor with timeline and live preview\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F6a4463ce-9cf7-4053-a193-97104080b6a7\" \u002F>\n\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\n[![Astro](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAstro-6-FF5D01?logo=astro&logoColor=white)](https:\u002F\u002Fastro.build)\n[![Tailwind CSS](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTailwind_CSS-4-38BDF8?logo=tailwindcss&logoColor=white)](https:\u002F\u002Ftailwindcss.com)\n[![Whisper](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAI-Whisper-412991?logo=openai&logoColor=white)](https:\u002F\u002Fhuggingface.co\u002FXenova\u002Fwhisper-base)\n[![Cloudflare Workers](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDeploy-Cloudflare_Workers-F38020?logo=cloudflare&logoColor=white)](https:\u002F\u002Fworkers.cloudflare.com)\n\n\u003C\u002Fdiv>\n\n## What it does\n\n1. **Upload a video** — drag & drop or browse. Supports MP4, MOV, WebM, and MKV.\n2. **Configure languages** — pick the audio language (or auto-detect) and the subtitle language.\n3. **Generate subtitles** — Whisper transcribes the audio; NLLB translates when needed.\n4. **Edit in the timeline** — fix text, timing, and styling with undo\u002Fredo.\n5. **Export** — download an `.srt` file or a new video with burned-in captions.\n\nEverything runs client-side. Your video never leaves your device.\n\n## Features\n\n- **AI transcription** — [Whisper](https:\u002F\u002Fhuggingface.co\u002FXenova\u002Fwhisper-base) via [transformers.js](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers.js), with optional WebGPU acceleration.\n- **AI translation** — [NLLB-200](https:\u002F\u002Fhuggingface.co\u002FXenova\u002Fnllb-200-distilled-600M) for multilingual subtitle tracks.\n- **Subtitle editor** — segment list, timeline scrubbing, multi-language tracks, caption presets (font, color, background, outline, position).\n- **Export options**\n  - `.srt` subtitle file\n  - MP4 with hard-coded subtitles (WebCodecs + [mediabunny](https:\u002F\u002Fgithub.com\u002FVanilagy\u002Fmediabunny) when available; canvas + MediaRecorder as fallback)\n- **Internationalization** — English (default) and Spanish, with static pages per locale.\n- **Offline-friendly models** — AI weights are downloaded once and cached in the browser (IndexedDB).\n\n## Tech stack\n\n| Layer | Technology |\n| --- | --- |\n| Framework | [Astro 6](https:\u002F\u002Fastro.build) (static site) |\n| Styling | [Tailwind CSS 4](https:\u002F\u002Ftailwindcss.com) |\n| Speech recognition | [@xenova\u002Ftransformers](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@xenova\u002Ftransformers) (Whisper) |\n| Translation | transformers.js (NLLB-200) |\n| Audio extraction | [@ffmpeg\u002Fffmpeg](https:\u002F\u002Fffmpegwasm.netlify.app) (WASM) |\n| Video export | [mediabunny](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fmediabunny) + WebCodecs |\n| Deployment | [Cloudflare Workers](https:\u002F\u002Fworkers.cloudflare.com) (static assets) |\n\n## Requirements\n\n- **Node.js** ≥ 22.12.0\n- **pnpm** (recommended package manager for this repo)\n\nFor 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.\n\n## Getting started\n\n```sh\n# Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002Fmidudev\u002Fsubvid.app.git\ncd subvid.app\n\n# Install dependencies\npnpm install\n\n# Start the dev server (http:\u002F\u002Flocalhost:4321)\npnpm dev\n```\n\nNo environment variables or external services are required for local development.\n\n## Scripts\n\n| Command | Description |\n| --- | --- |\n| `pnpm dev` | Start Astro dev server at `localhost:4321` |\n| `pnpm build` | Build the production site to `.\u002Fdist\u002F` |\n| `pnpm preview` | Preview the production build locally |\n| `pnpm preview:cf` | Build and preview with Wrangler (Cloudflare Workers runtime) |\n| `pnpm deploy` | Build and deploy to Cloudflare Workers |\n\n## Project structure\n\n```text\nsrc\u002F\n├── components\u002F       # Astro UI (upload, config, editor, export modal, …)\n├── i18n\u002Fui.ts        # Translations (en, es) — server + client strings\n├── layouts\u002F          # HTML shell, hreflang, meta tags\n├── pages\u002F            # Routes: \u002F (en), \u002Fes\u002F (es)\n├── scripts\u002F\n│   ├── app.ts        # Main client logic (state, transcription, export)\n│   ├── transcriber.worker.ts  # Web Worker for AI models\n│   └── dom.ts        # DOM helpers\n└── styles\u002F           # Global and app-specific CSS\n```\n\nThe app is a multi-stage SPA embedded in static Astro pages. Server-rendered copy lives in `src\u002Fi18n\u002Fui.ts`; runtime strings for the active locale are injected into `window.__I18N__` so only one language ships per page.\n\n## Architecture notes\n\n- **Main thread** — UI, video playback, timeline, FFmpeg orchestration, export rendering.\n- **Transcriber worker** — loads Whisper\u002FNLLB and runs inference off the main thread so the UI stays responsive.\n- **FFmpeg worker** — extracts audio from the uploaded video before transcription.\n- **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.\n\n### Browser capabilities\n\n| Capability | Used for |\n| --- | --- |\n| WebGPU | Faster Whisper inference (when supported) |\n| WebCodecs | Fast MP4 export with burned-in subtitles |\n| SharedArrayBuffer \u002F cross-origin isolation | Required by FFmpeg WASM in some environments |\n\n## Deployment\n\nThe site is deployed as static assets on Cloudflare Workers. Configuration lives in `wrangler.jsonc`:\n\n```sh\npnpm deploy\n```\n\nYou need a [Cloudflare account](https:\u002F\u002Fdash.cloudflare.com) and Wrangler authenticated (`wrangler login`).\n\n## Adding a language\n\n1. Add the locale code to `i18n.locales` in `astro.config.mjs`.\n2. Create `src\u002Fpages\u002F\u003Ccode>\u002Findex.astro` (copy `src\u002Fpages\u002Fes\u002Findex.astro`).\n3. Add a translation block in `src\u002Fi18n\u002Fui.ts` mirroring the English keys.\n4. Register the display name in `languages` inside `src\u002Fi18n\u002Fui.ts`.\n\n## Privacy\n\nsubvid.app is designed around local-first processing:\n\n- Videos are read from disk via the File API — never uploaded.\n- AI models run in Web Workers with WASM\u002FWebGPU.\n- No analytics backend or user accounts in this codebase.\n\n## License\n\nSee the repository for license details.\n\n## Author\n\nBuilt by [midudev](https:\u002F\u002Fmidu.dev).\n","subvid.app 是一个浏览器端的免费字幕生成和编辑工具。其核心功能包括通过AI技术自动转录音频并生成字幕，支持多语言翻译，以及提供时间轴上的直观编辑体验，允许用户调整文本、时间点和样式，并最终导出.srt文件或带有嵌入式字幕的新视频文件。该应用完全在客户端运行，使用了先进的Web技术如Astro框架、Tailwind CSS进行界面设计，以及基于WebAssembly的FFmpeg实现音频处理等，确保了高效且安全的数据处理流程。适用于需要为视频添加、编辑或翻译字幕的各种场景，尤其是对隐私保护有高要求的情况。","2026-06-11 04:10:14","CREATED_QUERY"]