mirror of
https://gitea.cookies.4d.ink/Cookies/CookiesChartConverter.git
synced 2025-10-26 03:12:38 +00:00
内存泄露
This commit is contained in:
parent
0bc0911b41
commit
405063c6b1
@ -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"
|
||||
@ -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 和硬盘负载合理设置线程数
|
||||
|
||||
|
||||
@ -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
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user