https://github.com/SWHL/RapidVideOCR
🎦 Extract video hard subtitles and automatically generate corresponding srt files.
https://github.com/SWHL/RapidVideOCR
ocr subtitle video videosubfinder
Last synced: 3 months ago
JSON representation
🎦 Extract video hard subtitles and automatically generate corresponding srt files.
- Host: GitHub
- URL: https://github.com/SWHL/RapidVideOCR
- Owner: SWHL
- License: apache-2.0
- Created: 2021-09-12T08:34:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-26T00:23:06.000Z (4 months ago)
- Last Synced: 2025-06-26T01:25:59.865Z (4 months ago)
- Topics: ocr, subtitle, video, videosubfinder
- Language: Python
- Homepage: https://swhl.github.io/RapidVideOCR/docs
- Size: 17.8 MB
- Stars: 413
- Watchers: 5
- Forks: 50
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
### Introduction
- Video hard subtitle extraction, automatically generate the corresponding `srt | ass | txt` file.
- Supported subtitle languages: Chinese | English (For other supported languages, see: [List of supported languages](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.1/doc/doc_ch/multi_languages.md#%E8%AF%AD%E7%A7%8D%E7%BC%A9%E5%86%99))
- The advantages are as follows:
- **Faster extraction**: Used in conjunction with [VideoSubFinder](https://sourceforge.net/projects/videosubfinder/) software to extract key subtitle frames faster.
- **More accurate recognition**: Use [RapidOCR](https://github.com/RapidAI/RapidOCR) as the recognition library.
- **More convenient to use**: pip can be installed directly and used.- For desktop EXE version, please go to [RapidVideOCRDesktop](https://github.com/SWHL/RapidVideOCRDesktop).
- If it helps you, please give a star ⭐.### [Online Demo](https://huggingface.co/spaces/SWHL/RapidVideOCR)
![]()
### 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, RapidVideOCRInputinput_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/docs), 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).