Sequence object¶
app.project.sequences[index]
Description
The Sequence object represents sequences of media (a.k.a. “timelines”), in Premiere Pro.
Attributes¶
Sequence.audioDisplayFormat¶
app.project.sequences[index].audioDisplayFormat
Description
Add a description
Type
Number.
Sequence.audioTracks¶
app.project.sequences[index].audioTracks
Description
An array of audio tracks, within 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 width of frames, from the sequence.
Type
Integer; read-only.
Sequence.frameSizeVertical¶
app.project.sequences[index].frameSizeVertical
Description
The vertical height of frames, from the sequence.
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.
Sequence.markers¶
app.project.sequences[index].markers
Description
The Marker objects associated with this 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 this sequence. Note that 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 `projectItem`s.
Type
projectItem; read-only.
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.
Sequence.timebase¶
app.project.sequences[index].timebase
Description
The number of Ticks per frame, in the sequence.
Type
String; read-only.
Sequence.videoDisplayFormat¶
app.project.sequences[index].videoDisplayFormat
Description
Add a description
Type
Number.
Sequence.videoTracks¶
app.project.sequences[index].videoTracks
Description
An array of video tracks, within the sequence.
Type
TrackCollection object, read-only;
Sequence.zeroPoint¶
app.project.sequences[index].zeroPoint
Description
The starting time, in Ticks, of the sequence.
Type
String; read-only.
Methods¶
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, if successful; 0 if unsuccessful.
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.createCaptionTrack()¶
app.project.activeSequence.createCaptionTrack(projectItem,
startAtTime, captionFormat)
Description
Creates a caption track in the active sequence using caption data from a project item.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A captions source clip (e.g. .srt) |
|
|
Offset in seconds from start of sequence |
|
|
(Optional, defaults to subtitle) Caption format of the new track (see table below). |
Caption Format |
Parameter |
---|---|
Subtitle (Default) |
Sequence.CAPTION_FORMAT_SUBTITLE |
CEA-608 |
Sequence.CAPTION_FORMAT_608 |
CEA-708 |
Sequence.CAPTION_FORMAT_708 |
Teletext |
Sequence.CAPTION_FORMAT_TELETEXT |
EBU Subtitle |
Sequence.CAPTION_FORMAT_OPEN_EBU |
OP-42 |
Sequence.CAPTION_FORMAT_OP42 |
OP-47 |
Sequence.CAPTION_FORMAT_OP47 |
Returns
A boolean, true if successful.
Example
var result = app.project.activeSequence.createCaptionTrack(projectItem, 0, Sequence.CAPTION_FORMAT_708);
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.
Sequence.createSubsequence()¶
app.project.sequences[index].createSubsequence(ignoreTrackTargeting)
Description
Creates a new sequence, which is a sub-sequence of the existing sequence.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
Whether the new sequence should ignore the track targeting, in the original sequence. |
Returns
Returns the newly-created sequence, or 0 if unsuccessful.
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 0 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. |
|
|
??? |
|
Must be one of the following:
|
Returns
Returns 0 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 0 if successful.
Sequence.getExportFileExtension()¶
app.project.sequences[index].getExportFileExtension(outputPresetPath)
Description
Retrieves the file extension associated with the current sequence.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
The output preset to be used. |
Returns
Returns a String containing the output file extension, or 0 if unsuccessful.
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.
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.
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.
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.
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.
Sequence.getSettings()¶
app.project.sequences[index].getSettings()
Description
Retrieves the settings of the current sequence.
Parameters
None.
Returns
Returns a sequence settings structure.
|
The number of audio channels in the sequence. |
|
|
|
|
|
The audio sample rate in the sequence, as an |
|
Whether sequence is composited in linear color. 1 if true. |
|
The GUID of the editing mode in use. |
|
Whether sequence is composited at maximum depth; 1 if true. |
|
Whether sequence is rendered at maximum quality; 1 if true. |
|
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. |
|
|
|
|
|
Height of sequence video frame. |
|
Height of sequence video frame. |
|
The pixel aspect ratio, as a ratio, as a String. |
|
|
|
|
|
|
|
|
|
|
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.
Sequence.importMGT()¶
app.project.sequences[index].videotracks[index].importMGT
app.project.sequences[index].audiotracks[index].importMGT
Description
Imports an After Effects Motion Graphics Template - a Mogrt - to the selected track at the specified time.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
Full path to a valid .mogrt, created in After Effects |
|
|
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
A trackItem object.
Sequence.importMGTFromLibrary()¶
app.project.sequences[index].videotracks[index].importMGTFromLibrary()
app.project.sequences[index].audiotracks[index].importMGTFromLibrary()
Description
Imports an After Effects Motion Graphics Template - a Mogrt - from the current PPro user’s Creative Cloud Libraries, to the selected track at the specified time.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
name of Library (from the current PPro user’s Creative Cloud Libraries) |
|
|
name of .mogrt within that library |
|
|
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
A trackItem object.
Sequence.performSceneEditDetectionOnSelection()¶
app.project.sequences[index].performSceneEditDetectionOnSelection(actionDesired, applyCutsToLinkedAudio, sensitivity)
Description
Performs cut detection on the sequence selection.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
One of:
|
|
|
|
|
|
One of:
|
Returns
Returns true if successful.
Sequence.setInPoint()¶
app.project.sequences[index].setInPoint(time)
Description
Specifies a new sequence in point.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A new time in ticks. |
Returns
Returns 0 if successful.
Sequence.setOutPoint()¶
app.project.sequences[index].setOutPoint(time)
Description
Specifies a new sequence out point.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A new time in ticks. |
Returns
Returns 0 if successful.
Sequence.setPlayerPosition()¶
app.project.sequences[index].setPlayerPosition(time)
Description
Specifies a new player position, in Ticks, as a String.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A new time in ticks. |
Returns
Returns 0 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 structure, obtained via Sequence.getSettings(). |
Returns
Returns 0 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. |
Type
Integer; read-only.
Returns
Returns 0 if successful.