fix the bug where clip were not closed
This commit is contained in:
@@ -100,17 +100,18 @@ def combine_videos(combined_video_path: str,
|
|||||||
clips.append(clip)
|
clips.append(clip)
|
||||||
video_duration += clip.duration
|
video_duration += clip.duration
|
||||||
|
|
||||||
final_clip = concatenate_videoclips(clips)
|
video_clip = concatenate_videoclips(clips)
|
||||||
final_clip = final_clip.set_fps(30)
|
video_clip = video_clip.set_fps(30)
|
||||||
logger.info(f"writing")
|
logger.info(f"writing")
|
||||||
# https://github.com/harry0703/MoneyPrinterTurbo/issues/111#issuecomment-2032354030
|
# https://github.com/harry0703/MoneyPrinterTurbo/issues/111#issuecomment-2032354030
|
||||||
final_clip.write_videofile(filename=combined_video_path,
|
video_clip.write_videofile(filename=combined_video_path,
|
||||||
threads=threads,
|
threads=threads,
|
||||||
logger=None,
|
logger=None,
|
||||||
temp_audiofile_path=output_dir,
|
temp_audiofile_path=output_dir,
|
||||||
audio_codec="aac",
|
audio_codec="aac",
|
||||||
fps=30,
|
fps=30,
|
||||||
)
|
)
|
||||||
|
video_clip.close()
|
||||||
logger.success(f"completed")
|
logger.success(f"completed")
|
||||||
return combined_video_path
|
return combined_video_path
|
||||||
|
|
||||||
@@ -263,7 +264,7 @@ def generate_video(video_path: str,
|
|||||||
logger=None,
|
logger=None,
|
||||||
fps=30,
|
fps=30,
|
||||||
)
|
)
|
||||||
|
video_clip.close()
|
||||||
logger.success(f"completed")
|
logger.success(f"completed")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user