pept.plots.make_video#

pept.plots.make_video(frames, output='video.avi', fps=10, verbose=True)[source]#

Stitch multiple images from frames into a video saved to output.

Parameters
framesstr or list[str]

Either a prefix for the frame names (e.g. “directory/frame*.png”) or a list of paths to individual frames.

outputstr, default “video.avi”

Name of output video.

fpsint, default 10

Number of frames per second.

Examples

Stitch all files matching a glob prefix: >>> from pept.plots import make_video >>> make_video(“lacey/frame*.png”, “lacey/video.avi”)

Stitch individual files: >>> make_video([“frame0.png”, “frame1.png”, “frame2.png”])