import gr import numpy as np from gr.pygr import mlab gr.beginprint('test.mp4') for _ in range(512): mlab.imshow(np.random.random((100, 100))) gr.endprint()