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 ⭐.
flowchart LR
A[/Video/] --Extract subtitle key frame--> B(VideoSubFinder) --OCR-->C(RapidVideOCR)
C --Convert--> D[/"SRT | ASS | TXT"/]
pip install rapid_videocr
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)
Full documentation can be found on docs in Chinese.
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.
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.
This project is released under the Apache 2.0 license.