Skip to content

Sequence object

app.project.sequences[index]

The Sequence object represents sequences of media, or ‘timelines’, in Premiere Pro.


app.project.sequences[index].audioDisplayFormat

The audio display format of the sequence.

Set this attribute with the Sequence.setSettings() method.

An enumerated value; read/write. One of:

  • 200 - Audio Samples
  • 201 - Milliseconds

app.project.sequences[index].audioTracks

An array of audio Track objects in the sequence.

TrackCollection object; read-only.


app.project.sequences[index].end

The time, in ticks, of the end of the sequence.

String; read-only.


app.project.sequences[index].frameSizeHorizontal

The horizontal frame size, or width, of the sequence.

Set this attribute with the Sequence.setSettings() method.

Integer; read-only.


app.project.sequences[index].frameSizeVertical

The vertical frame size, or height, of the sequence.

Set this attribute with the Sequence.setSettings() method.

Integer; read-only.


app.project.sequences[index].id

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.

Integer, read-only.


app.project.sequences[index].markers

An array of Marker objects in the sequence.

MarkerCollection object, read-only;


app.project.sequences[index].name

The name of the sequence.

String; read/write.


app.project.sequences[index].projectItem

The ProjectItem object associated with the sequence.

ProjectItem object; read-only.


app.project.sequences[index].sequenceID

The unique identifier assigned to this sequence, at the time of its creation, in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

String; read-only.


app.project.sequences[index].timebase

The number of ticks per frame in the sequence. Converted to seconds, this is commonly referred to as the frame duration of the sequence.

String; read-only.


app.project.sequences[index].videoDisplayFormat

The video display format of the sequence.

Set this attribute with the Sequence.setSettings() method.

An enumerated value; read/write. One of:

  • 100 - 24 Timecode
  • 101 - 25 Timecode
  • 102 - 29.97 Drop Timecode
  • 103 - 29.97 Non-Drop Timecode
  • 104 - 30 Timecode
  • 105 - 50 Timecode
  • 106 - 59.94 Drop Timecode
  • 107 - 59.94 Non-Drop Timecode
  • 108 - 60 Timecode
  • 109 - Frames
  • 110 - 23.976 Timecode
  • 111 - 16mm Feet + Frames
  • 112 - 35mm Feet + Frames
  • 113 - 48 Timecode

app.project.sequences[index].videoTracks

An array of video Track objects in the sequence.

TrackCollection object; read-only.


app.project.sequences[index].zeroPoint

The starting time, in ticks, of the sequence.

Set this attribute with the Sequence.setZeroPoint() method.

String; read-only.


app.project.sequences[index].attachCustomProperty(propertyID, propertyValue)

Attaches a custom property, and its value, to the sequence. This property is visible if/when the sequence is exported to FCP XML.

ParameterTypeDescription
propertyIDStringID of custom property.
propertyValueStringValue of custom property.

Returns a boolean; true if successful.


app.project.sequences[index].autoReframeSequence(numerator, denominator, motionPreset, newName, useNestedSequences)

Generates a new, auto-reframed sequence.

ParameterTypeDescription
numeratorIntegerNumerator of desired frame aspect ratio.
denominatorIntegerDenominator of desired frame aspect ratio.
motionPresetStringOne of:
- slower
- default
- faster
newNameStringA name for a newly created sequence.
useNestedSequencesBooleanWhether to honor nested sequence.

The new Sequence object.

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');
}

app.project.sequences[index].clone()

Creates a clone, or a duplicate, of the sequence.

None.

Boolean; true if successful.


app.project.sequences[index].close()

Closes the sequence.

None.

Boolean; true if successful.


app.project.sequences[index].createCaptionTrack(projectItem, startAtTime, [captionFormat])

Creates a caption track in the sequence using caption data from a ProjectItem object.

ParameterTypeDescription
projectItemProjectItem objectA captions source clip (e.g. .srt)
startAtTimeFloatOffset in seconds from start of sequence
captionFormatSequence.CAPTION_FORMAT_ enumCaption format of the new track. Optional, default is Sequence.CAPTION_FORMAT_SUBTITLE. One of:
- Sequence.CAPTION_FORMAT_SUBTITLE - Subtitle
- Sequence.CAPTION_FORMAT_608 - CEA-608
- Sequence.CAPTION_FORMAT_708 - CEA-708
- Sequence.CAPTION_FORMAT_TELETEXT - Teletext
- Sequence.CAPTION_FORMAT_OPEN_EBU - EBU Subtitle
- Sequence.CAPTION_FORMAT_OP42 - OP-42
- Sequence.CAPTION_FORMAT_OP47 - OP-47

Returns a boolean; true if successful.

app.project.activeSequence.createCaptionTrack(projectItem, 0, Sequence.CAPTION_FORMAT_708);

app.project.sequences[index].createSubsequence([ignoreTrackTargeting])

Creates a new sequence, from the in point to the out point, which is a sub-sequence of the original sequence.

ParameterTypeDescription
ignoreTrackTargetingBooleanWhether the new sequence should ignore the track targeting, in the original sequence. Optional, default is false

Returns the newly-created Sequence object.

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;
}

app.project.sequences[index].exportAsFinalCutProXML(outputPath)

Creates a new FCP XML representation of the sequence and its constituent media.

ParameterTypeDescription
outputPathStringThe output path for the new FCP XML file.

Returns a boolean; true if successful.


app.project.sequences[index].exportAsMediaDirect(outputPath, presetPath, workAreaType)

Renders the sequence to the specified output path, using the specified output preset (.epr file), and honoring the specified work area type.

ParameterTypeDescription
outputPathStringAn output path, to which to render the media.
presetPathStringPath to the preset file (.epr file) which contains the encoding settings.
workAreaTypeIntegerThe work area type to be rendered (see below). One of:
- 0 - Renders the entire sequence.
- 1 - Renders between the in and out point of the sequence.
- 2 - Renders the work area of the sequence.

Returns a boolean; true if successful.


app.project.sequences[index].exportAsProject(outputPath)

Creates a new Project object containing only the given sequence and its constituent media.

ParameterTypeDescription
outputPathStringThe output path for the new project.

Returns a boolean; true if successful.


app.project.sequences[index].getExportFileExtension(outputPresetPath)

Retrieves the file extension associated with the specified output preset (.epr file).

ParameterTypeDescription
outputPresetPathStringThe output preset to be used.

Returns a string.


app.project.sequences[index].getInPoint()

Retrieves the current sequence in point, in seconds.

None.

Returns a string.


app.project.sequences[index].getInPointAsTime()

Retrieves the current sequence in point.

None.

Returns a Time object.


app.project.sequences[index].getOutPoint()

Retrieves the current sequence out point, in seconds.

None.

Returns a string.


app.project.sequences[index].getOutPointAsTime()

Retrieves the current sequence out point.

None.

Returns a Time object.


app.project.sequences[index].getPlayerPosition()

Retrieves the position of the CTI (Current Time Indicator), in ticks.

None.

Returns a Time object.


app.project.sequences[index].getSelection()

An array of Track item objects, of the selected clips in the sequence, in temporal order.

None.

Returns a TrackItemCollection object.


app.project.sequences[index].getSettings()

Retrieves the settings of the current sequence.

None.

Returns an object; a sequence settings structure.

PropertyTypeDescription
audioChannelCountIntegerNumber of audio channels in the sequence.
audioChannelTypeIntegerAudio channel type. One of:
- 0 - Mono
- 1 - Stereo
- 2 - 5.1
- 3 - Multichannel
- 4 - 4 Channel
- 5 - 8 Channel
audioDisplayFormatIntegerAudio timecode display format. One of:
- 200 - Audio Samples
- 201 - Milliseconds
audioSampleRateTime objectAudio sample rate.
autoToneMapEnabledBooleanWhether Auto Tone Map Media is checked.
compositeLinearColorBooleanWhether sequence is composited in linear color.
editingModeStringThe GUID of the editing mode.
maximumBitDepthBooleanWhether sequence is composited at maximum depth.
maximumRenderQualityBooleanWhether sequence is rendered at maximum quality.
previewCodecStringFour character code of preview codec in use.
previewFrameWidthIntegerWidth of preview frame.
previewFrameHeightIntegerHeight of preview frame.
previewFileFormatIntegerPath to the output preset (.epr file) being used for preview file rendering.
videoDisplayFormatIntegerVideo time display format. One of:
- 100 - 24 Timecode
- 101 - 25 Timecode
- 102 - 29.97 Drop Timecode
- 103 - 29.97 Non-Drop Timecode
- 104 - 30 Timecode
- 105 - 50 Timecode
- 106 - 59.94 Drop Timecode
- 107 - 59.94 Non-Drop Timecode
- 108 - 60 Timecode
- 109 - Frames
- 110 - 23.976 Timecode
- 111 - 16mm Feet + Frames
- 112 - 35mm Feet + Frames
- 113 - 48 Timecode
videoFieldTypeIntegerVideo field type. One of:
- -1 - Default
- 0 - No Fields (Progressive Scan)
- 1 - Upper Field First
- 2 - Lower Field First
videoFrameHeightIntegerHeight of sequence video frame.
videoFrameWidthIntegerWidth of sequence video frame.
videoPixelAspectRatioStringPixel aspect ratio.
vrHorzCapturedViewIntegerThe horizontal captured view, in degrees, for VR.
vrVertCapturedViewIntegerThe vertical captured view, in degrees, for VR.
vrLayoutIntegerThe layout of footage in use, for VR. One of:
- 0 - Monoscopic
- 1 - Stereoscopic - Over/Under
- 2 - Stereoscopic - Side by Side
vrProjectionIntegerThe projection type in use, for VR footage. One of:
- 0 - None
- 1 - Equirectangular

app.project.sequences[index].getWorkAreaInPoint()

Retrieves the current sequence work area in point, in seconds.

None.

Returns a string.


app.project.sequences[index].getWorkAreaInPointAsTime()

Retrieves the current sequence work area in point.

None.

Returns a Time object.


app.project.sequences[index].getWorkAreaOutPoint()

Retrieves the current sequence work area out point, in seconds.

None.

Returns a string.


app.project.sequences[index].getWorkAreaOutPointAsTime()

Retrieves the current sequence work area out point.

None.

Returns a Time object.


app.project.sequences[index].importMGT(path, time, vidTrackOffset, audTrackOffset)

Imports a MOGRT, or an After Effects Motion Graphics Template, to the specified video or audio track, at the specified time.

ParameterTypeDescription
pathStringFull path to a valid MOGRT (.mogrt file), created in After Effects.
timeStringThe time at which to insert .mogrt, in ticks.
vidTrackOffsetIntegerHow many tracks from the zero-th video track, into which to insert .mogrt content.
audTrackOffsetIntegerHow many tracks from the zero-th audio track, into which to insert .mogrt content.

Returns a TrackItem object.


app.project.sequences[index].importMGTFromLibrary(libraryName, mgtName, time, vidTrackOffset, audTrackOffset)

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.

ParameterTypeDescription
libraryNameStringThe name of Library (from the current PPro user’s Creative Cloud Libraries).
mgtNameStringThe name of .mogrt within that library.
timeStringThe time at which to insert .mogrt, in ticks.
vidTrackOffsetIntegerHow many tracks from the zero-th video track, into which to insert .mogrt content.
audTrackOffsetIntegerHow many tracks from the zero-th audio track, into which to insert .mogrt content.

Returns a TrackItem object.


app.project.sequences[index].insertClip(projectItem, time, vTrackIndex, aTrackIndex)

Inserts a clip into the sequence, on the specified video and audio tracks, at the specified time.

ParameterTypeDescription
projectItemProjectItem objectA project item from which to get media.
timeTimeThe time at which to add project item.
vTrackIndexIntegerThe (zero-based) track index, into which to insert video.
aTrackIndexIntegerThe (zero-based) track index, into which to insert audio.

Returns a boolean; true if successful.


app.project.sequences[index].isDoneAnalyzingForVideoEffects()

Returns whether or not the sequence is done analyzing for video effects.

None.

Returns a boolean.


app.project.sequences[index].isWorkAreaEnabled()

Returns whether or not the sequence work area bar is enabled.

None.

Returns a boolean.


app.project.sequences[index].linkSelection()

Links the selected video and audio clips in the sequence.

None.

Returns a boolean; true if successful.


app.project.sequences[index].overwriteClip(projectItem, time, vTrackIndex, aTrackIndex)

Inserts a clip into the sequence, overwriting existing clips, on the specified video and audio tracks, at the specified time.

ParameterTypeDescription
projectItemProjectItem objectA project item from which to get media.
timeStringThe time at which to add project item, in seconds.
vTrackIndexIntegerThe (zero-based) track index, into which to insert video.
aTrackIndexIntegerThe (zero-based) track index, into which to insert audio.

Returns a boolean; true if successful.


Sequence.performSceneEditDetectionOnSelection()

Section titled “Sequence.performSceneEditDetectionOnSelection()”

app.project.sequences[index].performSceneEditDetectionOnSelection(actionDesired, applyCutsToLinkedAudio, sensitivity)

Performs cut detection on the sequence selection.

ParameterTypeDescription
actionDesiredStringOne of:
- CreateMarkers
- ApplyCuts
applyCutsToLinkedAudioBooleanWhether to apply detected cuts on linked audio.
sensitivityStringOne of:
- LowSensitivity
- MediumSensitivity
- HighSensitivity

Returns a boolean; true if successful.


app.project.sequences[index].setInPoint(time)

Sets a new sequence in point.

ParameterTypeDescription
timeInteger or Time objectA new time in seconds.

Null.


app.project.sequences[index].setOutPoint(time)

Sets a new sequence out point.

ParameterTypeDescription
timeInteger or Time objectA new time in seconds.

Null.


app.project.sequences[index].setPlayerPosition(time)

Sets the position of the CTI (Current Time Indicator) in the sequence.

ParameterTypeDescription
timeStringA new time in ticks.

Returns a boolean; true if successful.


app.project.sequences[index].setSettings(sequenceSettings)

Sets the settings of the current sequence. [Editorial: I apologize for any perceived pedantry; sometimes, obvious documentation needs to be obvious. -bbb]

ParameterTypeDescription
sequenceSettingsObjectA sequence settings object, obtained via Sequence.getSettings().

Returns a boolean; true if successful.


app.project.sequences[index].setWorkAreaInPoint(time)

Sets a new sequence work area in point.

ParameterTypeDescription
timeInteger or Time objectA new time in seconds.

Returns a boolean; true if successful.


app.project.sequences[index].setWorkAreaOutPoint(time)

Sets a new sequence work area out point.

ParameterTypeDescription
timeInteger or Time objectA new time in seconds.

Returns a boolean; true if successful.


app.project.sequences[index].unlinkSelection()

Unlinks the selected video and audio clips in the sequence.

None.

Returns a boolean; true if successful.


app.project.sequences[index].setZeroPoint(newZeroPoint)

Set the starting time of the sequence.

ParameterTypeDescription
newZeroPointStringThe new zero point in ticks.

Returns a boolean; true if successful.