Important: The information in this document is obsolete and should not be used for new development.
QuickTime 5 introduces a number of new changes and additions, designed to extend AppleScript support in QuickTime Player. A suite of new editing features and commands, including clipboard support, are introduced for the first time. Cut, copy, and paste are among the new commands. The new editing features and commands can be used to automate many movie-editing and playback tasks.
Other AppleScript-supported features in this release are useful for QuickTime authors or content creators who need to automate certain processes, such as the batch preparation of QuickTime movies. Using these features, you can do more sophisticated types of processing. For example, you can tweak the settings of a QuickTime movie before you actually perform an export, or export them and then tweak the settings.
Refer to <http://www.apple.com/applescript/qtas5/qtas5p2.htm> for
a collection of example scripts available in QuickTime 5. These
include script applets, droplets, and compiled scripts, one of which
is explained in the section “Adding Media Skins Using the QuickTime API.”
For more information concerning QuickTime Player scripting and AppleScript,
refer to the AppleScript website at www.apple.com/applescript/.
This section describes the new features available to content authors and creators in QuickTime 5.
Additional Commands
Application Class Changes
Favorite Class Changes
Movie Class Changes
Track Class Changes
Additional Classes
Export Event Changes
Other Changes
The following AppleScript commands are new to QuickTime 5, and are accessible through clipboard or Edit menu operations:
add reference -- movie
[scaled boolean] -- should added content be scaled to the duration of current selection?
clear reference -- movie
copy reference -- movie
cut reference -- movie
make (for creating an empty movie only)
open image sequence reference -- image file representing beginning of image sequence
[frames per second small real] -- the number of frames desired per second
[seconds per frame small real] -- the duration of each frame in seconds
paste reference -- movie
redo reference -- movie
trim reference -- movie
undo reference -- movie
The standard AppleScript command:
delete reference -- movie (for favorites and tracks only)
Additional application element:
display by numeric index
Updated application property:
QuickTime connection speed 14.4 Modem/28.8/33.6 Modem/56K Modem/ ISDN/112K Dual ISDN/256 Kbps/384 Kbps/512 Kbps/768 Kbps/1 Mbps/T1/Intranet/LAN [r/o] -- the current connection speed (set in the QuickTime Control Panel)
Additional application properties:
ignore auto play boolean -- ignore requests to auto-play movies upon opening?
ignore auto present boolean -- ignore requests to auto-present movies upon opening?
Addition of two elements:
file by numeric index
internet location by numeric index
Additional movie properties.
Note that the following are runtime-only properties, taking effect immediately when you set them:
close when done
quit when done
Some of the following are auto properties (persistent), i.e., they are saved with the movie. If you set them, they don’t take effect until the next time you open the movie.
auto close when done boolean -- will the movie automatically close when done playing? (saved with movie)
auto play boolean -- will the movie automatically start playing? (saved with movie)
auto present boolean -- will the movie automatically start presenting? (saved with movie)
auto quit when done boolean -- will the player automatically quit when done playing? (saved with movie)
close when done boolean -- close when done playing? (not saved with movie)
quit when done boolean -- quit the application when this movie is done playing? (not saved with movie)
controller type standard/qtvr/none -- the type of controller associated with the movie
live stream boolean [r/o] -- is this a live streaming movie?
stored stream boolean [r/o] -- is this a stored streaming movie?
local playback boolean [r/o] -- is this a local movie?
fast start boolean [r/o] -- is this a fast-start movie?
max time loaded integer [r/o] -- the amount of time loaded in a fast start movie
preferred rate small real -- the preferred rate of the movie
presentation size half/normal/double/screen/current -- size at which the movie will be presented
presentation mode normal/slide show -- mode in which the movie will be presented
preview 'csel' -- start time and end time of the movie preview
href international text [r/o] -- the internet location to open when clicking on the movie (overrides track hrefs)
plugin settings list [r/o] -- the QuickTime Plugin settings stored in the movie
saveable boolean -- can the movie be saved?
load state integer [r/o] -- the current state of a fast-start or streaming movie
streaming status code small integer [r/o] -- the streaming status code of the movie
streaming status message international text [r/o] -- the streaming status message of the movie
Additional track element:
annotation by numeric index, by name, by ID
frame by numeric index
Additional properties.
The following is useful with any track:
data format international text [r/o] -- the data format
The following are useful with video tracks:
transfer mode dither copy/no dither copy/blend/transparent/straight alpha/premul white alpha/premul black alpha/straight alpha blend/composition -- the transfer mode of the track
transfer mode RGB color -- the operation color of the track. Note that not all transfer modes use this value.
high quality boolean -- is the track high quality?
single field boolean -- is the visual track single field?
preload boolean -- should the track be preloaded?
never purge boolean -- never purge the track?
data rate integer [r/o] -- the data rate (bytes/sec) of the track
video depth small integer [r/o] -- the color depth of the video
is video gray scale boolean [r/o] -- is the video gray scale?
href international text [r/o] -- the internet location to open when clicking on the track
chapterlist track -- text track to use as chapter list for this track
contents type class -- the contents of the track. This is useful for getting or setting chapter track contents all at once. For example: set contents of chapter_track to {"Chapter 1", "Chapter 2", "Chapter 3"}
The following are useful with audio tracks:
audio sample rate small real [r/o] -- the sample rate of the audio in kHz
audio channel count small integer [r/o] -- the number of channels in the audio
audio sample size small integer [r/o] -- the size of uncompressed audio samples in bits
is audio variable rate boolean [r/o] -- is audio variable bitrate?
The following are useful with streaming tracks:
streaming bit rate small real [r/o] -- bit rate in bits/second for all streams in track
streaming quality small real [r/o] -- percent of packets received for all streams in track
Some Chapter class properties are now modifiable.
Plural form:
chapters
Properties:
class type class [r/o] -- the class
duration integer -- the duration of the chapter
index integer [r/o] -- the index of the chapter
name international text -- the name of the chapter
time integer -- the time at which the chapter starts
current chapter track track [r/o] -- the currently active chapter track (may differ by language)
current chapter chapter [r/o] -- the chapter containing the current time
Properties:
class type class [r/o] -- the class
kind string [r/o] -- the kind of media in the stream
video format international text [r/o] -- the video format
video depth small integer [r/o] -- the color depth of the video
is video gray scale boolean [r/o] -- is the video gray scale?
audio compression international text [r/o] -- the audio compression
audio sample rate small real [r/o] -- the sample rate of the audio
audio channel count small integer [r/o] -- the number of channels in the audio
audio sample size small integer [r/o] -- the size of decompressed audio samples
Plural form:
displays
Properties:
class type class [r/o] -- the class
current depth small integer [r/o] -- the current bit depth of the display
dimensions point [r/o] -- the dimensions of the display
main boolean [r/o] -- is this the display with the menu bar?
position point -- the position of the display
The frame class is added as a synonym for chapter, but for use with plain text tracks. It uses the contents property in place of chapter name property.
Plural form:
frames
Properties:
class type class [r/o] -- the class
contents type class -- the contents of the frame
duration integer -- the duration of the frame
index integer [r/o] -- the index of the frame
time integer -- the time at which the frame starts
Plural form:
text frames
Properties:
antialias boolean -- anti-alias text against background
class type class [r/o] -- the class
background color RGB color -- the background color of the text frame
default font string -- the name of the default font
default font size integer -- the default font size of the text frame
default font styles list -- the default font styles of the text frame
dimensions point -- the dimensions of the text frame
foreground color RGB color -- the foreground color of the text frame
justification left/right/center -- the justification of the text frame
keyed boolean -- render text over background
position point -- the position of the text frame
For example, you can set text frame properties this way:
tell text frame 1 |
set background color to {2345, 34563, 324} |
set foreground color to {0, 0, 0} |
set justification to left |
set default font to "times" |
set default font size to 18 |
set default font styles to {bold, italic} |
end tell |
Export events have new options. Both "can export" and "export" take a "considering only" property, which restricts the kind of exporter used. The "export" event now takes a "replacing" parameter, which indicates that any existing destination file be deleted before the export is performed.
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 AVI/BMP/DV stream/FLC/hinted movie/image sequence/picture/QuickTime movie/AIFF/System 7 sound/wave/MuLaw/standard MIDI/text file -- the desired file type
[considering only video/sound/text/base/streaming/MPEG/MPEG Audio/MPEG Video/music/timecode/sprite/Flash/tween/3D/QuickTime VR/VR panorama/VR object] -- considering only data of this type within the movie
Result: boolean -- is the export supported
export: Export a movie or track to a file
export reference -- the movie or track to export
to alias -- the destination file as AVI/BMP/DV stream/FLC/hinted movie/image sequence/picture/QuickTime movie/AIFF/System 7 sound/wave/MuLaw/standard MIDI/text file -- the desired file type
[using default settings/most recent settings] -- the export
settings to use
[using settings preset string] -- the name of the export settings
preset to use
[considering only video/sound/text/base/streaming/MPEG/MPEG Audio/MPEG Video/music/timecode/sprite/Flash/tween/3D/QuickTime VR/VRpanorama/VR object] -- considering only media of this type within the movie
[replacing boolean] -- should the original file be deleted first?
Application favorite elements can now be created:
make favorite with data "rtsp://video.hil.no/rtv/videoklipp_ISDN_S.mov"
make favorite with data alias "Mac OS 9:Media BU:1984.mov"
Movie track elements can now be created to ease chapter track creation:
make new track at first movie with data {"Chapter 1", "Chapter 2", "Chapter 3"}
make new track at first movie with data alias "Media:ChapterTrack.txt"
Last updated: 2001-10-01