How to make movies with VPython
It is not possible to make movies within VPython animations yet.
Several ways were posted at
this FAQ.
Here is a similar method using different, and I believe simpler, free tools.
The two steps are: capture the VPython images with
PIL or
Pillow,
and string them together with FFmpeg to make a movie.

This will make a 20 fps (-r 20) movie from files numbered 000-max, with max=999 (%3d). Increase max to 9999 with %4d etc.

A complete example

Here is the working source code for the bouncing ball,
bounce.py.
If you have "ffmpeg.exe" in the path, the program will automatically make a
movie "movie.mp4". Download FFmpeg from
the official site
(32 bit static build is fine), or unzip
the version I use (9.6 MB) (old but works) into the
same folder as the Python program.

On Mac or Linux, one needs a wrapper for ImageGrab, as pointed out by Steve Spicklemire
here:
To get the 'bounce.py' program to work on the Mac I had to make two changes. Apparently PIL's ImageGrab is Windows only. I found this:

The pyscreenshot module claims to be cross platform (you can "pip install pyscreenshot"). The 'subprocess.call' takes a list of arguments as its first argument. On the mac at least if you pass a single string with embedded spaces it tries to find a single executable with that name (including the spaces!) which naturally fails. If I 'split' the string it appears to work.