Created
January 29, 2009 22:09
-
-
Save alcides/54800 to your computer and use it in GitHub Desktop.
Script to take a few screenshots of your Mac desktop and make a movie.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| folder = "/Users/alcides/Desktop/timelapse" | |
| puts "recording..." | |
| 1.upto 60 do | |
| `screencapture -xC #{folder}/#{Time.now.strftime("%I-%M-%S")}.tiff` | |
| sleep 30 | |
| end | |
| puts "converting..." | |
| `ls #{folder}`.split("\n").each do |i| | |
| f = [folder,i].join("/") | |
| n = f.sub "tiff","png" | |
| `convert #{f} -resize 25% #{n}` | |
| end | |
| puts "removing originals" | |
| `rm #{folder}/*.tiff` | |
| `mencoder -ovc lavc -mf type=png:fps=30 -o movie.avi mf://#{folder}/*.png` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment