Automating Quicktime Image Sequence creation in Mountain Lion

quicktime

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?

Best 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.

  1. Open Automator and create a new workflow.
  2. Add the Get Specified Finder Items action and add each folder containing the sequences to the action.
  3. 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.