To capture this I set up an old MacBook with the browser open at the map view. The page has a refresh time of 1200 seconds built in. MacOS has a command line screencapture utility so I created the following cron job to run it every 20 minutes and save the capture to a PNG image named with the date and time. The movie is running at six frames per second.
#!/bin/bash
now=`date "+%Y-%m-%d_%H-%M-%S"`
/usr/sbin/screencapture /Users/marksp/wsprcaps/${now}.png
The cron job looks like this:
*/20 * * * * /Users/marksp/capture.sh
I disabled the screen save and sleep, in the Energy Saver control panel.
After a while images build up in the output directory.
The best way I know to turn the image sequence into a movie is to get a copy of Quicktime 7 for Snow Leopard from the install CD (the current Quicktime Player doesn't have this feature).
Quicktime needs the images to have increasing sequential numbers in the file, a little python does the trick:
import os
START_PATH = '.'
count = 1 # number to start with
for dirname, dirnames, filenames in os.walk(START_PATH):
for filename in filenames:
if filename.startswith("2011"):
newname = "%03d.png" % count
count += 1
print filename, newname
os.rename(os.path.join(dirname, filename),
os.path.join(dirname, newname))
Quicktime 7 (Pro) can open an image sequence and you can set the frame rate.
Then you choose the frame rate.
Finally I saved the movie and uploaded it to YouTube.
No comments:
Post a Comment