I have 69 folders of jpegs I want to turn into 69 quicktime timelapse movies. Rather than doing this one-at-a-time in Quicktime 7 Pro (Open Image Sequence, select first frame, choose 30 fps as the frame rate, wait for frames to assemble, save result while selecting "as reference movie", change the name of the resulting Quicktime from "Untitled.mov" to the corresponding jpeg folder name, repeat) -- is there an easy way to automate this?
1 Answer
Automator with some AppleScript will do this nicely. The frames need to be named consistently — blah1.jpg blah2.jpg blah3.jpg … blah50.jpg
etc. Each sequence you want to be a movie should be in its own folder.
- Open Automator and create a new workflow.
- Add the Get Specified Finder Items action and add each folder containing the sequences to the action.
Add the Run AppleScript action, with the following code:
on run {input, parameters} repeat with theFolder in input tell application "Finder" to set theSequence to first item of folder theFolder as alias tell application "QuickTime Player 7" activate open image sequence theSequence frames per second 30 set nameSequence to (theSequence as string) & ".mov" tell document 1 with timeout of 500 seconds save self contained in nameSequence end timeout end tell end tell end repeat end run
Run it, and you'll get a .mov
in each folder. Let me know if you have any questions.
The AppleScript code is adapted from this post at the Macworld Hints forum.
-
Thanks! Changed "save self contained in nameSequence" to "save in nameSequence" in order to save as QuickTime reference movie. Commented Nov 1, 2012 at 15:23
-
Here's the resulting video posted to YouTube: bit.ly/QXrstl Commented Nov 1, 2012 at 21:27
-
I tried your script and works perfect! Do you know how to change the compression settings to the same script, in order to use an Apple Prores for example? Otherwise works perfectly well, but it compress it as a Photojpeg codec. Thank you very much for the post– user57452Commented Sep 19, 2013 at 5:43
-
I don't know. I guess you could use MPEGStreamclip or Apple's Compressor to batch encode your photojpegs into Prores. Commented Sep 21, 2013 at 21:26