Moviepy - avoid writing to disk with ImageSequenceClip?
<p>I am generating a significant number of images and writing them to disk. I then pass an array of the filenames to <code>ImageSequenceClip</code>. A major bottleneck is writing the images down to disk; is there a way to keep the images in memory then pass that to <code>ImageSequenceClip</code>, subsequently avoiding the time necessary to write/read to disk?</p>

<pre><code>filenames = []
for i in range(0, FRAMES):
    filename = "tmp/frame_%s.png" % (i)
    filenames.append(filename)
    center_x = IMG_WIDTH / 2
    center_y = IMG_HEIGHT - ((IMG_HEIGHT - i * HEIGHT_INC) / 2) 
    width = IMG_WIDTH - i * WIDTH_INC
    height = IMG_HEIGHT - i * HEIGHT_INC
    img = vfx.crop(img_w_usr_img, x_center=center_x, y_center=center_y, width=width, height=height)
    img = img.resize( (VID_WIDTH, VID_HEIGHT) )
    img.save_frame(filename)
    print "Proccessed: %s" % (filename)

seq = ImageSequenceClip(filenames, fps=FPS)
</code></pre>