Skip to content

Commit

Permalink
Merge pull request #131 from eritpchy/patch-12
Browse files Browse the repository at this point in the history
* 调整清理缓存文件时机至下一次运行前, 方便给开发人员分析错误
  • Loading branch information
YaoFANGUK authored May 29, 2022
2 parents 2fcd639 + 0cd026d commit f19c78f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def __init__(self, vd_path, sub_area=None):
# 临时存储文件夹
self.vd_name = Path(self.video_path).stem
self.temp_output_dir = os.path.join(os.path.dirname(config.BASE_DIR), 'output', str(self.vd_name))
# 删除缓存文件
self.empty_cache()
# 视频帧总数
self.frame_count = self.video_cap.get(cv2.CAP_PROP_FRAME_COUNT)
# 视频帧率
Expand Down Expand Up @@ -176,8 +178,6 @@ def run(self):
print(config.interface_config['Main']['FinishGenerateSub'], f"{round(time.time() - start_time, 2)}s")
self.update_progress(ocr=100, frame_extract=100)
self.isFinished = True
# 删除缓存文件
self.empty_cache()
self.lock.release()

def extract_frame_by_fps(self):
Expand Down

0 comments on commit f19c78f

Please sign in to comment.