MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / save_video

Function save_video

examples/WanVSR/infer_flashvsr_tiny.py:42–47  ·  view source on GitHub ↗
(frames, save_path, fps=30, quality=5)

Source from the content-addressed store, hash-verified

40 return t.to(dtype)
41
42def save_video(frames, save_path, fps=30, quality=5):
43 os.makedirs(os.path.dirname(save_path), exist_ok=True)
44 w = imageio.get_writer(save_path, fps=fps, quality=quality)
45 for f in tqdm(frames, desc=f"Saving {os.path.basename(save_path)}"):
46 w.append_data(np.array(f))
47 w.close()
48
49def compute_scaled_and_target_dims(w0: int, h0: int, scale: float = 4.0, multiple: int = 128):
50 if w0 <= 0 or h0 <= 0:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected