# RapidVideOCR **Repository Path**: SWHL/RapidVideOCR ## Basic Information - **Project Name**: RapidVideOCR - **Description**: Gitee仓库主要用作备份使用,主仓库参见:https://github.com/SWHL/RapidVideOCR 视频硬字幕提取,自动生成对应srt文件。VideoSubFinder + RapidOCR结合,离线即可运行,更快更准更方便。 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 1 - **Created**: 2022-04-23 - **Last Updated**: 2025-09-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
 
PyPI SemVer2.0 [简体中文](https://github.com/SWHL/RapidVideOCR/blob/main/docs/README_zh.md) | English
### Introduction `rapid_videocr` is a tool designed for the automatic extraction of hard subtitles from videos and generates corresponding `srt | ass | txt` files. Supported subtitle languages: [List of Supported Languages](https://rapidai.github.io/RapidOCRDocs/main/model_list/#_4). Since this tool relies on the `rapidocr` library, any language supported by `rapidocr` for recognition is also supported by `rapid_videocr`. Its advantages include: - **Faster Extraction**: When used in conjunction with the [VideoSubFinder](https://sourceforge.net/projects/videosubfinder/) software, it can extract key subtitle frames more quickly. - **More Accurate Recognition**: It utilizes [RapidOCR](https://github.com/RapidAI/RapidOCR) as its recognition library. - **Easier to Use**: It can be installed directly via pip and is ready to use. For the desktop EXE version, please visit [RapidVideOCRDesktop](https://github.com/SWHL/RapidVideOCRDesktop). If this tool has been helpful to you, please give it a star ⭐. ### [Online Demo](https://huggingface.co/spaces/SWHL/RapidVideOCR)
Demo
### Overall framework ```mermaid flowchart LR A[/Video/] --Extract subtitle key frame--> B(VideoSubFinder) --OCR-->C(RapidVideOCR) C --Convert--> D[/"SRT | ASS | TXT"/] ``` ### Installation ```bash pip install rapid_videocr ``` ### Usage > [!NOTE] > > The input image path of `rapid_videocr` must be the path of **RGBImages** or **TXTImages** output by **VideoSubFinder** software. ```bash rapid_videocr -i RGBImages ``` or python script: ```python from rapid_videocr import RapidVideOCR, RapidVideOCRInput input_args = RapidVideOCRInput(is_batch_rec=False) extractor = RapidVideOCR(input_args) rgb_dir = "tests/test_files/RGBImages" save_dir = "outputs" save_name = "a" # outputs/a.srt outputs/a.ass outputs/a.txt extractor(rgb_dir, save_dir, save_name=save_name) ``` ### Documentation Full documentation can be found on [docs](https://swhl.github.io/RapidVideOCR) in Chinese. ### Code Contributors

### Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate. ### [Sponsor](https://swhl.github.io/RapidVideOCR/docs/sponsor/) If you want to sponsor the project, you can directly click the **Buy me a coffee** image, please write a note (e.g. your github account name) to facilitate adding to the sponsorship list below.
### License This project is released under the [Apache 2.0 license](./LICENSE).