Skip to content

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

write_videofile disable logger

harryb94cd353bada
diff --git a/app/services/video.py b/app/services/video.py
index 7cb1ec47..d43ac1eb 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")