Problem with Quicktime Player Save Export Settings

I’m running Quicktime Pro 6.4 and OS X 10.3. I’m trying to create a little script to save export settings so that I can batch convert a bunch of movies with those settings. I keep getting an error on it though, and I can’t seem to figure out what the problem is.


tell application "QuickTime Player"
	open theMovie
	save export settings movie 1 for QuickTime movie to choose file name
end tell

I keep getting an error -2107 from QuickTime Player on the save export settings line. I’ve tested it by setting theMovie to a couple different types of QuickTime movies with different compressors–muxed MPG1, and Photo JPEG.

Utlimately I’m hoping to create a script that will batch convert Avid codec Quicktime movies to motion JPEG A Quicktime movies. If I can create a settings file with all the specific motion JPEG A settings I need, that would make things much easier. So that’s what this first step is about. (I don’t have an Avid or motion JPEG A file to work with right now, but I figured I could create a settings file for something else as a starting point.)

Thanks for any help you can offer.

Jon

save export settings: Save an exporters settings
	save export settings reference  -- the movie to save export settings for
 		for AIFF/AVI/BMP/DV stream/Fast Start QTVR Movie/FLC/hinted movie/image sequence/interframe compressed VR object movie/MuLaw/MPEG2/MPEG4/picture/QuickTime media link/QuickTime movie/QuickTime TeXML/standard MIDI/System 7 sound/text file/ThreeGPP/wave -- the desired file type
 		to alias -- the destination file
 		[replacing boolean] -- should the original file be del

I don’t think the movie referance is correct.
So really this might be a way of doing this:


set theMovie to path:to:movie as alias
tell application "QuickTime Player"
	open theMovie
	save export settings theMovie to thisFile using settings preset thisPreset
end tell

it is also a goood idea to check that the file can export to the export type:

can export: Determine if a movie or track can be exported to the desired type
	can export reference  -- the movie or track to export
 		as AIFF/AVI/BMP/DV stream/Fast Start QTVR Movie/FLC/hinted movie/image sequence/interframe compressed VR object movie/MuLaw/MPEG2/MPEG4/picture/QuickTime media link/QuickTime movie/QuickTime TeXML/standard MIDI/System 7 sound/text file/ThreeGPP/wave -- the desired file type
	Result: boolean  -- is the export supported

But i think the main problem is that the types you are trying to export are not supported.

FYI, QuickTime Player is recordable. It might require that you have paid for QT to be able to manually execute the sequence (for the purpose of recording) that you are attempting to script, but if you have paid, recording might provide clues to the correct syntax.

– Rob

Problem solved.

Everyone had great ideas. The dictionary for Quicktime Player is correct. And yes, Quicktime Player is recordable but not the export function.

The “save export settings” function saves a file of the “Most Recent Settings” preset for the given file type to your drive. But you have to have done a manual export with the correct settings first for the Most Recent Settings preset to appear. I made the mistake of confusing an MPEG4 file with a Quicktime Movie encoded with the MPEG4 codec. I opened a movie and exported it as an MPEG4 file which gave me a Most Recent Settings for MPEG4 but since my AppleScript referenced Quicktime Movie and there wasn’t a Most Recent Settings, I got the error message.

So the initial code I posted is correct. One just has to do a manual export initially. In case anyone is unclear on the benefits of this, you wind up with a settings file that can be moved to any computer to specify that all your AppleScripted Quicktime exports conform to a certain standard. In my case I was looking for Quicktime movies with no audio track, encoded with the Motion JPEG A codec on the best setting at 30fps and 900KBps for use with Digidesign Pro Tools and an Aurora video card.

Thanks again for helping.

Jon