分割视频等待进程完成

This commit is contained in:
Jerry Yan 2022-05-18 10:58:14 +08:00
parent 7a18d04cc7
commit ac314969d9
2 changed files with 5 additions and 2 deletions

View File

@ -213,6 +213,7 @@ def quick_split_video(file):
"{}.mp4".format(current_dt)
], stdout=subprocess.PIPE)
handle_ffmpeg_output(split_process.stdout)
split_process.wait()
current_sec += VIDEO_CLIP_EACH_SEC

View File

@ -31,7 +31,9 @@ def do_workflow(video_file, danmaku_base_file, *danmaku_files):
quick_split_video(filename)
# clean files
for filename in file_need_split:
if os.path.isfile(filename):
os.remove(filename)
for file in result:
if os.path.isfile(file):
os.remove(file)