Skip to content

Commit 6512e3f

Browse files
authored
Merge pull request #461 from harry0703/dev
Optimize memory usage in moviepy
2 parents 84ae8e5 + 931e1a0 commit 6512e3f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/config/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def save_config():
5656
"project_description",
5757
"<a href='https://github.com/harry0703/MoneyPrinterTurbo'>https://github.com/harry0703/MoneyPrinterTurbo</a>",
5858
)
59-
project_version = _cfg.get("project_version", "1.1.9")
59+
project_version = _cfg.get("project_version", "1.2.0")
6060
reload_debug = False
6161

6262
imagemagick_path = app.get("imagemagick_path", "")

app/services/video.py

+2
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ def create_text_clip(subtitle_item):
298298
fps=30,
299299
)
300300
video_clip.close()
301+
del video_clip
301302
logger.success("completed")
302303

303304

@@ -342,6 +343,7 @@ def preprocess_video(materials: List[MaterialInfo], clip_duration=4):
342343
video_file = f"{material.url}.mp4"
343344
final_clip.write_videofile(video_file, fps=30, logger=None)
344345
final_clip.close()
346+
del final_clip
345347
material.url = video_file
346348
logger.success(f"completed: {video_file}")
347349
return materials

webui/i18n/zh.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
"You can download the generated video from the following links": "你可以从以下链接下载生成的视频",
5757
"Basic Settings": "**基础设置** (:blue[点击展开])",
5858
"Language": "界面语言",
59-
"Pexels API Key": "Pexels API Key ([点击获取](https://www.pexels.com/api/))",
60-
"Pixabay API Key": "Pixabay API Key ([点击获取](https://pixabay.com/api/docs/#api_search_videos))",
59+
"Pexels API Key": "Pexels API Key ([点击获取](https://www.pexels.com/api/)) :red[推荐使用]",
60+
"Pixabay API Key": "Pixabay API Key ([点击获取](https://pixabay.com/api/docs/#api_search_videos)) :red[可以不用配置,如果 Pexels 无法使用,再选择Pixabay]",
6161
"LLM Provider": "大模型提供商",
6262
"API Key": "API Key (:red[必填,需要到大模型提供商的后台申请])",
6363
"Base Url": "Base Url (可选)",

0 commit comments

Comments
 (0)