YaoFANGUK / video-subtitle-extractor

视频硬字幕提取,生成srt文件。无需申请第三方API,本地实现文本识别。基于深度学习的视频字幕提取框架,包含字幕区域检测、字幕内容提取。A GUI tool for extracting hard-coded subtitle (hardsub) from videos and generating srt files.
Apache License 2.0
5.99k stars 663 forks source link

建议当磁盘空间不足时自动暂停或有空间后自动恢复 #52

Open royzengyi opened 2 years ago

royzengyi commented 2 years ago

目前版本当磁盘空间不足时好像会一直循环报错,但当磁盘空间恢复后(发现出错手动删除其他文件腾出几个G的空间)却没有恢复执行,还是一直报错不能生成字幕。我的电脑显卡性能不太好,一部影片基本要一两天。遇到这种情况只能从头再来。 所以想能不能当遇到磁盘空间不足时能自动暂停,等空间恢复后能手动或自动继续。当然这只是个优化,目前的功能已经很强大了!

附上错误日志 --- Logging error --- Traceback (most recent call last): File "D:\vse\Python\lib\logging__init.py", line 1089, in emit self.flush() File "D:\vse\Python\lib\logging__init.py", line 1069, in flush self.stream.flush() OSError: [Errno 22] Invalid argument Call stack: File "D:\vse\Python\lib\threading.py", line 890, in _bootstrap self._bootstrap_inner() File "D:\vse\Python\lib\threading.py", line 932, in _bootstrap_inner self.run() File "D:\vse\Python\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "D:\vse\resources\main.py", line 118, in run self.extract_frame_by_det() File "D:\vse\resources\main.py", line 278, in extract_frame_by_det if self._compare_ocr_result(frame_last, frame): File "D:\vse\resources\main.py", line 867, in _compare_ocr_result area_text1 = "".join(self.get_area_text(self.ocr.predict(img1))) File "D:\vse\resources\main.py", line 36, in predict detection_box, recognise_result = self.recogniser(image) File "D:\vse\resources\backend\tools\infer\predict_system.py", line 109, in call__ logger.info("rec_res num : {}, elapse : {}".format( Message: 'rec_res num : 9, elapse : 0.05385446548461914'

eritpchy commented 2 years ago

太慢了 你搞块显卡能快100倍呢, 节约时间就是给自己省钱