Cleanup and deterministic output

This commit is contained in:
2026-07-14 09:41:59 +00:00
committed by de4dn0te
parent 3c48ed082b
commit 7fcbe8d8e7
2 changed files with 19 additions and 21 deletions
+18 -21
View File
@@ -304,33 +304,30 @@ try:
if args.output_type != "mask_seq":
# Output video
output_file = pathlib.Path(args.o) / ("output.mov")
output_file.parent.mkdir(exist_ok=True, parents=True)
stream = ffmpeg.input(
os.path.join(processed_dir, "%04d.tiff"),
r=framerate,
f="image2",
s=whstr,
pix_fmt="yuva420p",
)
stream = ffmpeg.output(
stream, str(output_file), vcodec="prores_ks", **{"profile:v": "4"}
)
"""
stream = ffmpeg.output(
stream,
output_file,
vcodec="libvpx-vp9",
pix_fmt="yuva420p",
**{
"crf": "23",
"b:v": "0",
"auto-alt-ref": "0",
},
)
"""
if args.output_type == "mask":
output_file = pathlib.Path(args.o) / ("output.mp4")
output_file.parent.mkdir(exist_ok=True, parents=True)
stream = ffmpeg.output(
stream,
str(output_file),
vcodec="libx264",
pix_fmt="gray",
crf=0,
preset="veryslow",
tune="animation",
)
else:
output_file = pathlib.Path(args.o) / ("output.mov")
output_file.parent.mkdir(exist_ok=True, parents=True)
stream = ffmpeg.output(
stream, str(output_file), vcodec="prores_ks", **{"profile:v": "4"}
)
ffmpeg.run(stream, overwrite_output=True)