Sequence object¶
app.project.sequences[index]
Description
The Sequence object represents sequences of media, or ‘timelines’, in Premiere Pro.
Attributes¶
Sequence.audioDisplayFormat¶
app.project.sequences[index].audioDisplayFormat
Description
The audio display format of the sequence.
Set this attribute with the Sequence.setSettings() method.
Type
An enumerated value; read/write. One of:
|
Audio Samples |
|
Milliseconds |
Sequence.audioTracks¶
app.project.sequences[index].audioTracks
Description
An array of audio Track objects in the sequence.
Type
TrackCollection object; read-only.
Sequence.end¶
app.project.sequences[index].end
Description
The time, in ticks, of the end of the sequence.
Type
String; read-only.
Sequence.frameSizeHorizontal¶
app.project.sequences[index].frameSizeHorizontal
Description
The horizontal frame size, or width, of the sequence.
Set this attribute with the Sequence.setSettings() method.
Type
Integer; read-only.
Sequence.frameSizeVertical¶
app.project.sequences[index].frameSizeVertical
Description
The vertical frame size, or height, of the sequence.
Set this attribute with the Sequence.setSettings() method.
Type
Integer; read-only.
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.
Note
In testing, this attribute seems unstable and produces unreliable results. Recommend using Sequence.sequenceID instead.
Sequence.markers¶
app.project.sequences[index].markers
Description
An array of Marker objects in the sequence.
Type
MarkerCollection object, read-only;
Sequence.name¶
app.project.sequences[index].name
Description
The name of the sequence.
Type
String; read/write.
Sequence.projectItem¶
app.project.sequences[index].projectItem
Description
The ProjectItem object associated with the sequence.
Type
ProjectItem object; read-only.
Note
Not all sequences will have a projectItem
. There may be sequences in a project that Premiere generates that are invisible to the user, these do not have projectItems
Sequence.sequenceID¶
app.project.sequences[index].sequenceID
Description
The unique identifier assigned to this sequence, at the time of its creation, in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Type
String; read-only.
Sequence.timebase¶
app.project.sequences[index].timebase
Description
The number of ticks per frame in the sequence. Converted to seconds, this is commonly referred to as the frame duration of the sequence.
Type
String; read-only.
Sequence.videoDisplayFormat¶
app.project.sequences[index].videoDisplayFormat
Description
The video display format of the sequence.
Set this attribute with the Sequence.setSettings() method.
Type
An enumerated value; read/write. One of:
|
24 Timecode |
|
25 Timecode |
|
29.97 Drop Timecode |
|
29.97 Non-Drop Timecode |
|
30 Timecode |
|
50 Timecode |
|
59.94 Drop Timecode |
|
59.94 Non-Drop Timecode |
|
60 Timecode |
|
Frames |
|
23.976 Timecode |
|
16mm Feet + Frames |
|
35mm Feet + Frames |
|
48 Timecode |
Sequence.videoTracks¶
app.project.sequences[index].videoTracks
Description
An array of video Track objects in the sequence.
Type
TrackCollection object; read-only.
Sequence.zeroPoint¶
app.project.sequences[index].zeroPoint
Description
The starting time, in ticks, of the sequence.
Set this attribute with the Sequence.setZeroPoint() method.
Type
String; read-only.
Methods¶
Sequence.attachCustomProperty()¶
app.project.sequences[index].attachCustomProperty(propertyID, propertyValue)
Description
Attaches a custom property, and its value, to the sequence. This property is visible if/when the sequence is exported to FCP XML.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
ID of custom property. |
|
|
Value of custom property. |
Returns
Returns a boolean; true
if successful.
Sequence.autoReframeSequence()¶
app.project.sequences[index].autoReframeSequence(numerator, denominator, motionPreset, newName, useNestedSequences)
Description
Generates a new, auto-reframed sequence.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
Numerator of desired frame aspect ratio. |
|
|
Denominator of desired frame aspect ratio. |
|
|
One of: |
|
|
A name for a newly created sequence. |
|
|
Whether to honor nested sequence. |
Returns
Returns the new Sequence object.
Example
var sequence = app.project.activeSequence;
if (sequence) {
var numerator = 1;
var denominator = 1;
var motionPreset = 'default'; // 'default', 'faster', 'slower'
var newName = sequence.name + ', auto-reframed.';
var useNestedSequences = false;
var newSequence = sequence.autoReframeSequence(numerator, denominator, motionPreset, newName, useNestedSequences);
if (newSequence) {
alert('Created reframed sequence: ' + newName + '.');
} else {
alert('Failed to create re-framed sequence: ' + newName + '.');
}
} else {
alert('No active sequence');
}
Sequence.clone()¶
app.project.sequences[index].clone()
Description
Creates a clone, or a duplicate, of the sequence.
Parameters
None.
Returns
Returns a boolean; true
if successful.
Sequence.close()¶
app.project.sequences[index].close()
Description
Closes the sequence.
Parameters
None.
Returns
Returns a boolean; true
if successful.
Sequence.createSubsequence()¶
app.project.sequences[index].createSubsequence(ignoreTrackTargeting)
Description
Creates a new sequence, from the in point to the out point, which is a sub-sequence of the original sequence.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
Whether the new sequence should ignore the track targeting, in the original sequence. Optional, default is |
Returns
Returns the newly-created Sequence object.
Note
This is not the same as nesting. The newly-created sequence is not inserted back into the original sequence. To nest, see the example function below.
Example
function nestSelection() {
var activeSequence = app.project.activeSequence;
var selection = activeSequence.getSelection();
if (!selection.length) {
return;
}
var trackId = selection[0].parentTrackIndex;
var originalInPoint = activeSequence.getInPointAsTime();
var originalOutPoint = activeSequence.getOutPointAsTime();
var start = selection[0].start;
var end = selection[selection.length - 1].end;
activeSequence.setInPoint(start.seconds);
activeSequence.setOutPoint(end.seconds);
var nestedSequence = activeSequence.createSubsequence(true);
activeSequence.videoTracks[trackId].overwriteClip(nestedSequence.projectItem, start.seconds);
activeSequence.setInPoint(originalInPoint.seconds);
activeSequence.setOutPoint(originalOutPoint.seconds);
return nestedSequence;
}
Sequence.exportAsFinalCutProXML()¶
app.project.sequences[index].exportAsFinalCutProXML(outputPath)
Description
Creates a new FCP XML representation of the sequence and its constituent media.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
The output path for the new FCP XML file. |
Returns
Returns a boolean; true
if successful.
Sequence.exportAsMediaDirect()¶
app.project.sequences[index].exportAsMediaDirect(outputPath, presetPath, workAreaType)
Description
Renders the sequence to the specified output path, using the specified output preset (.epr file), and honoring the specified work area type.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
An output path, to which to render the media. |
|
|
Path to the preset file (.epr file) which contains the encoding settings. |
|
|
The work area type to be rendered (see below). |
|
Description |
---|---|
|
Renders the entire sequence. |
|
Renders between the in and out point of the sequence. |
|
Renders the work area of the sequence. |
Returns
Returns a boolean; true
if successful.
Sequence.exportAsProject()¶
app.project.sequences[index].exportAsProject(outputPath)
Description
Creates a new Project object containing only the given sequence and its constituent media.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
The output path for the new project. |
Returns
Returns a boolean; true
if successful.
Sequence.getExportFileExtension()¶
app.project.sequences[index].getExportFileExtension(outputPresetPath)
Description
Retrieves the file extension associated with the specified output preset (.epr file).
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
The output preset to be used. |
Returns
Returns a string.
Sequence.getInPoint()¶
app.project.sequences[index].getInPoint()
Description
Retrieves the current sequence in point, in seconds.
Parameters
None.
Returns
Returns a string.
Sequence.getInPointAsTime()¶
app.project.sequences[index].getInPointAsTime()
Description
Retrieves the current sequence in point.
Parameters
None.
Returns
Returns a Time object.
Sequence.getOutPoint()¶
app.project.sequences[index].getOutPoint()
Description
Retrieves the current sequence out point, in seconds.
Parameters
None.
Returns
Returns a string.
Sequence.getOutPointAsTime()¶
app.project.sequences[index].getOutPointAsTime()
Description
Retrieves the current sequence out point.
Parameters
None.
Returns
Returns a Time object.
Sequence.getPlayerPosition()¶
app.project.sequences[index].getPlayerPosition()
Description
Retrieves the position of the CTI (Current Time Indicator), in ticks.
Parameters
None.
Returns
Returns a Time object.
Sequence.getSelection()¶
app.project.sequences[index].getSelection()
Description
An array of Track item objects, of the selected clips in the sequence, in temporal order.
Parameters
None.
Returns
Returns a TrackItemCollection object.
Sequence.getSettings()¶
app.project.sequences[index].getSettings()
Description
Retrieves the settings of the current sequence.
Parameters
None.
Returns
Returns an object; a sequence settings structure.
Property |
Type |
Possible Values |
Description |
---|---|---|---|
|
|
Number of audio channels in the sequence. |
|
audioChannelType |
Integer |
0 Mono1 Stereo2 5.13 Multichannel4 4 Channel5 8 Channel |
Audio channel type.
|
audioDisplayFormat |
Integer |
200 Audio Samples201 Milliseconds |
Audio timecode display format.
|
|
Audio sample rate. |
||
|
|
Whether Auto Tone Map Media is checked. |
|
|
|
Whether sequence is composited in linear color. |
|
|
|
The GUID of the editing mode. |
|
|
|
Whether sequence is composited at maximum depth. |
|
|
|
Whether sequence is rendered at maximum quality. |
|
|
|
Four character code of preview codec in use. |
|
|
|
Width of preview frame. |
|
|
|
Height of preview frame. |
|
|
|
Path to the output preset (.epr file) being used for preview file rendering. |
|
videoDisplayFormat |
Integer |
100 24 Timecode101 25 Timecode102 29.97 Drop Timecode103 29.97 Non-Drop Timecode104 30 Timecode105 50 Timecode106 59.94 Drop Timecode107 59.94 Non-Drop Timecode108 60 Timecode109 Frames110 23.976 Timecode111 16mm Feet + Frames112 35mm Feet + Frames113 48 Timecode |
Video time display format.
|
videoFieldType |
Integer |
-1 Default0 No Fields (Progressive Scan)1 Upper Field First2 Lower Field First |
Video field type.
|
|
|
Height of sequence video frame. |
|
|
|
Width of sequence video frame. |
|
|
|
Pixel aspect ratio. |
|
|
|
The horizontal captured view, in degrees, for VR. |
|
|
|
The vertical captured view, in degrees, for VR. |
|
vrLayout |
Integer |
0 Monoscopic1 Stereoscopic - Over/Under2 Stereoscopic - Side by Side |
The layout of footage in use, for VR.
|
vrProjection |
Integer |
0 None1 Equirectangular |
The projection type in use, for VR footage.
|
Sequence.getWorkAreaInPoint()¶
app.project.sequences[index].getWorkAreaInPoint()
Description
Retrieves the current sequence work area in point, in seconds.
Parameters
None.
Returns
Returns a string.
Sequence.getWorkAreaInPointAsTime()¶
app.project.sequences[index].getWorkAreaInPointAsTime()
Description
Retrieves the current sequence work area in point.
Parameters
None.
Returns
Returns a Time object.
Sequence.getWorkAreaOutPoint()¶
app.project.sequences[index].getWorkAreaOutPoint()
Description
Retrieves the current sequence work area out point, in seconds.
Parameters
None.
Returns
Returns a string.
Sequence.getWorkAreaOutPointAsTime()¶
app.project.sequences[index].getWorkAreaOutPointAsTime()
Description
Retrieves the current sequence work area out point.
Parameters
None.
Returns
Returns a Time object.
Sequence.importMGT()¶
app.project.sequences[index].importMGT(path, time, vidTrackOffset, audTrackOffset)
Description
Imports a MOGRT, or an After Effects Motion Graphics Template, to the specified video or audio track, at the specified time.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
Full path to a valid MOGRT (.mogrt file), created in After Effects. |
|
|
The time at which to insert .mogrt, in ticks. |
|
|
How many tracks from the zero-th video track, into which to insert .mogrt content. |
|
|
How many tracks from the zero-th audio track, into which to insert .mogrt content. |
Returns
Returns a TrackItem object.
Sequence.importMGTFromLibrary()¶
app.project.sequences[index].importMGTFromLibrary(libraryName, mgtName, time, vidTrackOffset, audTrackOffset)
Description
Imports a MOGRT, or an After Effects Motion Graphics Template, from the current Premiere Pro user’s Creative Cloud Libraries, to the specified video or audio track, at the specified time.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
The name of Library (from the current PPro user’s Creative Cloud Libraries). |
|
|
The name of .mogrt within that library. |
|
|
The time at which to insert .mogrt, in ticks. |
|
|
How many tracks from the zero-th video track, into which to insert .mogrt content. |
|
|
How many tracks from the zero-th audio track, into which to insert .mogrt content. |
Returns
Returns a TrackItem object.
Sequence.insertClip()¶
app.project.sequences[index].insertClip(projectItem, time, vTrackIndex, aTrackIndex)
Description
Inserts a clip into the sequence, on the specified video and audio tracks, at the specified time.
Parameters
Argument |
Type |
Description |
---|---|---|
|
A project item from which to get media. |
|
|
|
The time at which to add project item, in seconds. |
|
|
The (zero-based) track index, into which to insert video. |
|
|
The (zero-based) track index, into which to insert audio. |
Returns
Returns a boolean; true
if successful.
Sequence.isDoneAnalyzingForVideoEffects()¶
app.project.sequences[index].isDoneAnalyzingForVideoEffects()
Description
Returns whether or not the sequence is done analyzing for video effects.
Parameters
None.
Returns
Returns a boolean.
Sequence.isWorkAreaEnabled()¶
app.project.sequences[index].isWorkAreaEnabled()
Description
Returns whether or not the sequence work area bar is enabled.
Note
The work area bar is disabled by default. To enable it, check ‘Work Area Bar’ in the sequence hamburger menu.
Parameters
None.
Returns
Returns a boolean.
Sequence.linkSelection()¶
app.project.sequences[index].linkSelection()
Description
Links the selected video and audio clips in the sequence.
Parameters
None.
Returns
Returns a boolean; true
if successful.
Sequence.overwriteClip()¶
app.project.sequences[index].overwriteClip(projectItem, time, vTrackIndex, aTrackIndex)
Description
Inserts a clip into the sequence, overwriting existing clips, on the specified video and audio tracks, at the specified time.
Parameters
Argument |
Type |
Description |
---|---|---|
|
A project item from which to get media. |
|
|
|
The time at which to add project item, in seconds. |
|
|
The (zero-based) track index, into which to insert video. |
|
|
The (zero-based) track index, into which to insert audio. |
Returns
Returns a boolean; true
if successful.
Sequence.performSceneEditDetectionOnSelection()¶
app.project.sequences[index].performSceneEditDetectionOnSelection(actionDesired, applyCutsToLinkedAudio, sensitivity)
Description
Performs cut detection on the sequence selection.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
One of: |
|
|
Whether to apply detected cuts on linked audio. |
|
|
One of: |
Returns
Returns a boolean; true
if successful.
Sequence.setInPoint()¶
app.project.sequences[index].setInPoint(time)
Description
Sets a new sequence in point.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A new time in seconds. |
Returns
Null.
Sequence.setOutPoint()¶
app.project.sequences[index].setOutPoint(time)
Description
Sets a new sequence out point.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A new time in seconds. |
Returns
Null.
Sequence.setPlayerPosition()¶
app.project.sequences[index].setPlayerPosition(time)
Description
Sets the position of the CTI (Current Time Indicator) in the sequence.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A new time in ticks. |
Returns
Returns a boolean; true
if successful.
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
Argument |
Type |
Description |
---|---|---|
|
|
A sequence settings object, obtained via Sequence.getSettings(). |
Returns
Returns a boolean; true
if successful.
Sequence.setWorkAreaInPoint()¶
app.project.sequences[index].setWorkAreaInPoint(time)
Description
Sets a new sequence work area in point.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A new time in seconds. |
Returns
Returns a boolean; true
if successful.
Sequence.setWorkAreaOutPoint()¶
app.project.sequences[index].setWorkAreaOutPoint(time)
Description
Sets a new sequence work area out point.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A new time in seconds. |
Returns
Returns a boolean; true
if successful.
Sequence.unlinkSelection()¶
app.project.sequences[index].unlinkSelection()
Description
Unlinks the selected video and audio clips in the sequence.
Parameters
None.
Returns
Returns a boolean; true
if successful.
Sequence.setZeroPoint()¶
app.project.sequences[index].setZeroPoint(newZeroPoint)
Description
Set the starting time of the sequence.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
The new zero point in ticks. |
Returns
Returns a boolean; true
if successful.