From b94cd353bada9acd45eb9d94b6c997792391d4e6 Mon Sep 17 00:00:00 2001 From: harry Date: Wed, 3 Apr 2024 18:11:29 +0800 Subject: [PATCH] write_videofile disable logger --- app/services/video.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/video.py b/app/services/video.py index 7cb1ec4..d43ac1e 100644 --- a/app/services/video.py +++ b/app/services/video.py @@ -223,7 +223,7 @@ def generate_video(video_path: str, temp_output_file = f"{output_file}.temp.mp4" logger.info(f"writing to temp file: {temp_output_file}") - result.write_videofile(temp_output_file, threads=params.n_threads or 2) + result.write_videofile(temp_output_file, threads=params.n_threads or 2, logger=None) video_clip = VideoFileClip(temp_output_file) @@ -243,7 +243,7 @@ def generate_video(video_path: str, video_clip = video_clip.set_duration(original_duration) logger.info(f"encoding audio codec to aac") - video_clip.write_videofile(output_file, audio_codec="aac", threads=params.n_threads or 2) + video_clip.write_videofile(output_file, audio_codec="aac", threads=params.n_threads or 2, logger=None) os.remove(temp_output_file) logger.success(f"completed")