Apr 27 2009
While this exact tutorial was not part of a Lab with Leo Laporte segment, it is based on one. In fact, the inspiration for the time lapse video part of the tutorial should be credited to Ryan Yewell who suggested it to me as a good segment idea to show off Automator to the People. Thanks Ryan!!
A word for those new to Automator
Automator is one of those nifty things that Apple added to Mac OS X in Tiger to help you put together rudimentary applications to do simple tasks on your computer. You could drag over little actions like building blocks and make a linear timeline of events and actions that would take place when the Automator application was run. But, back then it was first introduced, it wasn’t all that useful. There weren’t that many "blocks" to build with and, often, the time it took to create the application and run it was longer than it took to do the action manually.
Now with Leopard, Automator has improved a bit. You can now have the program record your actions (picking menu items from menus, etc.) while you do things that don’t currently have available Automator Actions to build with. Automator also interacts a bit better with iApps and the OS and includes a new variable system to allow you to use dates, names, etc. in your applications.
Automator is great for file processing, converting audio and images, making PDFs, email creation and tasks on the web. What it doesn’t do well is make decisions or work on multiple files in succession–it likes to take them all at once, so it can get bogged down.
With Automator, you can save Workflows, Applications (sometimes called Actions) and Plug-ins. Workflows launch within Automator where you can run them or edit them, so it is a good idea to save everything as a Workflow while you’re still testing things out. When you save as a stand-alone Application, will no longer launch Automator; it runs on its own. Saving as a Plug-in within an Automator friendly application allows your workflow to function as a feature of the application to which it is applied. How useful that is depends on the application.
Let’s get automating!
Make a time lapse slideshow for Flickr
This Automator workflow will take a picture with your Mac’s built-in iSight or connected webcam every 5 seconds for 5 minutes and then compile them sequentially into a QuickTime slideshow. It will then convert that movie to a format Flickr can display and email it to your Flickr account.
First, you should get a Flickr account if you don’t already have one; don’t worry, it’s free. Next for to http://www.flickr.com/account/uploadbyemail/ and you should see your special unique SECRET Flickr email address. You can email pictures and movies to this address and they will display on your Flickr photostream.
Once you’ve found your Flickr email address, open Automator and choose a Custom workflow.
Drag a Take Video Snapshot action from the list on the left to the workflow area on the right.
Click the "Where" pulldown menu and choose "Otherâ€¦" then create a new folder in your user account where you will have Automator save the video snapshots. Check the box next to "Take picture automatically."
The next action you’ll want to drag over is Pause. Set it for 5 seconds. You can come back and adjust this later, but it shouldn’t be much less than 5 seconds.
Drag a Loop action from the list at the left and set it to Loop automatically and stop after 5 minutes (you can change this value later too, but don’t make it go for too long or your computer will be tied up with nothing but this function and the resulting video may be too big to email or meet Flickr’s maximum file size limit). You can leave it set to "Use original input."
Finally, drag a New QuickTime Slideshow action over. Name your slideshow and point the action to "Where" your snapshots folder is. Put 1 second between slides. Default playback should be "Movie" and format should be "Self-Contained."
So far what you have is a pretty cool Automator workflow that will make a time lapse video. If we want it to upload to Flickr, we’re going to have to convert it to a format Flickr will accept. For some reason it doesn’t like the format QuickTime uses to make slideshow movies. Hmph!
Drag over an Export Movies action and set it for iPod Format, set the resulting file to be saved somewhere convenient (the Desktop works for meâ€¦I’m gonna just delete it when the Flickr upload is successful anyway) and tell it to "Delete original movies when done."
Now it’s time to ship this movie out. Drag over a New Mail Message action and plug in your secret Flickr email address into the "To:" field. Type a title for your time lapse movie into the "Subject:" field an that is what Flickr will use as the title in your Flickr stream. You can also add a description and tags automatically by entering them into the available fields by following the instructions Flickr has provided online. You can also specify which of you email accounts you want to use to send the movie if that matters to you.
The next two actions are simple and finish up our workflow.
Drag over an Add Attachments to Front Message and Automator will know to use the movie we’ve been making and the email message we started writing–it’s pretty smart.
Then drag over a Send Outgoing Messages action and Automator will send out your movie. Done!
If you just want to be able to run this every so often when the mood strikes you, save the workflow as an Application and run it in good health. If you’d like it to run on it’s own every day, follow on…
Save the project as a Plug-in for iCal. Go to the File menu and select Save As Plug-in… and a sheet will drop down in front of your project window. Give your workflow a name and set the "Plug-in for:" to "iCal Alarm" and click Save.
iCal will launch automatically and it will have a new event already created for the exact moment you saved the workflow (probably not the most convenient time). Go ahead and edit the event to occur at a good time and have the even repeat every day, week, month or year if you like.
When the specified date and time arrives, the workflow will kick into action and start taking snapshots, saving them to the folder you told it to and then when the 5 minutes are up it will create a QuickTime movie of the resulting slideshow. Right after that, it will convert the movie to iPod format and attach it to a Flickr-bound email and send it away.
One thing you should remember when using this workflow is to clear out the old snapshots from the folder before you use the workflow againâ€¦otherwise they will be in the next slideshow too!