VideoSubtitleGenerator  by buxuku

CLI tool for local video subtitle generation and translation

created 1 year ago
784 stars

Top 45.5% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a command-line tool for batch generating subtitle files from local videos and translating them into other languages. It's designed for users with large collections of foreign-language videos who need to add subtitles and translations efficiently, avoiding the overhead of uploading videos to online services.

How It Works

The tool follows a straightforward pipeline: it extracts audio from video files using FFmpeg, generates original language subtitles using the Whisper model (integrated via whisper.cpp for Apple Silicon optimization), and then translates these subtitles using various API services. Users can configure the output format to include only the translation, or both the original and translated subtitles.

Quick Start & Requirements

  • Install dependencies: yarn install or npm install
  • Configure API keys in .env.local for translation services (Baidu, Volcano, Deeplx, Ollama).
  • Configure paths and models in config.js.
  • Run with yarn start or npm start.
  • Requires Node.js and Yarn/npm. Initial run downloads Whisper models, which can be slow.

Highlighted Details

  • Integrates whisper.cpp for optimized performance on Apple Silicon.
  • Supports multiple Whisper models (tiny to large-v3).
  • Offers flexible translation options via Volcano, Baidu, Deeplx, and Ollama.
  • Customizable subtitle output formats and filenames.
  • Processes videos in specified directories in batches.

Maintenance & Community

The project is actively maintained by buxuku. Discussions and issue reporting are encouraged via GitHub.

Licensing & Compatibility

The repository does not explicitly state a license. The use of translation APIs requires users to obtain their own API keys and adhere to the terms of those services.

Limitations & Caveats

The non-Store version is not optimized for Apple Silicon, leading to slower subtitle generation. Batch translation may be subject to rate limiting by the chosen API. Users must obtain and configure their own API keys for translation services.

Health Check
Last commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
46 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.