Bug-Fixing

This commit is contained in:
2025-08-02 13:39:57 +02:00
parent 2f41da6e49
commit e35ca9e634

View File

@@ -172,25 +172,25 @@ def convert_video(source_file_base, source_file_full, is_vfr, target_cfr_fps_for
height = ffprobe_dim['streams'][0]['height']
svtav1_param_list = [
f"--width {width}",
f"--height {height}",
f"--input-depth 10"
"--input-depth", "10",
"--width", str(width),
"--height", str(height)
]
for k, v in SVT_AV1_PARAMS.items():
if isinstance(v, bool):
v = int(v)
svtav1_param_list.append(f"--{k} {v}")
svtav1_param_str = " ".join(svtav1_param_list)
print(f" - Using SvtAv1EncApp parameters: {svtav1_param_str}")
svtav1_param_list += [f"--{k}", str(v)]
print(f" - Using SvtAv1EncApp parameters: {' '.join(svtav1_param_list)}")
# ffmpeg: always output yuv420p10le (10-bit), even if input is 8-bit
ffmpeg_pipe_cmd = [
"ffmpeg", "-hide_banner", "-v", "quiet", "-stats", "-y", "-i", ut_video_full_path,
"ffmpeg", "-hide_banner", "-v", "quiet", "-y", "-i", ut_video_full_path,
"-strict", "-1",
"-pix_fmt", "yuv420p10le", "-f", "yuv4mpegpipe", "-an", "-sn", "-dn", "-map", "0:v:0", "-"
]
svtav1_cmd = [
"SvtAv1EncApp2", "-i", "-", "-b", str(encoded_video_file)
] + svtav1_param_list
svtav1_cmd = (
["SvtAv1EncApp2"] + svtav1_param_list + ["-i", "-", "-b", str(encoded_video_file)]
)
print(f" - Running: {' '.join(ffmpeg_pipe_cmd)} | {' '.join(svtav1_cmd)}")
# Use subprocess.Popen for piping