Gotta go faster

This commit is contained in:
Leo Vasanko 2025-08-15 10:34:30 -06:00
parent 5084d1e0ed
commit fff23617ba

View File

@ -207,7 +207,13 @@ def process_video(path, *, maxsize, quality):
t_save_start = perf_counter()
crf = str(int(63 * (1 - quality / 100) ** 2)) # Closely matching PIL quality-%
ostream = ocontainer.add_stream(
"av1", options={"crf": crf, "usage": "realtime"}
"av1",
options={
"crf": crf,
"usage": "realtime",
"cpu-used": "8",
"threads": "1",
},
)
assert isinstance(ostream, av.VideoStream)
ostream.width = frame.width