Quicktime Batch Convert

Hey everyone…

 I am new to applescript, so be nice. :)  I need Quicktime to do a batch export of movies I make, and I'm having trouble figuring it out.  Essentially I will have about 15-25 separate movies that need to be compressed and saved with the same name as the original files.  I can get QT to export one movie, but apparently I still haven't grasped how to properly utilize the repeat command.  Additionally, I can't seem to tell quicktime to save the movie it's exporting with the original name.  I know if I work at it I'll figure it out at some point, but I was hoping some of you kind people might shed some light on how to get there quicker.   I have gotten this far:

tell application “Finder”
open folder “green two:to convert”
open every item of window 1

end tell

tell application “QuickTime Player”
set movierecords to count movies
copy name of movie 1 to newfilename
export movie 1 as QuickTime movie using settings file “green two:exportsettings:Export to 320x240” to file “green two:converted:newfilename”
close movie 1
repeat until movierecords < 1
end repeat
end tell

Help!

thanks, Mike

Hi Simon

Try this:
Save as a application in script editor to open a bunch of files dropped on it

on open the_movie
	repeat with the_movie in the_movie
		tell application "QuickTime Player"
			open the_movie
		end tell
	end repeat
end open

Hope this partly helps

You might be interested in these threads:

QuickTime Export Droplet
QuickTime Export
QuickTime Settings File Help
Export QuickTime movie to image sequence

alatteri—looks cool… however it’s imperative that the conversion results in a quicktime movie, not just one in h.264 (hard to tell what yours can do). I already have ViddyUp! by splasm that does a pretty good job… only problem is they aren’t quicktime movies. Hence the applescript.

other guys— thanks i’ll see if that helps! :slight_smile:

Update!

I wrote a script that works, unfortunately however, it only works on one mac (a G5). Why would it work on one mac and not another (and yes I changed the appropriate references in the script on the other computer). Any ideas?

tell application “QuickTime Player”

set settings_file to ("Corral:website stuff:movie settings:320x240h264export" as string)
display dialog "How many sweet cues?" default answer "" buttons {"OK"} default button "OK"
set total_movies to the text returned of result
repeat total_movies times
	try
		with timeout of 1800 seconds
			set movie_name to name of movie 1
			set target_path to (("Corral:website stuff:successful conversion:" & movie_name) as string)
			export movie 1 as QuickTime movie using settings file "corral:website stuff:movie settings:320x240h264export" to file target_path
			close movie 1
		end timeout
	end try
end repeat
display dialog "Your sweet cues have been converted." buttons {"OK"} default button "OK"
with timeout of 50000 seconds
end timeout
quit

end tell

Do you have QuickTime Pro on both computers?

both have quicktime pro
both have the same version of quicktime
both have the same operating system version

one thing i did notice is that on the G5 (where it works) there are two Quicktime Libraries for applescript, however on the G4 there is only one-- they seem to be identical though…

if I simplify the script the following, I get the error (on the computer the original script won’t work on): “AppleScript Error-- Quicktime Player got an error: a file could not be found”… as though it can’t locate movie 1 (even though there is a movie open)

tell application “quicktime player”
set movie_name to name of movie 1
set target_path to ((“Cow barn 2:converted:” & movie_name) as string)
export movie 1 as QuickTime movie using most recent settings to file target_path
end tell