Ppro Scripting Docsforadobe Dev en Latest
Ppro Scripting Docsforadobe Dev en Latest
Release 22.5
1 Introduction 1
2 Changelog 3
2.1 Adobe Premiere Pro 15.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Adobe Premiere Pro 14.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Adobe Premiere Pro 13.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Overview 5
3.1 Example code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Development and debugging tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5 Application object 9
5.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6 Anywhere object 25
6.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7 Encoder object 29
7.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8 Marker object 33
8.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
9 Metadata object 39
9.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
9.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
10 Production object 43
10.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
10.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
11 Project object 47
11.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
11.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
i
12 ProjectManager object 63
12.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
13 Properties object 69
13.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
13.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
14 SourceMonitor object 73
14.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
14.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
15 ProjectItem object 77
15.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
15.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
16 TrackItem object 97
16.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
16.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
ii
27 ProjectItemCollection object 151
27.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
iii
iv
CHAPTER
ONE
INTRODUCTION
This reference is a public compendium of information about the methods and members available via the API.
Premiere Pro provides an ExtendScript-based API, allowing for broad control of the entire application. ExtendScript
can access and manipulation of most project elements, including metadata, exporting and rendering options.
Adobe wants your integration to succeed; please don’t hesitate to contact us with questions, problems, or feature re-
quests.
1
Premiere Pro Scripting Guide, Release 22.5
2 Chapter 1. Introduction
CHAPTER
TWO
CHANGELOG
3
Premiere Pro Scripting Guide, Release 22.5
4 Chapter 2. Changelog
CHAPTER
THREE
OVERVIEW
Premiere Pro provides an ExtendScript API, allowing for the access and manipulation of most project elements, in-
cluding metadata, exporting and rendering options.
Note: This document does not teach ExtendScript, ExtendScript debugging, or other development techniques. It
focuses on the Premiere Pro ExtendScript API and the execution context for scripts.
While initially incomplete and intended only for internal testing, the Premiere Pro ExtendScript API has been growing
steadily for many years. As of 12.1.1 (the current release, as of this writing), the API offers thorough access to (and,
often, control over) all project elements, as well as application settings.
ExtendScript Toolkit (ESTK) is longer updated by Adobe; the recommended debugging environment for ExtendScript
is Microsoft Visual Studio Code, with Adobe’s ExtendScript debugging extension:
https://marketplace.visualstudio.com/items?itemName=Adobe.extendscript-debug
5
Premiere Pro Scripting Guide, Release 22.5
6 Chapter 3. Overview
CHAPTER
FOUR
7
Premiere Pro Scripting Guide, Release 22.5
FIVE
APPLICATION OBJECT
app
Description
Provides access to objects and application settings within Premiere Pro. The single global object is always available
by its name, app.
5.1 Attributes
5.1.1 app.anywhere
app.anywhere
Description
An Anywhere object, providing access to available Anywhere servers. Only available when running in Anywhere
configuration (discontinued).
Type
Anywhere object.
5.1.2 app.build
app.build
Description
The number of the build of Premiere Pro being run.
Type
String; read-only.
Example
Get a build version of current application (Adobe Premiere Pro version 14.3.1 (Build 45))
parseInt(app.build); // 45
9
Premiere Pro Scripting Guide, Release 22.5
5.1.3 app.encoder
app.encoder
Description
Provides access to Adobe Media Encoder (on the same system).
Warning: app.encoder is broken on Premiere Pro 14.3.1 - 15 on Mac only. Fixed in 22 and up. https://community.
adobe.com/t5/premiere-pro-discussions/missing-the-object-app-encoder-14-3-1-15-0-15-1-15-2/m-p/12544488
Type
Encoder object.
5.1.4 app.getAppPrefPath
app.getAppPrefPath
Description
The path containing the currently active “Adobe Premiere Pro Prefs” file.
Type
String; read-only.
Example
Get a path to a currently active preference file
5.1.5 app.getAppSystemPrefPath
app.getAppSystemPrefPath
Description
Premiere Pro’s active configuration files, not specific to a given user.
Type
String; read-only.
Example
Get a path to a currently active configuration folder
5.1.6 app.getPProPrefPath
app.getPProPrefPath
Description
The path containing the currently active “Adobe Premiere Pro Prefs” file.
Type
String; read-only.
Example
Get a path to a currently active preference file
5.1.7 app.getPProSystemPrefPath
app.getPProSystemPrefPath
Description
Premiere Pro’s active configuration files, not specific to a given user.
Type
String; read-only.
Example
Get a path to a currently active configuration folder
5.1.8 app.learnPanelContentDirPath
app.learnPanelContentDirPath
Description
Get the Learn panel’s contents directory path.
Type
String; read-only.
Example
Get a path to a Learn panel’s directory
5.1. Attributes 11
Premiere Pro Scripting Guide, Release 22.5
5.1.9 app.learnPanelExampleProjectDirPath
app.learnPanelExampleProjectDirPath
Description
Get the Learn panel’s example projects directory path.
Type
String; read-only.
Example
Get a path to a Learn panel’s example projects’ directory
5.1.10 app.metadata
app.metadata
Description
Get applications Metadata object.
Type
Metadata object, read-only.
5.1.11 app.path
app.path
Description
Get a path to applications executable file.
Type
String; read-only.
Example
Get a path to applications executable file.
5.1.12 app.production
app.production
Description
The currently active production.
Type
Production object if at least 1 production is open, null otherwise.
5.1.13 app.project
app.project
Description
The currently active project.
Type
Project object.
5.1.14 app.projectManager
app.projectManager
Description
Provides access to project management functions within Premiere Pro.
Type
ProjectManager object.
5.1.15 app.projects
app.projects
Description
An array referencing all open projects; numProjects contains size.
Type
ProjectCollection object, read-only.
5.1. Attributes 13
Premiere Pro Scripting Guide, Release 22.5
5.1.16 app.properties
app.properties
Description
The properties object provides methods to access and modify preference values.
Type
Properties object, read-only;
5.1.17 app.sourceMonitor
app.sourceMonitor
Description
Provides access to SourceMonitor object.
Type
SourceMonitor object.
5.1.18 app.userGuid
app.userGuid
Description
A unique identifier for the currently logged-in Creative Cloud user.
Type
String; read-only.
5.1.19 app.version
app.version
Description
The version of Premiere Pro, providing the API.
Type
String; read-only.
Example
Get a version of a current application (Adobe Premiere Pro version 14.3.1 (Build 45))
app.version; // 14.3.1
5.2 Methods
5.2.1 app.enableQE()
app.enableQE()
Description
Enables Premiere Pro’s QE DOM.
Parameters
None.
Returns
Returns true if QE DOM was enabled.
5.2.2 app.getEnableProxies()
app.getEnableProxies()
Description
Determines whether proxy usage is currently enabled.
Parameters
None.
Returns
Returns 1 if proxies are enabled, 0 of they are not.
5.2.3 app.getWorkspaces()
app.getWorkspaces()
Description
Obtains an array of available workspaces as Strings.
Parameters
None.
Returns
Array if successful, null if unsuccessful.
Example
Get a list of available workspaces.
5.2. Methods 15
Premiere Pro Scripting Guide, Release 22.5
app.getWorkspaces();
/* [
"All Panels",
"Assembly",
"Audio",
"Color",
"Editing",
"Effects",
"Graphics",
"Learning",
"Libraries",
"Metalogging",
"Production"
]; */
5.2.4 app.isDocument()
app.isDocument(path)
Description
Determines whether the file at path can be opened as a Premiere Pro project.
Parameters
Returns
Returns true if file can be opened as a Premiere Pro project.
Example
Test for valid project files
app.isDocument('~/Desktop/myProject.prproj'); // true
app.isDocument('~/Desktop/textFile.txt'); // false
app.isDocument('~/Desktop/footageFile.mov'); // false
app.isDocument('~/Desktop/imageFile.mov'); // false
5.2.5 app.isDocumentOpen()
app.isDocumentOpen()
Description
Determines whether there are any projects currently open.
Parameters
None.
Returns
Returns true if at least 1 project is open; otherwise false.
5.2.6 app.newProject()
app.newProject(path)
Description
Creates a new .prproj Project object, at the specified path.
Parameters
Returns
Returns true if successful.
5.2.7 app.openDocument()
app.openDocument(path)
Description
Opens the file at the specified path, as a Premiere Pro Project object.
Parameters
Returns
Returns true if file was successfully opened.
5.2. Methods 17
Premiere Pro Scripting Guide, Release 22.5
5.2.8 app.openFCPXML()
app.openFCPXML(path, projPath)
Description
Opens an FCP XML file as a Premiere Pro Project object (specified in projPath).
Parameters
Returns
Returns true if file was successfully opened as a Premiere Pro Project object.
5.2.9 app.quit()
app.quit()
Description
Quits Premiere Pro; user will be prompted to save any changes to Project object.
Parameters
None.
Returns
Nothing.
5.2.10 app.setEnableProxies()
app.setEnableProxies(enabled)
Description
Determines whether proxy usage is currently enabled.
Parameters
Returns
Returns 1 if proxy enablement was changed.
5.2.11 app.setExtensionPersistent()
app.setExtensionPersistent(extensionID, persistent)
Description
Whether extension with the given extensionID persists, within this session.
Parameters
Returns
Returns true if successful.
Example
app.setExtensionPersistent(extensionID, persistent);
5.2.12 app.setScratchDiskPath()
app.setScratchDiskPath(path, scratchDiskType)
Description
Specifies the path to be used for one of Premiere Pro’s scratch disk paths.
Parameters
5.2. Methods 19
Premiere Pro Scripting Guide, Release 22.5
Returns
Returns ‘true’ if successful.
Example
5.2.13 app.setSDKEventMessage()
app.setSDKEventMessage(message, decorator)
Description
Writes a string to Premiere Pro’s Events panel.
Parameters
info
warning
error
Returns
5.2.14 app.setWorkspace()
app.setWorkspace(workspace)
Description
Set workspace as active. Use app.getWorkspaces() to get a list of all available workspaces.
Parameters
Returns
Boolean.
Example
Activate Editing workspace.
5.2.15 app.trace()
app.trace()
Description
Writes a string to Premiere Pro’s debug console.
Parameters
None.
Returns
Returns true if trace was added.
5.2. Methods 21
Premiere Pro Scripting Guide, Release 22.5
5.2.16 app.getProjectViewIDs()
app.getProjectViewIDs()
Description
Returns the view IDs of currently-open views, associated with any project.
Parameters
None.
Returns
An array of view IDs; can be null.
Example
5.2.17 app.getProjectFromViewID()
app.getProjectFromViewID()
Description
Returns the Project associated with the provided View ID.
Parameters
A View ID, obtained from getProjectViewIDs.
Returns
A Project object, for the project associated with the provided View ID. Can be null.
Example
5.2.18 app.getCurrentProjectViewSelection()
app.getCurrentProjectViewSelection()
Description
Returns an array of projectItems selected, in the current active project view.
Parameters
None.
Returns
An array of projectItems; can be null.
Example
5.2. Methods 23
Premiere Pro Scripting Guide, Release 22.5
SIX
ANYWHERE OBJECT
app.anywhere
Description
The anywhere object represents any Adobe Anywhere or Team Projects servers available.
6.1 Attributes
None.
6.2 Methods
6.2.1 Anywhere.getAuthenticationToken()
app.anywhere.getAuthenticationToken()
Description
Retrieves an authentication token.
Parameters
None.
Returns
A String containing the login token, or 0 if unsuccessful.
25
Premiere Pro Scripting Guide, Release 22.5
6.2.2 Anywhere.getCurrentEditingSessionActiveSequenceURL()
app.anywhere.getCurrentEditingSessionActiveSequenceURL()
Description
Retrieves the URL of the currently active sequence, within a production.
Parameters
None.
Returns
Returns a String containing the asset’s URL, or 0 if unsuccessful (including if there is no active sequence, or if no
editing session is opened).
6.2.3 Anywhere.getCurrentEditingSessionSelectionURL()
app.anywhere.getCurrentEditingSessionSelectionURL()
Description
Retrieves the URL of the currently selected single asset. Will fail if more or fewer than one item is selected.
Parameters
None.
Returns
Returns a String containing the asset’s URL, or 0 if unsuccessful (including if more or fewre than one item is selected).
6.2.4 Anywhere.getCurrentEditingSessionURL()
app.anywhere.getCurrentEditingSessionURL()
Description
Retrieves the URL of the Production, currently being edited.
Parameters
None.
Returns
Returns a String containing the production’s URL, or 0 if unsuccessful.
6.2.5 Anywhere.isProductionOpen()
app.anywhere.isProductionOpen()
Description
Retrieves whether an Anywhere or Team Projects production is currently open.
Parameters
None.
Returns
Returns true if a production is open; false if not.
6.2.6 Anywhere.listProductions()
app.anywhere.listProductions()
Description
Retrieves production names, available to the current user, on the current server.
Parameters
None.
Returns
Returns an Array of Strings containing the names of avialable productions, or 0 if unsuccessful.
6.2.7 Anywhere.openProduction()
app.anywhere.openProduction(productionURL)
Description
Opens the production at the specified URL.
Parameters
Returns
Returns 0 if successful.
6.2. Methods 27
Premiere Pro Scripting Guide, Release 22.5
6.2.8 Anywhere.setAuthenticationToken()
app.anywhere.setAuthenticationToken(token, emailAddress)
Description
Logs the specified email address into the server, using the provided token.
Parameters
Returns
Returns 0 if successful.
SEVEN
ENCODER OBJECT
app.encoder
Description
The encoder object represents Adobe Media Encoder, and is used for local rendering, outside of Premiere Pro.
Warning: app.encoder is broken on Premiere Pro 14.3.1 - 15 on Mac only. Fixed in 22 and up. https://community.
adobe.com/t5/premiere-pro-discussions/missing-the-object-app-encoder-14-3-1-15-0-15-1-15-2/m-p/12544488
7.1 Attributes
None.
7.2 Methods
7.2.1 Encoder.encodeFile()
29
Premiere Pro Scripting Guide, Release 22.5
Returns
Returns a job ID as a String, for the render job added to the AME queue, or 0 if unsuccessful.
7.2.2 Encoder.encodeProjectItem()
Returns
Returns a job ID as a String, for the render job added to the AME queue, or 0 if unsuccessful.
7.2.3 Encoder.encodeSequence()
Returns
Returns a job ID as a String, for the render job added to the AME queue, or 0 if unsuccessful.
7.2.4 Encoder.launchEncoder()
app.encoder.launchEncoder()
Description
Launches Adobe Media Encoder.
Parameters
None.
Returns
Returns 0 if successful.
7.2.5 Encoder.setEmbeddedXMPEnabled()
app.encoder.setEmbeddedXMPEnabled(enabled)
Description
Determines whether embedded XMP metadata, will be output.
Parameters
7.2. Methods 31
Premiere Pro Scripting Guide, Release 22.5
Returns
Returns 0 if successful.
Note: Premiere Pro and Adobe Media Encoder will output sidecar XMP for some file formats, and embed XMP for
most. The applications make this determination based on numerous factors, and there is no API control to “force”
sidecar or embedded output, for formats which normally use “the other approach”.
7.2.6 Encoder.setSidecarXMPEnabled()
app.encoder.setSidecarXMPEnabled(enabled)
Description
Determines whether a sidecar file containing XMP metadata, will be output.
Parameters
Returns
Returns 0 if successful.
7.2.7 Encoder.startBatch()
app.encoder.startBatch()
Description
Makes Adobe Media Encoder start rendering its render queue.
Parameters
None.
Returns
Returns 0 if successful.
EIGHT
MARKER OBJECT
app.project.activeSequence.markers.getFirstMarker()
app.project.rootItem.children[index].getMarkers().getFirstMarker()
Description
Both Project items and sequences have associated marker objects, which represent their associated markers.
8.1 Attributes
8.1.1 Marker.comments
app.project.activeSequence.markers.getFirstMarker().comments
app.project.rootItem.children[index].getMarkers().getFirstMarker().comments
Description
The comments within the marker.
Type
String; read/write.
8.1.2 Marker.end
app.project.activeSequence.markers.getFirstMarker().end
app.project.rootItem.children[index].getMarkers().getFirstMarker().end
Description
A Time object containing the value of the ending of the marker.
Type
Time object; read/write.
33
Premiere Pro Scripting Guide, Release 22.5
8.1.3 Marker.guid
app.project.activeSequence.markers.getFirstMarker().guid
app.project.rootItem.children[index].getMarkers().getFirstMarker().guid
Description
The unique identifier of the marker, created at time of instantiation.
Type
String; read-only.
8.1.4 Marker.name
app.project.activeSequence.markers.getFirstMarker().name
app.project.rootItem.children[index].getMarkers().getFirstMarker().name
Description
The name of the marker.
Type
String; read/write.
8.1.5 Marker.start
app.project.activeSequence.markers.getFirstMarker().start
app.project.rootItem.children[index].getMarkers().getFirstMarker().start
Description
A Time object containing the value of the beginning of the marker.
Type
Time object; read/write.
8.1.6 Marker.type
app.project.activeSequence.markers.getFirstMarker().type
app.project.rootItem.children[index].getMarkers().getFirstMarker().type
Description
The type of marker; either “Comment”, “Chapter”, “Segmentation”, or “WebLink”. Note: Premiere Pro can import
some marker types, which cannot be created from within Premiere Pro.
Type
String; read-only.
8.2 Methods
8.2.1 Marker.getColorByIndex()
app.project.activeSequence.markers.getFirstMarker().getColorByIndex(index)
app.project.rootItem.children[index].getMarkers().getFirstMarker().getColorByIndex(index)
Description
Gets the marker color index.
Parameters
Returns
Returns the color index as an Integer.
8.2.2 Marker.getWebLinkFrameTarget()
app.project.activeSequence.markers.getFirstMarker().getWebLinkFrameTarget()
app.project.rootItem.children[index].getMarkers().getFirstMarker().
getWebLinkFrameTarget()
Description
Retrieves the frame target, from the marker’s FrameTarget field.
8.2. Methods 35
Premiere Pro Scripting Guide, Release 22.5
Parameters
None.
Returns
Returns a String containing the frame target, or 0 if unsuccessful.
8.2.3 Marker.getWebLinkURL()
app.project.activeSequence.markers.getFirstMarker().getWebLinkURL()
app.project.rootItem.children[index].getMarkers().getFirstMarker().getWebLinkURL()
Description
Retrieves the URL, from the marker’s URL field.
Parameters
None.
Returns
Returns a String containing the URL, or 0 if unsuccessful.
8.2.4 Marker.setColorByIndex()
app.project.activeSequence.markers.getFirstMarker().setColorByIndex(colorIndex,
markerIndex)
app.project.rootItem.children[index].getMarkers().getFirstMarker().
setColorByIndex(colorIndex,
markerIndex)
Description
Sets the marker color by index. Color indexies listed below.
• 0 = Green
• 1 = Red
• 2 = Purple
• 3 = Orange
• 4 = Yellow
• 5 = White
• 6 = Blue
• 7 = Cyan
Parameters
Returns
Returns undefined.
8.2.5 Marker.setTypeAsChapter()
app.project.activeSequence.markers.getFirstMarker().setTypeAsChapter()
app.project.rootItem.children[index].getMarkers().getFirstMarker().setTypeAsChapter()
Description
Sets the type of the marker to “Chapter”.
Parameters
None.
Returns
Returns 0 if successful.
8.2.6 Marker.setTypeAsComment()
app.project.activeSequence.markers.getFirstMarker().setTypeAsComment()
app.project.rootItem.children[index].getMarkers().getFirstMarker().setTypeAsComment()
Description
Sets the type of the marker to “Comment”.
Parameters
None.
Returns
Returns 0 if successful.
8.2. Methods 37
Premiere Pro Scripting Guide, Release 22.5
8.2.7 Marker.setTypeAsSegmentation()
app.project.activeSequence.markers.getFirstMarker().setTypeAsSegmentation()
app.project.rootItem.children[index].getMarkers().getFirstMarker().
setTypeAsSegmentation()
Description
Sets the type of the marker to “Segmentation”.
Parameters
None.
Returns
Returns 0 if successful.
8.2.8 Marker.setTypeAsWebLink()
app.project.activeSequence.markers.getFirstMarker().setTypeAsWebLink()
app.project.rootItem.children[index].getMarkers().getFirstMarker().setTypeAsWebLink()
Description
Sets the type of the marker to “WebLink”.
Parameters
None.
Returns
Returns 0 if successful.
NINE
METADATA OBJECT
app.metadata
Description
add description here
9.1 Attributes
9.1.1 Metadata.getMetadata
app.metadata.getMetadata
Description
add description here
Type
String.
9.2 Methods
9.2.1 Metadata.addMarker()
app.metadata.addMarker()
Description
add description here
Parameters
add parameters here
Returns
add return value/type here
39
Premiere Pro Scripting Guide, Release 22.5
9.2.2 Metadata.deleteMarker()
app.metadata.deleteMarker()
Description
add description here
Parameters
add parameters here
Returns
add return value/type here
9.2.3 Metadata.setMarkerData()
app.metadata.setMarkerData()
Description
add description here
Parameters
add parameters here
Returns
add return value/type here
9.2.4 Metadata.setMetadataValue()
app.metadata.setMetadataValue()
Description
add description here
Parameters
add parameters here
Returns
add return value/type here
9.2.5 Metadata.updateMarker()
app.metadata.updateMarker()
Description
add description here
Parameters
add parameters here
Returns
add return value/type here
9.2. Methods 41
Premiere Pro Scripting Guide, Release 22.5
TEN
PRODUCTION OBJECT
app.production
Description
The Production object lets ExtendScript access and manipulate productions, insert projects, create new projects and
bins, and move existing Production projects to Trash.
10.1 Attributes
10.1.1 Production.name
app.production.name
Description
The name of the production.
Type
String.
10.1.2 Production.path
app.production.path
Description
The path to the Production folder.
Type
String.
43
Premiere Pro Scripting Guide, Release 22.5
10.1.3 Production.projects
app.production.projects
Description
An array of the projects containined within the Production, which are currently open. Does not include non-open
projects.
Type
ProjectCollection object, read-only.
10.2 Methods
10.2.1 Production.addProject()
app.production.addProject(srcProjectPath, destProjectPath)
Description
Copies a project from some other location, into the Production directory.
Parameters
Returns
Returns true if successful.
10.2.2 Production.close()
app.production.close()
Description
Closes the Production, and all open projects from within that Production.
Parameters
None.
Returns
Returns true if successful.
10.2.3 Production.getLocked()
app.production.getLocked()
Description
Returns the current lock state of the Production.
Parameters
None.
Returns
Returns true if the Production is locked, false if it is unlocked.
10.2.4 Production.moveToTrash()
Returns
Returns true if successful.
10.2.5 Production.setLocked()
app.production.setLocked(locked)
Description
Sets the lock state of the Production
Parameters
Returns
Returns true if successful.
10.2. Methods 45
Premiere Pro Scripting Guide, Release 22.5
ELEVEN
PROJECT OBJECT
app.project
Description
Represents a Premiere Pro project. As of Premiere Pro 12.0, multiple projects may be open at the same time.
11.1 Attributes
11.1.1 Project.activeSequence
app.project.activeSequence
Description
The currently active Sequence object, within the project.
Type
a Sequence object, or 0 if no sequence is currently active.
11.1.2 Project.cloudProjectlocalID
app.project.cloudProjectlocalID
Description
The ID of cloud project.
Type
String; read/only.
47
Premiere Pro Scripting Guide, Release 22.5
11.1.3 Project.documentID
app.project.documentID
Description
A unique identifier for this project, in format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Type
String; read-only.
11.1.4 Project.isCloudProject
app.project.isCloudProject
Description
Check whether the project is cloud project.
Type
Boolean; read-only.
11.1.5 Project.name
app.project.name
Description
The name of the project.
Type
String; read-only.
11.1.6 Project.path
app.project.path
Description
The file path of the project.
Type
String; read-only.
Example
Get a path of a curently active project
app.project.path; // /Users/USERNAME/Desktop/Project.prproj
11.1.7 Project.rootItem
app.project.rootItem
Description
A ProjectItem object representing the “root” of the project.
Type
A ProjectItem object; this will always be of type ProjectItemType_BIN.
11.1.8 Project.sequences
app.project.sequences
Description
The sequences within the project.
Type
SequenceCollection object, read-only.
11.2 Methods
11.2.1 Project.addPropertyToProjectMetadataSchema()
Returns
Returns true if successful, undefined if unsuccessful.
11.2. Methods 49
Premiere Pro Scripting Guide, Release 22.5
11.2.2 Project.closeDocument()
app.project.closeDocument(saveFirst, promptIfDirty)
Description
Closes this project.
Parameters
Returns
Returns 0 if successful.
11.2.3 Project.consolidateDuplicates()
app.project.consolidateDuplicates()
Description
Invokes Premiere Pro’s “Consolidate Duplicate Footage” functionality, as available from the UI.
Parameters
None.
Returns
Returns 0 if successful.
11.2.4 Project.createNewSequence()
app.project.createNewSequence(sequenceName, sequenceID)
Description
Creates a new Sequence object with the specified ID.
Parameters
Returns
Returns a Sequence object if creation was successful, or 0 if unsuccessful.
11.2.5 Project.createNewSequenceFromClips()
app.project.createNewSequenceFromClips(sequenceName, arrayOfProjectItems,
destinationBin);
Description
Creates a new Sequence object with the given name, in the specified destination bin, and sequentially inserts project
items into it.
Parameters
Returns
Returns the newly-created Sequence object if successful; 0 if unsuccessful.
11.2.6 Project.deleteSequence()
app.project.deleteSequence(sequence)
Description
Deletes the specified Sequence object from the project.
Parameters
Returns
Returns 0 if successful.
11.2.7 Project.exportAAF()
11.2. Methods 51
Premiere Pro Scripting Guide, Release 22.5
Returns
Returns 0 if successful.
11.2.8 Project.exportFinalCutProXML()
app.project.exportFinalCutProXML(outputPath, suppressUI)
Description
Exports an FCP XML representation of the entire project, to the specified output path.
Parameters
Returns
Returns 0 if successful.
11.2.9 Project.exportOMF()
Returns
Returns 0 if successful.
11.2.10 Project.exportTimeline()
app.project.exportTimeline(exportControllerName)
Description
Exports the currently active Sequence object, using an Export Controller plug-in with the specified name.
Parameters
Returns
Returns 0 if successful, or an error code if not.
11.2.11 Project.getGraphicsWhiteLuminance()
app.project.getGraphicsWhiteLuminance();
Description
Retrieves the current graphics white luminance value, for this project.
Parameters
None.
Returns
Returns the currently selected graphics white value.
11.2. Methods 53
Premiere Pro Scripting Guide, Release 22.5
11.2.12 Project.getInsertionBin()
app.project.getInsertionBin()
Description
Returns a ProjectItem object referencing the bin into which import will occur.
Parameters
None.
Returns
Returns a ProjectItem object if successful, 0 if not.
11.2.13 Project.getProjectPanelMetadata()
app.project.getProjectPanelMetadata()
Description
Returns the current layout of the Project panel.
Parameters
None.
Returns
Returns a String representing the current Project panel layout, or 0 if unsuccessful.
11.2.14 Project.getSharedLocation()
app.project.getSharedLocation()
Description
Returns the path to the location to which shared files are to be copied.
Parameters
None.
Returns
Returns a String containing the path.
11.2.15 Project.getSupportedGraphicsWhiteLuminances()
app.project.getSupportedGraphicsWhiteLuminances();
Description
Retrieves the supported graphics white luminance values, for this project.
Parameters
None.
Returns
Returns an array of graphics white settings supported by the project; Currently it returns (100, 203, 300)
11.2.16 Project.importAEComps()
Returns
Returns 0 if successful.
11.2.17 Project.importAllAEComps()
app.project.importAllAEComps(path, targetBin)
Description
Imports specified Compositions (by name) from the containing After Effects .aep project file. You can specify a target
bin within the containing project; otherwise, the Compositions will appear in the most recently targeted bin, within this
project.
Parameters
Returns
11.2. Methods 55
Premiere Pro Scripting Guide, Release 22.5
Returns 0 if successful.
11.2.18 Project.importFiles()
Returns
Returns true if successful, false if not.
11.2.19 Project.importSequences()
app.project.importSequences(path, sequenceIDs)
Description
Imports an array of sequence objects (with specified sequenceIDs), from the specified project, into the current project.
Parameters
Returns
Returns 0 if successful.
11.2.20 Project.isSharedLocationCopyEnabled()
app.project.isSharedLocationCopyEnabled()
Description
Determines whether copying to a shared location is enabled, for this project.
Parameters
None.
Returns
Returns true if copying is enabled; false if not.
11.2.21 Project.newBarsAndTone()
Returns
Returns a ProjectItem object for the new bars and tone, or 0 if unsuccessful.
11.2.22 Project.newSequence()
app.project.newSequence(name, pathToSequencePreset)
Description
Creates a new Sequence object with the given name, based on the specified preset (.sqpreset file).
Parameters
11.2. Methods 57
Premiere Pro Scripting Guide, Release 22.5
Returns
Returns a Sequence object, or 0 if unsuccessful.
11.2.23 Project.openSequence()
app.project.openSequence(sequence.sequenceID)
Description
Makes the Sequence object with the provided sequence ID, active. This will open the sequence in the Timeline panel.
Parameters
Returns
Returns true if successful, false if not.
11.2.24 Project.pauseGrowing()
app.project.pauseGrowing(pause)
Description
Pauses (and resumes) growing file capture.
Parameters
Returns
Returns 0 if successful.
11.2.25 Project.save()
app.project.save()
Description
Saves the project, at its current path.
Parameters
None.
Returns
Returns 0 if successful.
11.2.26 Project.saveAs()
app.project.saveAs(path)
Description
Exports the current project to a new unique file path, opens the project from the new location, and closes the previously-
opened (and identical) project.
Parameters
Returns
Returns 0 if successful, or an error code if not.
11.2.27 Project.setEnableTranscodeOnIngest()
app.project.setEnableTranscodeOnIngest(state);
Description
Controls the enablement of transcode-upon-ingest behavior, for the given project.
Parameters
Returns
Returns true if successful.
11.2.28 Project.setGraphicsWhiteLuminance()
app.project.setGraphicsWhiteLuminance(value)
Description
Sets the current graphics white luminance value, for this project.
Parameters
Returns
Returns true if successful.
11.2. Methods 59
Premiere Pro Scripting Guide, Release 22.5
11.2.29 Project.setProjectPanelMetadata()
app.project.setProjectPanelMetadata(layout)
Description
Returns the current layout of the Project panel.
Parameters
Returns
Returns 0 if unsuccessful.
11.2.30 Project.setScratchDiskPath()
app.project.setScratchDiskPath(newPath, whichScratchDiskPath)
Description
Changes the specified scratch disk path to a new path.
Parameters
• ScratchDiskType.FirstAudioCaptureFolder
• ScratchDiskType.FirstVideoPreviewFolder
• ScratchDiskType.FirstAudioPreviewFolder
• ScratchDiskType.FirstAutoSaveFolder
• ScratchDiskType.FirstCCLibrariesFolder
• ScratchDiskType.FirstCapsuleMediaFolder
Returns
Returns 0 if unsuccessful.
11.2. Methods 61
Premiere Pro Scripting Guide, Release 22.5
TWELVE
PROJECTMANAGER OBJECT
app.projectManager.options
Description
The ProjectManager object exposes Premiere Pro’s Project Manager, for project consolidation, transfer and transcoding.
12.1 Attributes
12.1.1 ProjectManager.affectedSequences
app.projectManager.options.affectedSequences
Description
An Array of Sequence objects, to be exported.
Type
Array; read/write.
12.1.2 ProjectManager.clipTranscoderOption
app.projectManager.options.clipTranscoderOption
Description
The specified setting for clip transcode. Value will be one of the following:
Type
String; read/write.
63
Premiere Pro Scripting Guide, Release 22.5
12.1.3 ProjectManager.clipTransferOption
app.projectManager.options.clipTransferOption
Description
The specified setting for clip transfer. Value will be one of the following:
12.1.4 ProjectManager.convertAECompsToClips
app.projectManager.options.convertAECompsToClips
Description
If true, render dynamically-linked After Effects compositions to new media (using specified output preset).
Type
Boolean; read/write.
12.1.5 ProjectManager.convertImageSequencesToClips
app.projectManager.options.convertImageSequencesToClips
Description
If true, transcode image sequences to new media (using specified output preset).
Type
Boolean; read/write.
12.1.6 ProjectManager.convertSyntheticsToClips
app.projectManager.options.convertSyntheticsToClips
Description
If true, transcode clips from synthetic importers to new media (using specified output preset).
Type
Boolean; read/write.
12.1.7 ProjectManager.copyToPreventAlphaLoss
app.projectManager.options.copyToPreventAlphaLoss
Description
If true, includes any available alpha information into transcoded media.
Type
Boolean; read/write.
12.1.8 ProjectManager.destinationPath
app.projectManager.options.destinationPath
Description
The path to which to export the project and media.
Type
String; read/write.
12.1.9 ProjectManager.encoderPresetFilePath
app.projectManager.options.encoderPresetFilePath
Description
The path to the output preset (.epr file) to be used.
Type
String; read-write.
12.1.10 ProjectManager.excludeUnused
app.projectManager.options.excludeUnused
Description
If non-zero, exclude unused project items from the exported project.
Type
Boolean; read/write.
12.1. Attributes 65
Premiere Pro Scripting Guide, Release 22.5
12.1.11 ProjectManager.handleFrameCount
app.projectManager.options.handleFrameCount
Description
How many frames of ‘handle’ footage (before and after the in and out points) of media, to include.
Type
Integer; read/write.
12.1.12 ProjectManager.includeAllSequences
app.projectManager.options.includeAllSequences
Description
If true, export all Sequences in the exported project.
Type
Boolean; read/write.
12.1.13 ProjectManager.includeConformedAudio
app.projectManager.options.includeConformedAudio
Description
If true, include conformed audio files with exported project.
Type
Boolean; read/write.
12.1.14 ProjectManager.includePreviews
app.projectManager.options.includePreviews
Description
If true, include rendered preview files with exported project.
Type
Boolean; read/write.
12.1.15 ProjectManager.renameMedia
app.projectManager.options.renameMedia
Description
If true, perform renaming as part of the export process.
Type
Boolean; read/write.
12.1. Attributes 67
Premiere Pro Scripting Guide, Release 22.5
THIRTEEN
PROPERTIES OBJECT
app.properties
Description
add description here
13.1 Attributes
None.
13.2 Methods
13.2.1 Properties.clearProperty()
app.properties.clearProperty()
Description
add description here
Parameters
add parameters here
Returns
add return value/type here
69
Premiere Pro Scripting Guide, Release 22.5
13.2.2 Properties.doesPropertyExist()
app.properties.doesPropertyExist(property)
Description
Checks whether a given property exists in preferences.
Parameters
Returns
Boolean.
Example
Check whether labels with indices 10 and 99 exist in preferences:
property = 'BE.Prefs.LabelNames.99';
exists = app.properties.doesPropertyExist(property);
alert('Property "' + property + '" exists: ' + exists.toString());
13.2.3 Properties.getProperty()
app.properties.getProperty(property)
Description
Returns a property value.
Parameters
Returns
String.
Example
Get label name at a given index:
var labelIndex = 0;
var property = 'BE.Prefs.LabelNames.' + labelIndex;
if (app.properties.doesPropertyExist(property)) {
alert(app.properties.getProperty(property));
(continues on next page)
13.2.4 Properties.isPropertyReadOnly()
app.properties.isPropertyReadOnly(property)
Description
Checks whether a given property can be overwritten by the user. Returns false if such property does not exist.
Parameters
Returns
Boolean.
13.2.5 Properties.setProperty()
Returns
null.
Example
Change label name:
var labelIndex = 0;
var property = 'BE.Prefs.LabelNamesX.' + labelIndex;
13.2. Methods 71
Premiere Pro Scripting Guide, Release 22.5
if (app.properties.doesPropertyExist(property)) {
if (app.properties.isPropertyReadOnly(property)) {
alert('Could not rename property "' + property + '" because it is read-only.');
} else {
var oldValue = app.properties.getProperty(property);
app.properties.setProperty(property, newValue, persistent, createIfNotExist);
alert('Value changed from "' + oldValue + '" to "' + newValue + '"');
}
} else {
app.properties.setProperty(property, newValue, persistent, createIfNotExist);
alert('Created new property "' + property + '" with value "' + newValue + '"');
}
FOURTEEN
SOURCEMONITOR OBJECT
app.sourceMonitor
Description
The Source object represents Premiere Pro’s Source monitor.
14.1 Attributes
None.
14.2 Methods
14.2.1 SourceMonitor.closeAllClips()
app.sourceMonitor.closeAllClips()
Description
Closes all clips in the Source monitor.
Parameters
None.
Returns
Returns 0 if successful.
73
Premiere Pro Scripting Guide, Release 22.5
14.2.2 SourceMonitor.closeClip()
app.sourceMonitor.closeClip()
Description
Closes the front-most clip in the Source monitor.
Parameters
None.
Returns
Returns 0 if successful.
14.2.3 SourceMonitor.getPosition()
app.sourceMonitor.getPosition()
Description
Retrieves the position of the Source monitor’s current time indicator.
Parameters
None.
Returns
Returns a Time object containing the position of the Source monitor’s current time indicator.
14.2.4 SourceMonitor.openFilePath()
app.sourceMonitor.openFilePath(path)
Description
Open a file in the Source monitor.
Parameters
Returns
Returns true if successful.
14.2.5 SourceMonitor.openProjectItem()
app.sourceMonitor.openProjectItem(projectItem)
Description
Open a project item in the Source monitor.
Parameters
Returns
Returns 0 if successful.
14.2.6 SourceMonitor.play()
app.sourceMonitor.play(playbackSpeed)
Description
Begins playing back the Source monitor, at the specified playback speed.
Parameters
Returns
Returns 0 if successful.
14.2. Methods 75
Premiere Pro Scripting Guide, Release 22.5
FIFTEEN
PROJECTITEM OBJECT
app.project.rootItem.children[index]
Description
Each item in a project is a projectItem, including the project root.
15.1 Attributes
15.1.1 ProjectItem.children
app.project.rootItem.children[index].children
Description
An array of project items, contained within the specified project item.
Type
ProjectItemCollection object, read-only.
15.1.2 ProjectItem.getAudioChannelMapping
app.project.rootItem.children[index].getAudioChannelMapping
Description
The audio channel mapping currently applied to this projectItem.
Type
An audioChannelMapping object.
77
Premiere Pro Scripting Guide, Release 22.5
15.1.3 ProjectItem.getOverrideColorSpaceList
app.project.rootItem.children[index].getOverrideColorSpaceList
Description
Add a description
Returns an object, containing similar data
{
value: [
sRGB,
BT.601 (NTSC),
BT.601 (PAL),
BT.709,
BT.709 (Scene),
BT.2020,
BT.2020 (Scene),
BT.2100 PQ,
BT.2100 PQ (Scene),
BT.2100 HLG,
BT.2100 HLG (Scene),
DCDM XYZ,
]
};
Type
Javascript Object.
15.1.4 ProjectItem.name
app.project.rootItem.children[index].name
Description
The name of the project item.
Type
String; read/write.
Example
Rename first project item.
15.1.5 ProjectItem.nodeId
app.project.rootItem.children[index].nodeId
Description
A unique ID assigned to the project item, upon its addition to the project.
NOTE: Distinguish between references to the same source media.
Type
String; read-only.
15.1.6 ProjectItem.teamProjectsAssetId
app.project.rootItem.children[index].teamProjectsAssetId
Description
The Team Projects Asset ID of the project item.
Type
String; read-only.
15.1.7 ProjectItem.treePath
app.project.rootItem.children[index].treePath
Description
The current project location of the project item. Example:
\ProjectName.prproj\Media\MXF\filename.mxf
Type
String; read-only.
15.1.8 ProjectItem.type
app.project.rootItem.children[index].type
Description
Will be CLIP, BIN, ROOT, or FILE.
Type
Enumerated value; read-only.
15.1. Attributes 79
Premiere Pro Scripting Guide, Release 22.5
15.2 Methods
15.2.1 ProjectItem.attachProxy()
app.project.rootItem.children[index].attachProxy(mediaPath, isHiRes)
Description
Attaches the media at newMediaPath to the project item, as either hi-res or proxy media.
Parameters
Returns
Returns 0 if successful.
15.2.2 ProjectItem.canChangeMediaPath()
app.project.rootItem.children[index].canChangeMediaPath()
Description
Returns true if Premiere Pro can change the path, associated with this project item; otherwise, returns false.
Parameters
None.
Returns
Boolean; true if media can be replaced, false if not.
15.2.3 ProjectItem.canProxy()
app.project.rootItem.children[index].canProxy()
Description
Indicates whether it’s possible to attach a proxy, to this project item.
Parameters
None.
Returns
Returns true if the project item permits a proxy to be attached; false if not.
15.2.4 ProjectItem.changeMediaPath()
app.project.rootItem.children[index].changeMediaPath(newPath)
Description
Updates the project item to point to a new media path.
Parameters
Returns
Returns 0 if replacement was successful.
15.2.5 ProjectItem.clearOutPoint()
app.project.rootItem.children[index].clearOutPoint()
Description
Clears any assigned out point; the project item will then start at startTime.
Parameters
None
Returns
Returns 0 if successful.
15.2.6 ProjectItem.createBin()
app.project.rootItem.children[index].createBin(name)
Description
Creates an empty bin, within the project item. Only works within bins.
Parameters
Returns
Returns a project item representing the new bin if successful, or 0 if unsuccessful.
15.2. Methods 81
Premiere Pro Scripting Guide, Release 22.5
15.2.7 ProjectItem.createSmartBin()
app.project.rootItem.children[index].createSmartBin(name, queryString)
Description
Creates a search bin; only works for bin project items.
Parameters
Returns
Returns 0 if creation if smart bin was successful.
15.2.8 ProjectItem.createSubClip()
Returns
Returns a project item representing the new subclip, or 0 if creation failed.
15.2.9 ProjectItem.deleteBin()
app.project.rootItem.children[index].deleteBin()
Description
Deletes a bin, AND ALL ITS CONTENTS, from the project.
Parameters
None.
Returns
15.2.10 ProjectItem.findItemsMatchingMediaPath()
app.project.rootItem.children[index].findItemsMatchingMediaPath(pathToMatch,
ignoreSubClips)
Description
Returns an array of project items, all of which reference the same media path.
Parameters
Returns
Returns an array of project items, or 0 if no project items matching the matchPath were found.
15.2.11 ProjectItem.getColorLabel()
app.project.rootItem.children[index].getColorLabel()
Description
Retrieves the project item’s color label.
Parameters
None.
Returns
Number, one of
labelColor
• 0 = Violet
• 1 = Iris
• 2 = Caribbean
• 3 = Lavender
• 4 = Cerulean
• 5 = Forest
• 6 = Rose
• 7 = Mango
• 8 = Purple
• 9 = Blue
• 10 = Teal
• 11 = Magenta
• 12 = Tan
• 13 = Green
• 14 = Brown
• 15= Yellow
15.2. Methods 83
Premiere Pro Scripting Guide, Release 22.5
15.2.12 ProjectItem.getColorSpace()
app.project.rootItem.children[index].getColorSpace()
Description
Retrieves the project item’s colorspace properties.
Parameters None.
Returns
Returns an item’s colorspace properties.
item. • name.
• transfer characteristic
• primaries.
• matrix equation.
Code Sample
this will write the above info to the Events panel.
{ var colorSpace = app.project.rootItem.children[0].getColorSpace() app.setSDKEventMessage(“Color Space ”
+ ” = ” + colorSpace.name, ‘info’); app.setSDKEventMessage(“Transfer Characteristic ” + ” = ” + col-
orSpace.transferCharacteristic, ‘info’); app.setSDKEventMessage(“Color Primaries ” + ” = ” + colorSpace.primaries,
‘info’); app.setSDKEventMessage(“Matrix Equation ” + ” = ” + colorSpace.matrixEquation, ‘info’); }
15.2.13 ProjectItem.getOriginalColorSpace()
app.project.rootItem.children[index].getOriginalColorSpace()
Description
Retrieves the project item’s colorspace properties .
Parameters None.
Returns
Returns an item’s colorspace properties if the properties have been overwritten.
item.
• original name.
• original transfer characteristic
• original primaries.
• original matrix equation.
Code Sample
See ProjectItem.getColorSpace()
15.2.14 ProjectItem.getEmbeddedLUTID()
app.project.rootItem.children[index].getEmbeddedLUTID()
Description
Retrieves the project item’s LUTID .
Parameters None.
Returns
Returns an item’s LUTID
Code Sample
Writes LUTID to Events panel.
{ var lutID = app.project.rootItem.children[0].getEmbeddedLUTID() app.setSDKEventMessage(“LutID ” + ” = ” +
lutID, ‘info’); }
15.2.15 ProjectItem.getInputLUTID()
app.project.rootItem.children[index].getInputLUTID()
Description
Retrieves the project item’s Input LUTID .
Parameters None.
Returns
Returns an item’s Input LUTID
Code Sample
Writes Input LUTID to Events panel.
{ var lutID = app.project.rootItem.children[0].getInputLUTID()
app.setSDKEventMessage(“Input LutID ” + ” = ” + inputLutID, ‘info’); }
15.2.16 ProjectItem.getFootageInterpretation()
app.project.rootItem.children[index].getFootageInterpretation()
Description
Returns a structure describing the current interpretation of the projectItem.
Parameters
None.
Returns
A footage interpretation structure, or 0 if unsuccessful.
15.2. Methods 85
Premiere Pro Scripting Guide, Release 22.5
alphaUsage
Alpha, will be one of the following:
• 0 ALPHACHANNEL_NONE
• 1 ALPHACHANNEL_STRAIGHT
• 2 ALPHACHANNEL_PREMULTIPLIED
• 3 ALPHACHANNEL_IGNORE
fieldType
Field type, one of the following:
• -1 FIELDTYPE_DEFAULT
• 0 FIELDTYPE_PROGRESSIVE
• 1 FIELDTYPE_UPPERFIRST
• 2 FIELDTYPE_LOWERFIRST
• 0 VR_CONFORM_PROJECTION_NONE
• 1 VR_CONFORM_PROJECTION_EQUIRECTANGULAR
vrLayoutType
The layout of footage in use, for VR. One of these:
• 0 VR_LAYOUT_MONOSCOPIC
• 1 VR_LAYOUT_STEREO_OVER_UNDER
• 2 VR_LAYOUT_STEREO_SIDE_BY_SIDE
15.2.17 ProjectItem.getInPoint()
app.project.rootItem.children[index].getInPoint()
Description
Obtains the current project item in point.
Parameters
None.
Returns
A Time object, containing the in point.
15.2.18 ProjectItem.getMarkers()
app.project.rootItem.children[index].getMarkers()
Description
Retrieves the MarkerCollection object associated with this project item.
Parameters
None.
Returns
MarkerCollection object, read-only;
15.2.19 ProjectItem.getMediaPath()
app.project.rootItem.children[index].getMediaPath()
Description
Returns the path associated with the project item’s media, as a String. NOTE: This only works for atomic media;
this call cannot provide meaningful paths for media which has no actual path (which will be the case for any media
generated by synthetic importers, like Premiere Pro’s own Universal Counting Leader). Also, for image sequences,
only the path to the first image in the sequence will be returned.
Parameters
None.
Returns
A String containing the path to the media associate with the project item.
15.2.20 ProjectItem.getOutPoint()
app.project.rootItem.children[index].getOutPoint(mediaType)
Description
Retrieves the current out point for specified media type.
Parameters
Returns
Returns a Time object.
15.2. Methods 87
Premiere Pro Scripting Guide, Release 22.5
15.2.21 ProjectItem.getProjectMetadata()
app.project.rootItem.children[index].getProjectMetadata()
Description
Retrieves metadata associated with the project item. Distinct from media XMP.
Parameters
None.
Returns
A String containing all Premiere Pro private project metadata, serialized.
15.2.22 ProjectItem.getProjectColumnsMetadata()
app.project.rootItem.children[index].getProjectColumnsMetadata()
Description
Returns a JSON string to the user with all the metadata from the current project view layout
Parameters
None.
Returns A JSON string that can be parsed with JSON.parse() method in the Javascript layer. This generates a list
of objects, each object representing a column. Each object will contain 4 key/value pairs: ColumnName, Column-
Value, ColumnID, ColumnPath. ColumnName and ColumnValue serve as informational key/value. ColumnID and
ColumnPath can be used to modify that column via the method setProjectMetadata() or setXMPMetadata().
For example:
15.2.23 ProjectItem.getProxyPath()
app.project.rootItem.children[index].getProxyPath()
Description
Retrieves the path to the proxy media associated with this project item.
Parameters
None.
Returns
Returns the path (as String) to the proxy media associated with the proxy item, or 0 if none is found.
15.2.24 ProjectItem.getXMPMetadata()
app.project.rootItem.children[index].getXMPMetadata()
Description
Retrieves the XMP metadata associated with the project item, as a String.
Parameters
None.
Returns
A String containing all XMP metadata, serialized.
15.2.25 ProjectItem.hasProxy()
app.project.rootItem.children[index].hasProxy()
Description
Indicates whether a proxy has already been attached, to the project item.
Parameters
None.
Returns
Returns true if the project item has a proxy attached; false if not.
15.2.26 ProjectItem.isMergedClip()
app.project.rootItem.children[index].isMergedClip()
Description
Indicates whether the project item refers to a merged clip.
Parameters
None.
Returns
Returns true if the project item is a merged clip, false if it isn’t.
15.2. Methods 89
Premiere Pro Scripting Guide, Release 22.5
15.2.27 ProjectItem.isMulticamClip()
app.project.rootItem.children[index].isMulticamClip()
Description
Indicates whether the project item refers to a multicam clip.
Parameters
None.
Returns
Returns true if the project item is a multicam clip, false if it isn’t.
15.2.28 ProjectItem.isOffline()
app.project.rootItem.children[index].isOffline()
Description
Returns a Boolean indicating whether the project item is offline.
Parameters
None.
Returns
Boolean, true if offline.
15.2.29 ProjectItem.isSequence()
app.project.rootItem.children[index].isSequence()
Description
Indicates whether the project item refers to a Sequence object.
Parameters
None.
Returns
Returns true if the project item is a Sequence object, or a multicam clip, or a merged clip. Returns false if it isn’t
any of those.
15.2.30 ProjectItem.moveBin()
app.project.rootItem.children[index].moveBin(newParentBinProjectItem)
Description
Moves the projectItem into a new parent bin.
Parameters
None.
Returns
Returns 0 if move was successful.
15.2.31 ProjectItem.refreshMedia()
app.project.rootItem.children[index].refreshMedia()
Description
Forces Premiere Pro to update its representation of the media associated with the project item. If the media was
previously off-line, this can cause it to become online (if previously missing media has become available).
Parameters
None.
Returns
An array of markers associated with the project item, or 0 if there are no markers.
15.2.32 ProjectItem.renameBin()
app.project.rootItem.children[index].renameBin(newName)
Description
Changes name of bin. Only works on project items which are bins.
Parameters
Returns
Returns 0 if renaming bin was successful.
15.2. Methods 91
Premiere Pro Scripting Guide, Release 22.5
15.2.33 ProjectItem.select()
app.project.rootItem.children[index].select()
Description
Sets the project item (which must be a bin), as the target for subsequent imports into the project.
Parameters
None.
Returns
Returns 0 if the project item has successfully been made the target, for subsequent imports.
15.2.34 ProjectItem.setColorLabel()
app.project.rootItem.children[index].setColorLabel(labelColor)
Description
Sets the project item’s color label.
Parameters
Returns
0 if successful.
15.2.35 ProjectItem.setFootageInterpretation()
app.project.rootItem.children[index].setFootageInterpretation(interpretation)
Description
Returns a structure describing the current interpretation of the projectItem.
Parameters
Returns
true if successful.
15.2.36 ProjectItem.setInPoint()
app.project.rootItem.children[index].setInPoint(time, mediaType)
Description
Sets the in point to timeInTicks, for specified media types.
Parameters
Returns
Returns 0 if successful.
15.2.37 ProjectItem.setOffline()
app.project.rootItem.children[index].setOffline()
Description
Makes the project item offline.
Parameters
None.
Returns
true if successful.
15.2.38 ProjectItem.setOutPoint()
app.project.rootItem.children[index].setOutPoint(time, mediaType)
Description
Sets the out point to timeInTicks, for specified media types.
Parameters
Returns
Returns 0 if successful.
15.2. Methods 93
Premiere Pro Scripting Guide, Release 22.5
15.2.39 ProjectItem.setOverrideFrameRate()
app.project.rootItem.children[index].setOverrideFrameRate(newFrameRate)
Description
Sets the frame rate of the project item.
Parameters
Returns
Returns 0 if the frame rate has successfully been changed.
15.2.40 ProjectItem.setOverridePixelAspectRatio()
app.project.rootItem.children[index].setOverridePixelAspectRatio(numerator, denominator)
Description
Sets the pixel aspect ratio for the project item.
Parameters
Returns
Returns 0 if the aspect ratio has successfully been changed.
15.2.41 ProjectItem.setProjectMetadata()
app.project.rootItem.children[index].setProjectMetadata(newMetadata, updatedFields)
Description
Sets the private project metadata associated with the project item.
Parameters
Returns
Returns 0 if update was successful.
15.2.42 ProjectItem.setScaleToFrameSize()
app.project.rootItem.children[index].setScaleToFrameSize()
Description
Turns on scaling to frame size, for when media from this project item is inserted into a sequence.
Parameters
None.
Returns
Undefined return value.
15.2.43 ProjectItem.setStartTime()
app.project.rootItem.children[index].setStartTime(time)
Description
Assigns a new start time to the project item
Parameters
Returns
Returns 0 if successful.
15.2.44 ProjectItem.setXMPMetadata()
app.project.rootItem.children[index].setXMPMetadata(newXMP)
Description
Sets the XMP metadata associated with the project item.
Parameters
Returns
Returns 0 if update was successful.
15.2. Methods 95
Premiere Pro Scripting Guide, Release 22.5
15.2.45 ProjectItem.startTime()
app.project.rootItem.children[index].startTime()
Description
Returns a Time object, representing start time.
Parameters
None.
Returns
Time object.
15.2.46 ProjectItem.videoComponents()
app.project.rootItem.children[index].videoComponents()
Description
Video components for the ‘Master Clip’ of this project item.
Type
ComponentCollection object, read-only.
SIXTEEN
TRACKITEM OBJECT
app.project.sequences[index].audioTracks[index].clips[index]
app.project.sequences[index].videoTracks[index].clips[index]
Description
The trackItem object represents an item on a video or audio track, within a Sequence object.
16.1 Attributes
16.1.1 TrackItem.components
app.project.sequences[index].audioTracks[index].clips[index].components
app.project.sequences[index].videoTracks[index].clips[index].components
Description
The components associated with this trackItem. This can include intrinsic transformations, as well as video and audio
effects.
Type
ComponentCollection object, read-only;
16.1.2 TrackItem.duration
app.project.sequences[index].audioTracks[index].clips[index].duration
app.project.sequences[index].videoTracks[index].clips[index].duration
Description
The duration of the trackItem.
Type
Time object, read-only.
97
Premiere Pro Scripting Guide, Release 22.5
16.1.3 TrackItem.end
app.project.sequences[index].audioTracks[index].clips[index].end
app.project.sequences[index].videoTracks[index].clips[index].end
Description
The ending time of the trackItem. Note: This may differ, from the trackItem’s out point.
Type
Time object, read/write.
16.1.4 TrackItem.inPoint
app.project.sequences[index].audioTracks[index].clips[index].inPoint
app.project.sequences[index].videoTracks[index].clips[index].inPoint
Description
The in point for media, in this trackItem.
Type
Time object, read/write.
16.1.5 TrackItem.matchName
app.project.sequences[index].audioTracks[index].clips[index].matchName
app.project.sequences[index].videoTracks[index].clips[index].matchName
Description
Add a description
Type
String; read-only.
16.1.6 TrackItem.mediaType
app.project.sequences[index].audioTracks[index].clips[index].mediaType
app.project.sequences[index].videoTracks[index].clips[index].mediaType
Description
The mediaType of media provided by this trackItem.
Type
String, either Audio or Video.
16.1.7 TrackItem.name
app.project.sequences[index].audioTracks[index].clips[index].name
app.project.sequences[index].videoTracks[index].clips[index].name
Description
The name of the track item.
Type
String; read/write.
16.1.8 TrackItem.nodeId
app.project.sequences[index].audioTracks[index].clips[index].nodeId
app.project.sequences[index].videoTracks[index].clips[index].nodeId
Description
Add a description
Type
String.
16.1. Attributes 99
Premiere Pro Scripting Guide, Release 22.5
16.1.9 TrackItem.outPoint
app.project.sequences[index].audioTracks[index].clips[index].outPoint
app.project.sequences[index].videoTracks[index].clips[index].outPoint
Description
The out point for media, in this trackItem.
Type
Time object, read/write.
16.1.10 TrackItem.projectItem
app.project.sequences[index].audioTracks[index].clips[index].projectItem
app.project.sequences[index].videoTracks[index].clips[index].projectItem
Description
The ProjectItem object from which the media is being drawn.
Type
A ProjectItem object.
16.1.11 TrackItem.start
app.project.sequences[index].audioTracks[index].clips[index].start
app.project.sequences[index].videoTracks[index].clips[index].start
Description
The starting time of the trackItem. Note: This may differ, from the trackItem’s in point.
Type
Time object, read/write.
16.1.12 TrackItem.type
app.project.sequences[index].audioTracks[index].clips[index].type
app.project.sequences[index].videoTracks[index].clips[index].type
Description
The type of media provided by this trackItem.
Type
Number, 1 means video, 2 means audio.
16.2 Methods
16.2.1 TrackItem.getSpeed()
app.project.sequences[index].audioTracks[index].clips[index].getSpeed()
app.project.sequences[index].videoTracks[index].clips[index].getSpeed()
Description
Returns the speed multiplier applied to the trackItem.
Parameters
None.
Returns
Returns the speed multiplier applied to the trackItem, as a float. No speed adjustment = 1.
16.2.2 TrackItem.isAdjustmentLayer()
app.project.sequences[index].audioTracks[index].clips[index].isAdjustmentLayer()
app.project.sequences[index].videoTracks[index].clips[index].isAdjustmentLayer()
Description
Returns wheter the trackItem is an adjustment layer.
Parameters
None.
Returns
Returns true if the trackitem is an adjustment layer; false if not.
16.2.3 TrackItem.isSpeedReversed()()
app.project.sequences[index].audioTracks[index].clips[index].isSpeedReversed()()
app.project.sequences[index].videoTracks[index].clips[index].isSpeedReversed()()
Description
Returns whether the trackItem is reversed.
Parameters
None.
Returns
Returns 1 if trackItem is reversed; 0 if not.
16.2.4 TrackItem.isSelected()
app.project.sequences[index].audioTracks[index].clips[index].isSelected()
app.project.sequences[index].videoTracks[index].clips[index].isSelected()
Description
Retrieves the current selection state of the trackItem.
Parameters
None.
Returns
Returns true if trackItem is selected; false if not.
16.2.5 TrackItem.setSelected()
app.project.sequences[index].audioTracks[index].clips[index].setSelected(state, updateUI)
app.project.sequences[index].videoTracks[index].clips[index].setSelected(state, updateUI)
Description
Sets the selection state of the trackItem.
Parameters
Returns
Returns 0 if successful.
16.2.6 TrackItem.getMatchName()
app.project.sequences[index].audioTracks[index].clips[index].getMatchName()
app.project.sequences[index].videoTracks[index].clips[index].getMatchName()
Description
Retrieves the match name for the trackItem.
Parameters
None.
Returns
Returns the match name as a String if successful.
16.2.7 TrackItem.remove()
app.project.sequences[index].audioTracks[index].clips[index].remove(inRipple,
inAlignToVideo)
app.project.sequences[index].videoTracks[index].clips[index].remove(inRipple,
inAlignToVideo)
Description
Sets the selection state of the trackItem.
Parameters
Returns
Returns 0 if successful.
16.2.8 TrackItem.disabled
app.project.sequences[index].audioTracks[index].clips[index].disabled
app.project.sequences[index].videoTracks[index].clips[index].disabled
Description
Sets the disabled state of the trackItem. Read/Write.
Parameters
Returns
Returns 0 if successful.
16.2.9 TrackItem.move()
app.project.sequences[index].audioTracks[index].clips[index].move(newInPoint)
app.project.sequences[index].videoTracks[index].clips[index].move(newInPoint)
Description
Moves the inPoint of the track item to a new time.
Parameters
Returns
Returns 0 if successful.
SEVENTEEN
COMPONENT OBJECT
app.project.sequences[index].audioTracks[index].clips[index].components[index]
app.project.sequences[index].videoTracks[index].clips[index].components[index]
Description
The component object represents something which has been added or applied to a trackItem.
17.1 Attributes
17.1.1 Component.displayName
app.project.sequences[index].audioTracks[index].clips[index].components[index].
displayName
app.project.sequences[index].videoTracks[index].clips[index].components[index].
displayName
Description
The name of the component, as it is displayed to the user. Localized.
Type
String; read-only.
17.1.2 Component.matchName
app.project.sequences[index].audioTracks[index].clips[index].components[index].matchName
app.project.sequences[index].videoTracks[index].clips[index].components[index].matchName
Description
The name of the component, as it is loaded from disk; used to uniquely identify effect plug-ins.
Type
105
Premiere Pro Scripting Guide, Release 22.5
String; read-only.
17.1.3 Component.properties
app.project.sequences[index].audioTracks[index].clips[index].components[index].properties
app.project.sequences[index].videoTracks[index].clips[index].components[index].properties
Description
The properties of the component in question; typically, these are effect parameters.
Type
Array of components, read-only; (ComponentParamCollection object).
EIGHTEEN
COMPONENTPARAM OBJECT
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index]
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index]
Description
The component parameter object represents a parameter associated with a component, applied to a TrackItem object.
18.1 Attributes
18.1.1 ComponentParam.displayName
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].displayName
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].displayName
Description
The name of the component parameter, as it is displayed to the user. Localized.
Type
String; read-only.
107
Premiere Pro Scripting Guide, Release 22.5
18.2 Methods
18.2.1 ComponentParam.addKey()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].addKey(time)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].addKey(time)
Description
Adds a keyframe to the component parameter stream, at the specified time. Note: This can only be set on parameters
which support keyframing.
Parameters
Returns
Returns 0 if successful.
18.2.2 ComponentParam.areKeyframesSupported()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].areKeyframesSupported()
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].areKeyframesSupported()
Description
Retrieves whether keyframes are supported, for this component parameter.
Parameters
None.
Returns
Returns true if keyframes are supported; false if not.
18.2.3 ComponentParam.findNearestKey()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].findNearestKey(timeToCheck,
threshold)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].findNearestKey(timeToCheck,
threshold)
Description
Sets whether the component parameter varies, over time. Note: This can only be set on parameters which support
keyframing.
Parameters
Returns
Returns a Time value, indicating when the closest keyframe is.
18.2.4 ComponentParam.findNextKey()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].findNextKey(timeToCheck)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].findNextKey(timeToCheck)
Description
Returns the keyframe temporally subsequent to the provided timeToCheck. Note: This can only be set on parameters
which support keyframing.
Parameters
Returns
Returns a Time value, indicating when the closest keyframe is, or 0 if there is no available subsequent keyframe.
18.2.5 ComponentParam.findPreviousKey()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].findPreviousKey(timeToCheck)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].findPreviousKey(timeToCheck)
Description
Returns the keyframe temporally previous to the provided timeToCheck. Note: This can only be set on parameters
which support keyframing.
Parameters
Returns
Returns a Time value, indicating when the closest keyframe is, or 0 if there is no available previous keyframe.
18.2.6 ComponentParam.getColorValue()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].getColorValue()
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].getColorValue()
Description
Obtains the value of the component parameter stream. Note: This can only work on parameters which are not time-
variant.
Parameters
None.
Returns
Returns a Color containing the values found in the component parameter stream, or 0 if unsuccessful.
18.2.7 ComponentParam.getKeys()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].getKeys()
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].getKeys()
Description
Returns an array of all keyframes on the timeToCheck component parameter. Note: This can only be set on parameters
which support keyframing.
Parameters
None.
Returns
Returns an Array of Time values, indicating at what time each keyframe occurs, or 0 if no keyframes are available.
18.2.8 ComponentParam.getValue()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].getValue()
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].getValue()
Description
Obtains the value of the component parameter stream. Note: This can only work on parameters which are not time-
variant.
Parameters
None.
Returns
Returns the value of the component parameter stream; the return varies with stream type.
18.2.9 ComponentParam.getValueAtKey()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].getValueAtKey(time)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].getValueAtKey(time)
Description
Retrieves the value of the component parameter stream, at the specified keyframe time. Note: Can only be used with
keyframeable parameter streams.
Parameters
Returns
18.2.10 ComponentParam.getValueAtTime()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].getValueAtTime(time)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].getValueAtTime(time)
Description
Retrieves the value of the component parameter stream, at the specified time. If the value is between two keyframes
then interpolation takes place.
Parameters
Returns
Returns the value of the component parameter stream at time, or 0 if unsuccessful.
18.2.11 ComponentParam.isTimeVarying()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].isTimeVarying()
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].isTimeVarying()
Description
Retrieves whether the component parameter varies, over time.
Parameters
None.
Returns
Returns true if the parameter varies over time; false if not.
18.2.12 ComponentParam.removeKey()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].removeKey(time)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].removeKey(time)
Description
Removes a keyframe on the component parameter stream, at the specified time. Note: This can only be set on parameters
which support keyframing.
Parameters
Returns
Returns 0 if successful.
18.2.13 ComponentParam.removeKeyRange()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].removeKeyRange(startTime,
endTime)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].removeKeyRange(startTime,
endTime)
Description
Removes all keyframes from the component parameter stream, between the specified times. Note: This can only be set
on parameters which support keyframing.
Parameters
Returns
Returns 0 if successful.
18.2.14 ComponentParam.setColorValue()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].setColorValue(alpha, red, green, blue,
updateUI)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].setColorValue(alpha, red, green, blue,
updateUI)
Description
Sets the values within a component parameter stream, representing a Color.
Parameters
Returns
Returns 0 if successful.
18.2.15 ComponentParam.setInterpolationTypeAtKey()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].setInterpolationTypeAtKey(time,
interpretationType)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].setInterpolationTypeAtKey(time,
interpretationType)
Description
Specifies the interpolation type to be assigned to the keyframe, at the specified time. Note: Can only be used with
keyframeable parameter streams.
Parameters
Returns
Returns 0 if successful.
18.2.16 ComponentParam.setTimeVarying()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].setTimeVarying(varying)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].setTimeVarying(varying)
Description
Sets whether the component parameter varies, over time. Note: This can only be set on parameters which support
keyframing.
Parameters
Returns
Returns 0 if successful.
18.2.17 ComponentParam.setValue()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].setValue(value,
updateUI)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].setValue(value,
updateUI)
Description
Sets the value of the component parameter stream. Note: This can only work on parameters which are not time-variant.
Parameters
Returns
Returns 0 if successful.
18.2.18 ComponentParam.setValueAtKey()
app.project.sequences[index].audioTracks[index].clips[index].components[index].
properties[index].setValueAtKey(time, value,
updateUI)
app.project.sequences[index].videoTracks[index].clips[index].components[index].
properties[index].setValueAtKey(time, value,
updateUI)
Description
Sets the value of the component parameter stream, at the specified keyframe time. Note: Can only be used with
keyframeable parameter streams.
Parameters
Returns
Returns 0 if successful.
NINETEEN
SEQUENCE OBJECT
app.project.sequences[index]
Description
The Sequence object represents sequences of media (a.k.a. “timelines”), in Premiere Pro.
19.1 Attributes
19.1.1 Sequence.audioDisplayFormat
app.project.sequences[index].audioDisplayFormat
Description
Add a description
Type
Number.
19.1.2 Sequence.audioTracks
app.project.sequences[index].audioTracks
Description
An array of audio tracks, within the sequence.
Type
TrackCollection object, read-only;
117
Premiere Pro Scripting Guide, Release 22.5
19.1.3 Sequence.end
app.project.sequences[index].end
Description
The time, in Ticks, of the end of the sequence.
Type
String; read-only.
19.1.4 Sequence.frameSizeHorizontal
app.project.sequences[index].frameSizeHorizontal
Description
The horizontal width of frames, from the sequence.
Type
Integer; read-only.
19.1.5 Sequence.frameSizeVertical
app.project.sequences[index].frameSizeVertical
Description
The vertical height of frames, from the sequence.
Type
Integer; read-only.
19.1.6 Sequence.id
app.project.sequences[index].id
Description
This is the ordinal assigned to the sequence, upon creation. If this is the thirty-third sequence created within the project
during a given Premiere Pro session, this value will be ‘33’.
Type
Integer, read-only.
19.1.7 Sequence.markers
app.project.sequences[index].markers
Description
The Marker objects associated with this sequence.
Type
MarkerCollection object, read-only;
19.1.8 Sequence.name
app.project.sequences[index].name
Description
The name of the sequence.
Type
String; read/write.
19.1.9 Sequence.projectItem
app.project.sequences[index].projectItem
Description
The ProjectItem object associated with this sequence.
Type
projectItem; read-only.
19.1.10 Sequence.sequenceID
app.project.sequences[index].sequenceID
Description
The unique identifier assigned to this sequence, at the time of its creation, in form of
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Type
String; read-only.
19.1.11 Sequence.timebase
app.project.sequences[index].timebase
Description
The number of Ticks per frame, in the sequence.
Type
String; read-only.
19.1.12 Sequence.videoDisplayFormat
app.project.sequences[index].videoDisplayFormat
Description
Add a description
Type
Number.
19.1.13 Sequence.videoTracks
app.project.sequences[index].videoTracks
Description
An array of video tracks, within the sequence.
Type
TrackCollection object, read-only;
19.1.14 Sequence.zeroPoint
app.project.sequences[index].zeroPoint
Description
The starting time, in Ticks, of the sequence.
Type
String; read-only.
19.2 Methods
19.2.1 Sequence.autoReframeSequence()
Returns
Returns the new Sequence object, if successful; 0 if unsuccessful.
Example
if (newSequence) {
alert('Created reframed sequence: ' + newName + '.');
} else {
alert('Failed to create re-framed sequence: ' + newName + '.');
}
} else {
alert('No active sequence');
}
19.2.2 Sequence.clone()
app.project.sequences[index].clone()
Description
Creates a clone of the given sequence.
Parameters
None.
Returns
Returns a boolean indicating whether the cloning was successful.
19.2.3 Sequence.createSubsequence()
app.project.sequences[index].createSubsequence(ignoreTrackTargeting)
Description
Creates a new sequence, which is a sub-sequence of the existing sequence.
Parameters
Returns
Returns the newly-created sequence, or 0 if unsuccessful.
19.2.4 Sequence.exportAsFinalCutProXML()
app.project.sequences[index].exportAsFinalCutProXML(outputPath)
Description
Creates a new FCP XML representation of the sequence, and its constituent media.
Parameters
Returns
Returns 0 if successful.
19.2.5 Sequence.exportAsMediaDirect()
Returns
Returns 0 if successful.
19.2.6 Sequence.exportAsProject()
app.project.sequences[index].exportAsProject(outputPath)
Description
Creates a new Project object containing only the given sequence, and its constituent media.
Parameters
Returns
Returns 0 if successful.
19.2.7 Sequence.getExportFileExtension()
app.project.sequences[index].getExportFileExtension(outputPresetPath)
Description
Retrieves the file extension associated with the current sequence.
Parameters
Returns
Returns a String containing the output file extension, or 0 if unsuccessful.
19.2.8 Sequence.getInPoint()
app.project.sequences[index].getInPoint()
Description
Retrieves the current sequence in point, in seconds.
Parameters
None.
Returns
Returns a Real representing the in point, in seconds.
19.2.9 Sequence.getInPointAsTime()
app.project.sequences[index].getInPointAsTime()
Description
Retrieves the current sequence in point.
Parameters
None.
Returns
Returns a Time object representing the in point, in seconds.
19.2.10 Sequence.getOutPoint()
app.project.sequences[index].getOutPoint()
Description
Retrieves the current sequence out point, in seconds.
Parameters
None.
Returns
Returns a Real representing the out point, in seconds.
19.2.11 Sequence.getOutPointAsTime()
app.project.sequences[index].getOutPointAsTime()
Description
Retrieves the current sequence out point.
Parameters
None.
Returns
Returns a Time object representing the out point, in seconds.
19.2.12 Sequence.getPlayerPosition()
app.project.sequences[index].getPlayerPosition()
Description
Retrieves the current player position, in Ticks.
Parameters
None.
Returns
Returns a Time object, representing the current player position.
19.2.13 Sequence.getSettings()
app.project.sequences[index].getSettings()
Description
Retrieves the settings of the current sequence.
Parameters
None.
Returns
Returns a sequence settings structure.
audioDisplayFormat
Audio timecode display format. One of the following:
• 100 TIMEDISPLAY_24Timecode
• 101 TIMEDISPLAY_25Timecode
• 102 TIMEDISPLAY_2997DropTimecode
• 103 TIMEDIS-
PLAY_2997NonDropTimecode
• 104 TIMEDISPLAY_30Timecode
• 105 TIMEDISPLAY_50Timecode
• 106 TIMEDISPLAY_5994DropTimecode
• 107 TIMEDIS-
PLAY_5994NonDropTimecode
• 108 TIMEDISPLAY_60Timecode
• 109 TIMEDISPLAY_Frames
• 110 TIMEDISPLAY_23976Timecode
• 111 TIMEDISPLAY_16mmFeetFrames
• 112 TIMEDISPLAY_35mmFeetFrames
• 113 TIMEDISPLAY_48Timecode
• 200 TIMEDIS-
PLAY_AudioSamplesTimecode
• 201 TIMEDISPLAY_AudioMsTimecode
19.2.14 Sequence.isDoneAnalyzingForVideoEffects()
app.project.sequences[index].isDoneAnalyzingForVideoEffects()
Description
Returns whether or not the sequence is done analyzing for video effects.
Parameters
None.
Returns
Returns true if analysis is complete.
19.2.15 Sequence.performCutDetectionOnSelection()
app.project.sequences[index].performCutDetectionOnSelection(actionDesired,
applyCutsToLinkedAudio, sensitivity)
Description
Performs cut detection on the sequence selection.
Parameters
applyCutsToLinkedAudio Boolean
sensitivity String One of:
• “LowSensitivity”
• “MediumSensitivity”
• “HighSensitivity”
Returns
Returns true if successful.
19.2.16 Sequence.setInPoint()
app.project.sequences[index].setInPoint(time)
Description
Specifies a new sequence in point.
Parameters
Returns
Returns 0 if successful.
19.2.17 Sequence.setOutPoint()
app.project.sequences[index].setOutPoint(time)
Description
Specifies a new sequence out point.
Parameters
Returns
Returns 0 if successful.
19.2.18 Sequence.setPlayerPosition()
app.project.sequences[index].setPlayerPosition(time)
Description
Specifies a new player position, in Ticks, as a String.
Parameters
Returns
Returns 0 if successful.
19.2.19 Sequence.setSettings()
app.project.sequences[index].setSettings(sequenceSettings)
Description
Sets the settings of the current sequence. [Editorial: I apologize for any perceived pedantry; sometimes, obvious
documentation needs to be obvious. -bbb]
Parameters
Returns
Returns 0 if successful.
19.2.20 Sequence.setZeroPoint()
app.project.sequences[index].setZeroPoint(newZeroPoint)
Description
Set the starting time of the sequence.
Parameters
Type
Integer; read-only.
Returns
Returns 0 if successful.
TWENTY
TRACK OBJECT
app.project.sequences[index].audioTracks[index]
app.project.sequences[index].videoTracks[index]
Description
The Track object represents a video or audio track, within a Sequence object.
20.1 Attributes
20.1.1 Track.clips
app.project.sequences[index].audioTracks[index].clips
app.project.sequences[index].videoTracks[index].clips
Description
An array of Track item objects, contained within the track, in temporal order.
Type
TrackItemCollection object, read-only;
20.1.2 Track.id
app.project.sequences[index].audioTracks[index].id
app.project.sequences[index].videoTracks[index].id
Description
This is the ordinal assigned to the track, upon creation.
Type
Integer, read-only.
131
Premiere Pro Scripting Guide, Release 22.5
20.1.3 Track.mediaType
app.project.sequences[index].audioTracks[index].mediaType
app.project.sequences[index].videoTracks[index].mediaType
Description
The type of media, contained in this track.
Type
String, read-only; valid values are Audio and Video.
20.1.4 Track.name
app.project.sequences[index].audioTracks[index].name
app.project.sequences[index].videoTracks[index].name
Description
The name of the track.
Type
String; read-only.
20.1.5 Track.transitions
app.project.sequences[index].audioTracks[index].transitions
app.project.sequences[index].videoTracks[index].transitions
Description
An array of transitions objects, contained within the track, in temporal order.
Type
TrackItemCollection object, read-only;
20.2 Methods
20.2.1 Track.insertClip()
app.project.sequences[index].audioTracks[index].insertClip(projectItem, time)
app.project.sequences[index].videoTracks[index].insertClip(projectItem, time)
Description
Adds a ‘clip’ (media segment from a ProjectItem object) to the track, at the specified time. Media will be inserted, at
that time.
Parameters
Returns
None.
20.2.2 Track.isMuted()
app.project.sequences[index].audioTracks[index].isMuted()
app.project.sequences[index].videoTracks[index].isMuted()
Description
Retrieves the current mute state, of the track.
Parameters
None.
Returns
Returns true if track is currently muted; false if not.
20.2.3 Track.overwriteClip()
app.project.sequences[index].audioTracks[index].overwriteClip(projectItem, time)
app.project.sequences[index].videoTracks[index].overwriteClip(projectItem, time)
Description
Adds a ‘clip’ (media segment from a ProjectItem object) to the track, at the specified time. This will overwrite any
existing media, at that time.
Parameters
Returns
Returns true.
20.2.4 Track.setMute()
app.project.sequences[index].audioTracks[index].setMute(isMuted)
app.project.sequences[index].videoTracks[index].setMute(isMuted)
Description
Sets the mute state, of the track.
Parameters
Returns
Returns 0 if successful.
TWENTYONE
AUDIOCHANNELMAPPING OBJECT
app.project.rootItem.children[index].getAudioChannelMapping
Description
The AudioChannelMapping object defines the audio channel mapping applied to a given ProjectItem object.
21.1 Attributes
21.1.1 AudioChannelMapping.audioChannelsType
app.project.rootItem.children[index].getAudioChannelMapping.audioChannelsType
Description
The type of the audio contained in this channel. Will be 0, 1 or 2, corresponding to AUDIOCHANNELTYPE_Mono,
AUDIOCHANNELTYPE_Stereo, or AUDIOCHANNELTYPE_51.
21.1.2 AudioChannelMapping.audioClipsNumber
app.project.rootItem.children[index].getAudioChannelMapping.audioClipsNumber
Description
The number of audio clips associated with this audio channel.
21.2 Methods
21.2.1 AudioChannelMapping.setMappingForChannel()
app.project.rootItem.children[index].setMappingForChannel(channelIndex,
sourceChannelIndex)
Description
Maps a source channel to the specified channel index.
135
Premiere Pro Scripting Guide, Release 22.5
Parameters
Returns
Returns true if successful, false if that mapping is unsupported.
TWENTYTWO
TIME OBJECT
22.1 Attributes
22.1.1 Time.seconds
myTime.seconds
Description
The time value, expressed in seconds.
Type
Number.
22.1.2 Time.ticks
myTime.ticks
Description
The time value, expressed in ticks.
Type
String.
137
Premiere Pro Scripting Guide, Release 22.5
22.2 Methods
22.2.1 Time.getFormatted()
myTime.getFormatted(frameRate, displayFormat)
Description
Returns the value of the Time passed, as a string, formatted in the specified display format.
Parameters
Returns
A String.
22.2.2 Time.setSecondsAsFraction()
myTime.setSecondsAsFraction(numerator, denominator)
Description
Sets the Time object to the result of dividing the numerator by the denominator.
Parameters
Both the numerator and the denominator are ints.
Returns
Boolean; true if successful.
TWENTYTHREE
COLLECTION OBJECT
Like an array, a collection associates a set of objects or values as a logical group and provides access to them by index.
However, most collection objects are read-only. You do not assign objects to them yourself — their contents update
automatically as objects are created or deleted.
23.1 Objects
23.2 Attributes
23.3 Methods
[] Retrieves an object in the collection by its index number. The first object is at index 0.
141
Premiere Pro Scripting Guide, Release 22.5
TWENTYFOUR
COMPONENTCOLLECTION OBJECT
app.project.rootItem.children[index].videoComponents()
app.project.sequences[index].audioTracks[index].clips[index].components
app.project.sequences[index].videoTracks[index].clips[index].components
add a description
ComponentCollection is a subclass of Collection object. All methods and attributes of Collection, in
addition to those listed below, are available when working with ComponentCollection.
24.1 Attributes
24.1.1 ComponentCollection.numItems
app.project.rootItem.children[index].videoComponents().numItems
app.project.sequences[index].audioTracks[index].clips[index].components.numItems
app.project.sequences[index].videoTracks[index].clips[index].components.numItems
Description
add a description
Type
Integer, read-only.
143
Premiere Pro Scripting Guide, Release 22.5
TWENTYFIVE
MARKERCOLLECTION OBJECT
app.project.sequences[index].markers
app.project.rootItem.children[index].getMarkers()
The MarkerCollection object represents a collection of Marker objects in a ProjectItem object and Sequence object.
MarkerCollection is a subclass of Collection object. All methods and attributes of Collection, in addition
to those listed below, are available when working with MarkerCollection.
25.1 Attributes
25.1.1 MarkerCollection.numMarkers
app.project.sequences[index].markers.numMarkers
app.project.rootItem.children[index].getMarkers().numMarkers
Description
The count of marker objects in the project item or sequence.
Type
Integer, read-only.
25.2 Methods
25.2.1 MarkerCollection.createMarker()
app.project.sequences[index].markers.createMarker(time)
app.project.rootItem.children[index].getMarkers().createMarker(time)
Description
Create a new Marker object on a project item or a sequence.
145
Premiere Pro Scripting Guide, Release 22.5
Parameters
Returns
Marker object if successful.
25.2.2 MarkerCollection.deleteMarker()
app.project.sequences[index].markers.deleteMarker(marker)
app.project.rootItem.children[index].getMarkers().deleteMarker(marker)
Description
Remove a given marker object from a collection.
Parameters
Returns
Boolean.
Examples
Remove all markers from the active sequence
while (marker) {
markers.deleteMarker(marker);
marker = markers.getFirstMarker();
}
25.2.3 MarkerCollection.getFirstMarker()
app.project.sequences[index].markers.getFirstMarker()
app.project.rootItem.children[index].getMarkers().getFirstMarker()
Description
Retrieve the first marker object, sorted by time in seconds, on a given project item or sequence.
Parameters
None.
Returns
Marker object or undefined.
25.2.4 MarkerCollection.getLastMarker()
app.project.sequences[index].markers.getLastMarker()
app.project.rootItem.children[index].getMarkers().getLastMarker()
Description
Retrieve the very last marker object, sorted by time in seconds, on a given project item or sequence.
Parameters
None.
Returns
Marker object or undefined.
25.2.5 MarkerCollection.getNextMarker()
app.project.sequences[index].markers.getNextMarker(currentMarker)
app.project.rootItem.children[index].getMarkers().getNextMarker(currentMarker)
Description
Get the next available marker, sorted by seconds, starting from a given one.
Parameters
Returns
Marker object or undefined.
25.2.6 MarkerCollection.getPrevMarker()
app.project.sequences[index].markers.getPrevMarker(currentMarker)
app.project.rootItem.children[index].getMarkers().getPrevMarker(currentMarker)
Description
Get the previous available marker, sorted by seconds, starting from a given one.
Parameters
Returns
Marker object or undefined.
TWENTYSIX
PROJECTCOLLECTION OBJECT
app.projects
app.production.projects
26.1 Attributes
26.1.1 ProjectCollection.numProjects
app.projects.numProjects
app.production.projects.numProjects
Description
The total number of projects and productions found in the Project panel.
Type
Integer, read-only.
149
Premiere Pro Scripting Guide, Release 22.5
TWENTYSEVEN
PROJECTITEMCOLLECTION OBJECT
app.project.rootItem.children
The ProjectItemCollection object represents a collection of ProjectItem objects in an active project.
ProjectItemCollection is a subclass of Collection object. All methods and attributes of Collection, in
addition to those listed below, are available when working with ProjectItemCollection.
27.1 Attributes
27.1.1 ProjectItemCollection.numItems
app.project.rootItem.children.numItems
Description
The total number of items in the active project.
Type
Integer, read-only.
151
Premiere Pro Scripting Guide, Release 22.5
TWENTYEIGHT
SEQUENCECOLLECTION OBJECT
app.project.sequences
The SequenceCollection object represents a collection of all the Sequence objects in the active project.
SequenceCollection is a subclass of Collection object. All methods and attributes of Collection, in addition
to those listed below, are available when working with SequenceCollection.
28.1 Attributes
28.1.1 SequenceCollection.numSequences
app.project.sequences.numSequences
Description
The total number of sequences in the active project.
Type
Integer, read-only.
153
Premiere Pro Scripting Guide, Release 22.5
TWENTYNINE
TRACKCOLLECTION OBJECT
app.project.sequences[index].audioTracks
app.project.sequences[index].videoTracks
29.1 Attributes
29.1.1 TrackCollection.numTracks
app.project.sequences[index].audioTracks.numTracks
app.project.sequences[index].videoTracks.numTracks
Description
The total number of tracks in the sequence.
Type
Integer, read-only.
155
Premiere Pro Scripting Guide, Release 22.5
THIRTY
TRACKITEMCOLLECTION OBJECT
app.project.sequences[index].audioTracks[index].clips
app.project.sequences[index].videoTracks[index].clips
30.1 Attributes
30.1.1 TrackItemCollection.numItems
app.project.sequences[index].audioTracks[index].clips.numItems
app.project.sequences[index].videoTracks[index].clips.numItems
Description
The total number of clips on a track.
Type
Integer, read-only.
157