MCPcopy Create free account
hub / github.com/Francis-Rings/StableAnimator / export_to_video

Function export_to_video

train.py:336–343  ·  view source on GitHub ↗
(video_frames, output_video_path, fps)

Source from the content-addressed store, hash-verified

334
335
336def export_to_video(video_frames, output_video_path, fps):
337 fourcc = cv2.VideoWriter_fourcc(*"mp4v")
338 h, w, _ = video_frames[0].shape
339 video_writer = cv2.VideoWriter(
340 output_video_path, fourcc, fps=fps, frameSize=(w, h))
341 for i in range(len(video_frames)):
342 img = cv2.cvtColor(video_frames[i], cv2.COLOR_RGB2BGR)
343 video_writer.write(img)
344
345
346def export_to_gif(frames, output_gif_path, fps):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected