Hey,
I bumped into a great script for watch folders by using Apple Compressor settings (but without droplet). You can create a folder action which triggers a file to be transcoded using a specified compressor setting, I can’t take the credit as I found it here:
http://backtotheedit.com/2011/06/compressor-files-with-a-watch-folder/
Potentially it could be very useful and seems to work but with two rather annoying caveats.
Firstly if you make a wmv or an mpg the file is given the same suffix as the master file (so a .mov file converted to a .mpg will still be an mov).
Secondly if you have it make two quicktime files with the same name it will overwrite one rather than calling the second something different.
The solution is to add something that forces a unique file name to the freshly created files and for the script to specify the relevant output suffix for the file.
I dont think either of these problems are insurmountable if you have a better knowledge of Applescript than me. I’ve been playing with it the last couple of days but just cant figure out a solution, I wonder if anyone had any ideas?
Many thanks in advance.
Angus
- Set theDestFolder to where the file should be compressed to
property theDestFolder : "~/Desktop/Watch Folders/Output/"
-- Set theSettingsPath to the Compressor Setting you want to use
property theSettingsPath : "~/Library/Application Support/Compressor/custom.setting"
-- Set theBatchName to what you want the batch to be called in Batch Monitor
property theBatchName : "Watch Folder Batch"
-- Set theClusterName to the name of the cluster you want to use
property theClusterName : "This Computer"
-- SECTION B
on adding folder items to this_folder after receiving these_items
set theScript to "/Applications/Compressor.app/Contents/MacOs/Compressor -clustername " & quoted form of theClusterName & " -batchname " & quoted form of theBatchName
set sizeA to 1
set sizeB to 0
-- SECTION C
-- Wait until the files are copied over to submit to Compressor
repeat while sizeA ≠sizeB
set sizeA to sizeB
set sizeB to 0
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
set sizeB to sizeB + (size of (info for this_item))
end repeat
delay 5
end repeat
-- SECTION D
-- Write Command to send to shell
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
set theJobPath to quoted form of POSIX path of this_item
tell application "Finder" to set theDestFileName to (name of this_item)
set theDestPath to theDestFolder & theDestFileName
set theScript to theScript & " -jobpath " & theJobPath & " -settingpath " & quoted form of theSettingsPath & " -destinationpath " & quoted form of theDestPath
end repeat
-- SECTION E
-- Send Command
do shell script theScript
end adding folder items to