Use in-memory image data for frame access

A basic performance test shows about 40ms to extract a random frame from a
small 40s video, though this is not significantly better than writing to files.