Apple Script Quicktime Help - Is this possible?

Discussion in 'Mac Programming' started by MacintoshMan, May 3, 2011.

  1. MacintoshMan, May 3, 2011
    Last edited: May 3, 2011

    MacintoshMan macrumors regular

    Feb 16, 2006
    Primary Application: Quicktime Player 7, the Finder.

    Background: I work for a Visual Effects Studio.

    Goal of script: Part of one of our employees jobs is to process "offlines" (basically a bunch of different low quality scene shots organized together as a reference for work that needs to be done) for tv shows that we get and export certain scenes in this offline (the ones we've been payed to work on) as Image Sequences (scene cut into individual frames) so the vfx artist may have a reference.

    And with that exporting comes a procedure of creating a specific folder for the offline image sequence and creating the image sequence with the proper parameters (JPEG sequence + Highest quality available)

    I wanted to simplify that process with a script.

    Show A sends us a 5:00minute mp4 offline. Shot 01x01 found at 00:10 thru 00:20 in the mp4 needs to be converted into a jpeg image sequance.

    the steps that would normally be followed would be
    0) Open offline (mp4)
    1) set your "i"(in-marker) at 00:10 and your "o"(out-marker) at 00:20
    2) Command+C = copy selection you have just made
    3) Command +N = New Quicktime then Command + V = paste selection
    4) File>Export (now name your shot "01x01-Offline_" (shots are watermarked with name) and create destination folder "01x01-Offline")
    then select "Movie to image sequence" from drop down menu, then select "options" and change to JPEG from PNG then selection "Options" in this window and move slider to "best possible" for quality.
    5)Click save and you are done.

    I'd like to slim that down to.
    1) Open Offline and manually set your desired "i" an"o"
    2) Run Script

    Script basic = I need this script to take the selection i've made and create an image sequence of it.

    Script Details= All the shot folders have been automatically created, so the script needs to list the pre-made folder selections from the directory the Offline had been opened from.

    This needs to Generate a selection prompt that the user may select the proper shot this is.

    From here its easy. You just use the export command in the Apple Script Library with the correct paramaters

    Currently I am stuck at finding the proper term for "Copy Selection" as selection is not apart of the dictionary.

    Any help is appreciated!
  2. ccamelot macrumors member


    Feb 21, 2010
    You don't need to copy selection...


    maybe this approach will work for you: don't copy selection, just trim and export.

    tell application "QuickTime Player 7"
    	set pb to front window
    	tell document of pb
    		set selection start to somevalue
    		set selection duration to somelength
    	end tell
    	trim document of pb
    	export document of pb to ("/yourFolder/imageName" as POSIX file) as image sequence
    end tell
    it SHOULD work :)

    all best

Share This Page