You've already forked my-video-workflow
自动投稿alpha
This commit is contained in:
@ -168,6 +168,7 @@ def quick_split_video(file):
|
||||
_duration_str = get_video_real_duration(file)
|
||||
duration = duration_str_to_float(_duration_str)
|
||||
current_sec = 0
|
||||
_video_parts = []
|
||||
while current_sec < duration:
|
||||
if (current_sec + VIDEO_CLIP_OVERFLOW_SEC * 2) > duration:
|
||||
print("[-]Less than 2 overflow sec, skip")
|
||||
@ -185,7 +186,12 @@ def quick_split_video(file):
|
||||
], stdout=subprocess.PIPE)
|
||||
handle_ffmpeg_output(split_process.stdout)
|
||||
split_process.wait()
|
||||
_video_parts.append({
|
||||
"base_path": VIDEO_OUTPUT_DIR,
|
||||
"file": "{}.mp4".format(current_dt),
|
||||
})
|
||||
current_sec += VIDEO_CLIP_EACH_SEC
|
||||
return _video_parts
|
||||
|
||||
|
||||
def _common_ffmpeg_setting():
|
||||
|
Reference in New Issue
Block a user