From 05f421767ae0089180fffe3fcfd2bce2953c1646 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 17 May 2022 15:51:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BF=87=E7=9F=AD=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E7=BB=A7=E7=BB=AD=E5=89=AA=E5=88=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/video.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workflow/video.py b/workflow/video.py index 87c2fa1..35a778c 100644 --- a/workflow/video.py +++ b/workflow/video.py @@ -210,6 +210,9 @@ def quick_split_video(file): duration = duration_str_to_float(_duration_str) current_sec = 0 while current_sec < duration: + if (current_sec + VIDEO_CLIP_OVERFLOW_SEC * 2) > duration: + print("[-]Less than 2 overflow sec, skip") + break current_dt = (create_dt + timedelta(seconds=current_sec)).strftime("%Y%m%d_%H%M_") print("CUR_DT", current_dt) print("BIAS_T", current_sec)