简体中文 | English
- 视频硬字幕提取,自动生成对应
srt
文件。 - 支持字幕语言:中文 | 英文 (其他可以支持的语言参见:支持语种列表)
- 可加入QQ群:706807542
- 更快更准确地提取视频硬字幕,并提供
srt| txt
l两种格式的输出:- 更快:与VideoSubFinder软件结合使用,提取关键字幕帧更快。
- 更准:采用RapidOCR作为识别库。
- 更方便:pip直接安装即可使用。
- 该工具处于发展中。在使用过程中,如果遇到任何问题,欢迎提issue或者入群反馈。如果不愿意用的话,不用就好,不要影响自己心情。
- 增加对VideoSubFinder软件提取字幕帧结果的处理接口
- 尝试将VideoSubFinder核心功能整合到本项目中,通过其开放的CLI mode
flowchart LR
A(VideoSubFinder) --提取字幕关键帧--> B(RapidVideOCR) --OCR--> C(SRT)
更新日志(more)
- 修复视频时长大于1个小时,字幕帧时间变为0的bug.
- 安装使用VideoSubFinder软件
- 使用该软件抽取关键字幕帧图像 → 得到
RGBImages
目录。一般会在软件安装目录下。 - 安装rapid_videocr
pip install rapid_videocr -i https://pypi.douban.com/simple/
- 使用RapidVideOCR工具
- 脚本运行:
from rapid_videocr import RapidVideOCR extractor = RapidVideOCR() rgb_dir = 'test_files/RGBImages' save_dir = 'result' extractor(rgb_dir, save_dir)
- 命令行运行:
- Usage:
$ rapid_videocr -h usage: rapid_videocr [-h] [-i IMG_DIR] [-s SAVE_DIR] [-o {srt,txt,all}] optional arguments: -h, --help show this help message and exit -i IMG_DIR, --img_dir IMG_DIR The full path of mp4 video. -s SAVE_DIR, --save_dir SAVE_DIR The path of saving the recognition result. -o {srt,txt,all}, --out_format {srt,txt,all} Output file format. Default is "all"
- Example:
$ rapid_videocr -i RGBImages -s Results -o srt
- Usage:
- 脚本运行:
- 查看结果
- 前往
save_dir
目录下即可查看结果。 - 值得注意的是,如果想要让视频播放软件自动挂载srt文件,需要更改srt文件名字为视频文件名字,且放到同一目录下,亦或者手动指定加载。
- 前往
- 本仓库发版遵循语义化版本号命名,详情参考语义化版本号2.0