用途:当用户要求“去字幕”“去除视频字幕”“去水印”“去掉视频里的文字/水印”时触发,自动完成环境准备与视频硬字幕去除。
主要能力:自动检查并初始化工作目录 ~/.opencode/tools/video-subtitle-remover,拉取 YaoFANGUK/video-subtitle-remover 核心代码(跳过模型文件),安装 Python 依赖,下载并合并 STTN 模型与 PaddleOCR 文本检测模型,注入修复代码并生成 run_remove.py 启动脚本,最后执行去字幕并输出 _no_sub.mp4。
使用方式:首次运行需初始化环境,安装依赖命令为 pip3 install torch torchvision 及 filesplit==3.0.2 scikit-image pyclipper lmdb PyYAML omegaconf tqdm easydict scikit-learn pandas webdataset einops av shapely paddleocr paddle2onnx albumentations imgaug;模型下载后需用 Filesplit 合并 V4/ch_det 分片。执行时运行 export KMP_DUPLICATE_LIB_OK=True 与 python3 ~/.opencode/tools/video-subtitle-remover/run_remove.py "<视频绝对路径>",长视频建议用 tmux 后台运行。
适用场景:本地去除视频硬字幕或水印,支持 Mac MPS 与 GPU 加速。
限制:属于需要本地 GPU/Apple Silicon 加速的重型任务;首次运行需下载模型与依赖,耗时较长;资料未提供处理时长、效果保证、收费或平台支持等更多信息。