Home
Softono
RapidVideOCR

RapidVideOCR

Open source Apache-2.0 Python
501
Stars
62
Forks
3
Issues
6
Watchers
9 months
Last Commit

About RapidVideOCR

🎦 Extract video hard subtitles and automatically generate corresponding srt files.

Platforms

Web Self-hosted

Languages

Python
 

PyPI SemVer2.0

简体中文 | 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. 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 software, it can extract key subtitle frames more quickly.
  • More Accurate Recognition: It utilizes 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.

If this tool has been helpful to you, please give it a star ⭐.

Online Demo

Demo

Overall framework

flowchart LR
    A[/Video/] --Extract subtitle key frame--> B(VideoSubFinder) --OCR-->C(RapidVideOCR)
    C --Convert--> D[/"SRT | ASS | TXT"/]

Installation

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.

rapid_videocr -i RGBImages

or python script:

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 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

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.