长度不足时,直接跳过切割
This commit is contained in:
parent
2afd877937
commit
29034f42f3
@ -341,6 +341,9 @@ class WorkerThread(QThread):
|
|||||||
create_dt = datetime.strptime(_create_dt, "%Y%m%d_%H%M")
|
create_dt = datetime.strptime(_create_dt, "%Y%m%d_%H%M")
|
||||||
duration = self.get_video_real_duration(file)
|
duration = self.get_video_real_duration(file)
|
||||||
current_sec = 0
|
current_sec = 0
|
||||||
|
if duration < VIDEO_CLIP_EACH_SEC:
|
||||||
|
print("[-]Less than each sec, skip")
|
||||||
|
return
|
||||||
while current_sec < duration:
|
while current_sec < duration:
|
||||||
if (current_sec + VIDEO_CLIP_OVERFLOW_SEC * 2) > duration:
|
if (current_sec + VIDEO_CLIP_OVERFLOW_SEC * 2) > duration:
|
||||||
print("[-]Less than 2 overflow sec, skip")
|
print("[-]Less than 2 overflow sec, skip")
|
||||||
@ -385,18 +388,6 @@ class WorkerThread(QThread):
|
|||||||
return out_time
|
return out_time
|
||||||
|
|
||||||
|
|
||||||
class NvencWorkerThread(QThread):
|
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
class IntelWorkerThread(QThread):
|
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
class SplitWorkerThread(QThread):
|
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
def duration_str_to_float(duration_str) -> float:
|
def duration_str_to_float(duration_str) -> float:
|
||||||
_duration = datetime.strptime(duration_str, "%H:%M:%S.%f") - datetime(1900, 1, 1)
|
_duration = datetime.strptime(duration_str, "%H:%M:%S.%f") - datetime(1900, 1, 1)
|
||||||
return _duration.total_seconds()
|
return _duration.total_seconds()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user