Bug-Fixing
This commit is contained in:
@@ -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']
|
height = ffprobe_dim['streams'][0]['height']
|
||||||
|
|
||||||
svtav1_param_list = [
|
svtav1_param_list = [
|
||||||
f"--width {width}",
|
"--input-depth", "10",
|
||||||
f"--height {height}",
|
"--width", str(width),
|
||||||
f"--input-depth 10"
|
"--height", str(height)
|
||||||
]
|
]
|
||||||
for k, v in SVT_AV1_PARAMS.items():
|
for k, v in SVT_AV1_PARAMS.items():
|
||||||
if isinstance(v, bool):
|
if isinstance(v, bool):
|
||||||
v = int(v)
|
v = int(v)
|
||||||
svtav1_param_list.append(f"--{k} {v}")
|
svtav1_param_list += [f"--{k}", str(v)]
|
||||||
svtav1_param_str = " ".join(svtav1_param_list)
|
print(f" - Using SvtAv1EncApp parameters: {' '.join(svtav1_param_list)}")
|
||||||
print(f" - Using SvtAv1EncApp parameters: {svtav1_param_str}")
|
|
||||||
|
|
||||||
# ffmpeg: always output yuv420p10le (10-bit), even if input is 8-bit
|
# ffmpeg: always output yuv420p10le (10-bit), even if input is 8-bit
|
||||||
ffmpeg_pipe_cmd = [
|
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", "-"
|
"-pix_fmt", "yuv420p10le", "-f", "yuv4mpegpipe", "-an", "-sn", "-dn", "-map", "0:v:0", "-"
|
||||||
]
|
]
|
||||||
svtav1_cmd = [
|
svtav1_cmd = (
|
||||||
"SvtAv1EncApp2", "-i", "-", "-b", str(encoded_video_file)
|
["SvtAv1EncApp2"] + svtav1_param_list + ["-i", "-", "-b", str(encoded_video_file)]
|
||||||
] + svtav1_param_list
|
)
|
||||||
|
|
||||||
print(f" - Running: {' '.join(ffmpeg_pipe_cmd)} | {' '.join(svtav1_cmd)}")
|
print(f" - Running: {' '.join(ffmpeg_pipe_cmd)} | {' '.join(svtav1_cmd)}")
|
||||||
# Use subprocess.Popen for piping
|
# Use subprocess.Popen for piping
|
||||||
|
|||||||
Reference in New Issue
Block a user