About this project

Video-subtitle-extractor (VSE) is an open-source tool that extracts hardcoded subtitles from videos into external subtitle files (SRT or TXT). It is released under the Apache 2.0 license, developed with Python 3.12+, and supports Windows, macOS, and Linux platforms. The core processing pipeline includes: extracting key frames from videos, detecting text locations within frames, recognizing text content, filtering non-subtitle regions, removing duplicate subtitle lines, and finally outputting timeline-aligned SRT subtitle files. The project also includes video-subtitle-remover (VSR), which can remove watermarks, station logos, and hardcoded subtitles from original videos. Key features: - Fully local OCR, eliminating the need to apply for or call third-party online OCR APIs like Baidu or Alibaba, offering better privacy and cost control. - Supports GPU acceleration (CUDA, DirectML, ONNX) as well as pure CPU operation, covering hardware from NVIDIA, AMD, Intel, and Apple Silicon. - Offers three recognition modes: Fast (lightweight model, quick but may miss or misrecognize a few characters), Auto (automatically selects model based on hardware, recommended), and Accurate (frame-by-frame detection, almost no missed characters but very slow). - Supports subtitle extraction in 87 languages, including Simplified Chinese, Traditional Chinese, English, Japanese, Korean, Vietnamese, Arabic, French, German, Russian, Spanish, Portuguese, Italian, and more. - Supports batch extraction, requiring that videos in the same batch have consistent resolution and subtitle regions. - Provides a typoMap.json configuration for text replacement or full-line deletion of recognition results, such as replacing "威筋" with "威胁" or clearing advertising text like "性感荷官在线发牌". - Offers both a GUI (python gui.py) and CLI (python ./backend/main.py) usage modes; in the GUI, you can directly select the subtitle region and run with one click. For deployment, the project provides Release packages that can be directly extracted and run. For source installation, you need to create a Python virtual environment first, then choose one of four runtime environments based on hardware: CUDA 11.8 + cuDNN 8.6.0, DirectML, ONNX, or CPU, and install the corresponding version of PaddlePaddle 3.3.1 and dependencies. Note that video and program paths should not contain Chinese characters or spaces, as this may trigger unknown errors. For NVIDIA 50-series graphics cards, since Paddle 3.3.1 does not yet support CUDA 12.8, it is recommended to use the DirectML universal version. The project also maintains several QQ communication groups for Q&A and encourages users to submit improvement suggestions via Issues and Discussions. Overall, it is positioned as a localized hard subtitle extraction tool for individual users and subtitle enthusiasts, suitable for adding editable external subtitles to videos that lack them or have burned-in subtitles.