自动投稿alpha

This commit is contained in:
2022-07-25 16:24:11 +08:00
parent 59f199db33
commit ef10d0bf0f
16 changed files with 1086 additions and 15 deletions

View File

@ -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():