内存泄露

This commit is contained in:
Bennett 2025-06-24 13:36:55 +08:00
parent 0bc0911b41
commit 405063c6b1
3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
streaming_assets = "/Users/bennett/Downloads/SDEZ/Package/Sinmai_Data/StreamingAssets"
output_folder = "result"
mcc = "MaichartConverter"
work = "/Users/bennett/PJCK/CCC/work"
work = "/Users/bennett/PJCK/CookiesChartConverter/work"

View File

@ -79,9 +79,9 @@ def convert_to_simai_folder(result,output_folder):
filename = os.path.basename(path)
try:
fn = filename[-6:-4]
if fn is "_L":
if fn == "_L":
num = 0
elif fn is "_R":
elif fn == "_R":
num = 1
else:
num = int(fn) # 提取 _00 → 0
@ -142,7 +142,7 @@ def convert_to_simai_folder(result,output_folder):
# 示例调用
if __name__ == "__main__":
music_ids = [643]
music_ids = [11692]
from config import output_folder
max_workers = 6 # 根据 CPU 和硬盘负载合理设置线程数

View File

@ -55,7 +55,7 @@ def process_video(input_file, output_file):
ffmpeg_cmd = [
"ffmpeg", "-y", "-i", input_file,
"-c:v", "h264_videotoolbox",
"-b:v", "5M", "-maxrate", "70M", "-bufsize", "100M",
"-b:v", "5000M", "-maxrate", "70M", "-bufsize", "100M",
"-c:a", "aac", "-b:a", "320k",
output_file
]
@ -65,7 +65,7 @@ def process_video(input_file, output_file):
"ffmpeg", "-y", "-i", input_file,
"-vf", f"pad={target_size}:{target_size}:{pad_x}:{pad_y}:black",
"-c:v", "h264_videotoolbox",
"-b:v", "5M", "-maxrate", "70M", "-bufsize", "100M",
"-b:v", "5000M", "-maxrate", "70M", "-bufsize", "100M",
"-c:a", "aac", "-b:a", "320k",
output_file
]