Folder Action to Mask a QT movie

Hi,

I’m trying to create a Folder action which applies a mask to a QuickTime movie and then saves the movie to a output folder, the steps are below:

  1. Drop QuickTime movie into “Input” folder.
  2. Run script to apply mask.
  3. Save QuickTime movie to “Output” folder.

The folder structure would be:

Mask App (folder)
– Input (folder)
– Mask.psd
– Output (folder)

I recorder the following script which works but I’m not sure how to make it work with any file name so that I can batch process files??

tell application “QuickTime Player”
activate
copy movie “Mask.psd”
select window “Quicktime.mov”
add movie “Quicktime.mov” with scaled
set show detailed movie info window of movie “Quicktime.mov” to true
set transfer mode of track “Video Track 2” of movie “Quicktime.mov” to premul white alpha
set show detailed movie info window of movie “Quicktime.mov” to false
save movie “Quicktime.mov” in file “Work:Output:Quicktime.mov” as self contained
end tell

Any help making the script generic and attaching to a containing folder would be greatley appreciated.

Michael.

The scrip below works but I would like to refine it in a number of ways:

  1. I would like to be able to batch process QuickTime movies by either making a folder selection or dropping the files into a folder action folder.

  2. On saving I would like to save the file with a timestamp to overcome the file exist error… or you may have a better soloution?

(* Batch process QuickTime movies to add a custom mask. Create a mask file in PhotoShop by making a new file say 320x240px with a transparent background and add a new layer and draw the mask, use blur to create a soft edge. save the mask as “mask.psd” into the “AutoMask” folder. *)

tell application “QuickTime Player”
activate
open file “Work:WAF - Lightworks:AutoMask:mask.psd” – Path to PhotoShop mask
set position of window “mask.psd” to {20, 50} – Position mask on screen
copy movie “mask.psd”
open file “Work:WAF - Lightworks:AutoMask:movie.mov” – Path to QuickTime movie
set position of window “movie.mov” to {380, 50} – Position movie on screen
select window “movie.mov”
add movie “movie.mov” with scaled – Paste mask onto QuickTime movie
set show detailed movie info window of movie “movie.mov” to true
set transfer mode of track “Video Track 2” of movie “movie.mov” to premul white alpha – For Video Track 2 to work make sure your movies only have 1 video track
save movie “movie.mov” in file “Work:WAF - Lightworks:AutoMask:Output:new_movie.mov” as self contained
beep
close movie “new_movie.mov”
end tell