Re: Recording and Exporting Video with QuickTime and AppleScript
Re: Recording and Exporting Video with QuickTime and AppleScript
- Subject: Re: Recording and Exporting Video with QuickTime and AppleScript
- From: Brennan <email@hidden>
- Date: Tue, 16 Feb 2010 20:33:00 +0100
On 08/02/10 at 11:57, Karlton Hughes wrote:
I am trying to create an AppleScript using the QuickTime 7
application. The script is supposed to simplify the process of
recording video and saving it as an MP4 file onto a flash
drive. So the step the script is to take is...
1. Prompt User to Record video from the camera [DONE]
2. Prompt User to Stop Recording [DONE]
3. Check to see if an external disk exists (If so most likely a
flash drive) [In Progress...]
4. Save the movie USING SETTINGS File to the flash drive [Stumped]
5. Ask if the user wants to record another movie [DONE]
I want to be able to use the SAVE EXPORT SETTINGS command to
keep the settings for when I do the export in number 4. As of
now, the following doesn't seem to produce a file...
tell application "QuickTime Player 7"
activate
set QTexportSettings to "QTexportSettings"
save export settings for MPEG4 to file QTexportSettings
end tell
Can anyone tell me what the problem might be?
It has been a while since I did this, but here are my notes dug
out of an Appleworks (!) file I made on the subject in 2003:
If you want a very specific set of settings to be used, make one
export manually - using a short or small dummy file if
necessary, but be sure to set up the export correctly!
Following this, you can include ‘using most recent settings’
as an optional parameter, and the settings you have just used
will be reemployed. This is quite simple, and it’s very easy
to ‘tweak’ the settings by doing a manual export with adjustments.
It’s likely though, that you may need to export in a couple of
different formats, and possibly with different settings in a
single script. In this case you will need to use a QuickTime
export settings file (type ‘qtes’). These files will need to
be exported using Applescript after a *manual* export with the
correct settings.
A good way to think of this is that you are saving ‘the most
recent settings’ for reuse later.
To save a qtes file use the save export settings command:
set f to (choose file name)
tell application "QuickTime Player"
tell document 1
save export settings for picture to f with replacing
end tell
end tell
Notice that this command is targeted to a document (movie).
You can not save a qtes file without targeting a document,
because different kinds of movie allow or prevent different
kinds of export.
Targeting a movie prevents writing a meaningless qtes file for a
‘non export’. Again, the ‘with replacing’ parameter will
allow any existing file at the same location to be replaced.
Hope this helps.
--
Brennan Young
A pure description would include all the facts (i.e., all the
effective differences) immanent in the phenomena to be described
but would indicate no kind of connection among these phenomena
that might make them more understandable.
- Gregory Bateson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden