Commit 99620bf0 authored by smile2019's avatar smile2019

fix:中文字幕位置推荐,视频较短时越界报错

parent 464b8e26
......@@ -59,6 +59,8 @@ def evaluate_position(video_path: str, start_time: float) -> Tuple[float, float]
for j in range(10):#每个阶段取10帧
for k in range(120):#隔120帧取一帧
_,frame = video.read()
if (j+1)*120+frame_index>frame_num:
break
_,frame = video.read()
res = ocr.ocr(frame, cls=True)
for result_item in res:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment