This code originates from Sebastian Schmieg's Search By Image, Recursively project.
I added a CLI wrapper to Sebastian's GIS class. You can call it like so:
This produces image files named 0000, 0001, etc, in the current working directory.
You can then run
images_to_movie.py to turn those images into a movie.
images_to_movie.py script requires that
ffmpeg be installed.
An example movie from these scripts is here.