Skip to content

stskr/sublibr

Repository files navigation

SUBLIBR

License

A modern, AI-powered desktop application that generates high-quality subtitles for your videos and audio files. Supports multiple AI providers: Google Gemini and OpenAI.

ืชื•ื›ื ื” ืžื•ื“ืจื ื™ืช ืžื‘ื•ืกืกืช AI ืœืชืžืœื•ืœ ืื•ื˜ื•ืžื˜ื™ ืฉืœ ืงื˜ืขื™ ื•ื™ื“ืื• ืื• ืื•ื“ื™ื•. ื ื ืœืฉื™ื ืœื‘ ืฉืื™ื›ื•ืช ื”ืชืžืœื•ืœ ื‘ืขื‘ืจื™ืช ืขื•ืœื” ืžืฉืžืขื•ืชื™ืช ื‘ืฉื™ืžื•ืฉ ื‘ืžื•ื“ืœ ืฉืœ Gemini Pro.

๐Ÿ“ธ Screenshots

Upload video or audio API key setup
AI subtitles generation Subtitles editor

Preview video

โœจ Features

  • ๐ŸŽ™๏ธ AI Transcription: Multi-provider support โ€” Google Gemini and OpenAI โ€” with per-provider API key validation and a unified "Active Model" selector.
  • ๐Ÿ†“ Google Free Tier Support: Enable Free Tier in Settings when using a Google AI Studio free key. Switches to sequential processing to stay within daily request limits โ€” Flash handles ~20+ hrs of video/day, Pro ~1 hr/day. No payment required to get started.
  • ๐ŸŒ 90+ Languages: Auto-detects languages or lets you choose from over 90 options.
  • ๐Ÿ”„ Versions & Regenerate: Create multiple subtitle versions with different settings and switch between them instantly.
  • ๐ŸŒ Translate: Translate generated subtitles to another language via a text-to-text AI model while perfectly preserving timestamps.
  • โœ‚๏ธ Smart Processing: Automatically handles long files by splitting them into chunks with context-aware 20-second overlap and smart stitching at boundaries.
  • ๐Ÿฉน Gap Healing: Intelligently detects and re-transcribes missing subtitle segments that AI skipped.
  • ๐ŸŽฌ Render Video: Burn styled subtitles directly into a video at any target resolution (Wide 16:9, Square 1:1, Vertical 9:16, or Original).
  • ๐ŸŽจ Global Subtitle Styling: Full per-project style control โ€” font, font size, text color, outline/shadow effects, background box, and precise X/Y position. Per-screen-size defaults and a one-click Reset button.
  • ๐Ÿ“ค Multi-Format Export: SRT, WebVTT, and ASS with full style embedding.
  • ๐Ÿ“ Recent Files History: Tracks your last 10 files for quick access with automatic subtitle caching for instant restoration.
  • โšก Quality Control: Enforces reading speeds, line limits, and minimum durations for professional-looking subtitles.
  • โŒจ๏ธ Keyboard Shortcuts: Control playback (Space, Arrows) and editing (Undo/Redo, Insert/Delete, Search) with global shortcuts.
  • ๐ŸŽฌ Advanced Visual Editor: Two-tier timeline with a zoomed detail view, precision ruler, vertical grid, and a global minimap for precise navigation. Includes a Scissors tool (C) for splitting and drag-to-trim handles.
  • ๐Ÿ” Search & Replace: Find and correct text across all subtitles with "Replace All" and keyboard navigation.
  • โœ๏ธ Rich Text Editing: WYSIWYG inline subtitle editing with bold, italic, underline, and per-word color markup preserved through the full pipeline.
  • ๐Ÿ‘๏ธ Preview Mode: Toggle between subtitle list and inline video preview. Font size scales proportionally to the selected render resolution for an accurate representation of the final render.
  • ๐Ÿ”’ Private & Local: Your files stay on your machine (except audio chunks sent securely to the selected AI provider).
  • โ™ฟ Accessible: Full ARIA support with keyboard navigation, focus traps on modals, screen reader announcements, and labeled controls.

๐Ÿš€ Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/stskr/sublibr.git
    cd sublibr
  2. Install dependencies

    npm install
  3. Run the app

    npm run dev

Building for Production

To create an installer for your OS (.dmg, .exe, or .AppImage):

# macOS
npm run build:electron

# Windows
npm run build && npx electron-builder --win

# Linux
npm run build && npx electron-builder --linux

๐Ÿ› ๏ธ How to Use

  1. Set API Key: Click Settings (gear icon), toggle the providers you want, paste an API key for each, and click Test to verify. Select your active model from the hero dropdown. If using a Google AI Studio free-tier key, also enable the Free Tier toggle under Gemini.
  2. Import Media: Drag & drop a file, or click to browse. Supports audio (mp3, wav, flac, etc.) and video (mp4, mkv, mov, etc.).
  3. Generate: Select your language (or leave as Auto-detect), choose your Screen Format (Wide, Square, Vertical), and click Generate Subtitles.
  4. Style: Click Global Style to customize font, font size, colors, outline/shadow effects, background box, and subtitle position. Use Reset to restore per-format defaults.
  5. Edit & Preview: Review subtitles in the timeline editor or switch to Preview mode to see an accurate render preview with correct font scaling per aspect ratio.
  6. Export or Render: Download as SRT/VTT/ASS, or click Render Video to burn styled subtitles directly into your video.

โš™๏ธ Configuration

  • Model Selection: Choose from models across all enabled providers (e.g. Gemini 2.5 Flash, GPT-4o, Whisper-1).
  • Free Tier (Gemini): Toggle in Gemini settings when using a Google AI Studio free key. Enables sequential processing (1 chunk at a time) to respect daily quotas โ€” Flash: ~20+ hrs/day, Pro: ~1 hr/day.
  • Screen Format: Wide (16:9), Square (1:1), Vertical (9:16), or Original โ€” controls line length, font size defaults, and render resolution.
  • Subtitle Style: Fully configurable per-project in the Global Style panel.
  • Theme: The app defaults to a modern dark theme optimized for video editing.

๐Ÿ—๏ธ Tech Stack

  • Core: Electron, React 19, TypeScript, Vite
  • AI: Google Gemini, OpenAI (multi-provider)
  • Media: FFmpeg (via @ffmpeg-installer for easy distribution)
  • Styling: Vanilla CSS with comprehensive design tokens

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

AI-powered subtitle generator for video and audio files. Supports Google Gemini and OpenAI for accurate, multi-language transcription with a built-in timeline editor, rich styling, and direct video rendering.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages