长度不足时,直接跳过切割

This commit is contained in:
Jerry Yan 2022-09-14 10:57:36 +08:00
parent 2afd877937
commit 29034f42f3

View File

@ -341,6 +341,9 @@ class WorkerThread(QThread):
create_dt = datetime.strptime(_create_dt, "%Y%m%d_%H%M")
duration = self.get_video_real_duration(file)
current_sec = 0
if duration < VIDEO_CLIP_EACH_SEC:
print("[-]Less than each sec, skip")
return
while current_sec < duration:
if (current_sec + VIDEO_CLIP_OVERFLOW_SEC * 2) > duration:
print("[-]Less than 2 overflow sec, skip")
@ -385,18 +388,6 @@ class WorkerThread(QThread):
return out_time
class NvencWorkerThread(QThread):
...
class IntelWorkerThread(QThread):
...
class SplitWorkerThread(QThread):
...
def duration_str_to_float(duration_str) -> float:
_duration = datetime.strptime(duration_str, "%H:%M:%S.%f") - datetime(1900, 1, 1)
return _duration.total_seconds()