How do I make an mp4 video from a set of png images with the module imageio
? I've tried this:
import imageio
import glob
writer = imageio.get_writer('test.mp4', fps=20)
for png_path in glob.glob('*.png'):
im = imageio.imread(png_path),
writer.append_data(im[:, :, 1])
writer.close()
I've also tried replacing im[:, :, 1]
with im
. What am I doing wrong? I'm happy to use another module.