Skip to content

footageitem

FootageItem object

app.project.item(index) app.project.items[index]

Description

The FootageItem object represents a footage item imported into a project, which appears in the Project panel. These are accessed by position index number in a project’s item collection.

FootageItem is a subclass of AVItem object, which is a subclass of Item object. All methods and attributes of AVItem and Item, in addition to those listed below, are available when working with FootageItem.


Attributes

FootageItem.file

app.project.item(index).file

Description

The Extendscript File object for the footage’s source file.

If the FootageItem’s mainSource is a FileSource, this is the same as FootageItem.mainSource.file. Otherwise it is null.

Type

File object; read-only.


FootageItem.mainSource

app.project.item(index).mainSource

Description

The footage source, an object that contains all of the settings related to that footage item, including those that are normally accessed through the Interpret Footage dialog box. The attribute is read-only. To change its value, call one of the FootageItem “replace” methods. See the FootageSource object, and its three types:

If this is a FileSource object, and the footageMissing value is true, the path to the missing footage file is in the FileSource.missingFootagePath attribute.

Type

FootageSource object; read-only.


Methods

FootageItem.openInViewer()

app.project.item(index).openInViewer()

Description

Opens the footage in a Footage panel, and moves the Footage panel to front and gives it focus.

Parameters

None.

Returns

Viewer object for the Footage panel, or null if the footage could not be opened.


FootageItem.replace()

app.project.item(index).replace(file)

Description

Changes the source of this FootageItem to the specified file.

In addition to loading the file, the method creates a new FileSource object for the file and sets mainSource to that object. In the new source object, it sets the name, width, height, frameDuration, and duration attributes (see AVItem object) based on the contents of the file.

The method preserves interpretation parameters from the previous mainSource object.

If the specified file has an unlabeled alpha channel, the method estimates the alpha interpretation.

Parameters

ParameterTypeDescription
fileExtendscript File objectThe file to be used as the footage main source.

FootageItem.replaceWithPlaceholder()

app.project.item(index).replaceWithPlaceholder(name, width, height, frameRate, duration)

Description

Changes the source of this FootageItem to the specified placeholder. Creates a new PlaceholderSource object, sets its values from the parameters, and sets mainSource to that object.

Parameters

ParameterTypeDescription
nameStringThe name of the placeholder.
widthInteger, in the range [4..30000]The width of the placeholder in pixels.
heightInteger, in the range [4..30000]The height of the placeholder in pixels.
frameRateFloating-point value, in the range [1.0..99.0]The frame rate of the placeholder.
durationFloating-point value, in the range [0.0..10800.0]The duration of the placeholder in seconds.

FootageItem.replaceWithSequence()

app.project.item(index).replaceWithSequence(file, forceAlphabetical)

Description

Changes the source of this FootageItem to the specified image sequence.

In addition to loading the file, the method creates a new FileSource object for the file and sets mainSource to that object. In the new source object, it sets the name, width, height, frameDuration, and duration attributes (see AVItem object) based on the contents of the file.

The method preserves interpretation parameters from the previous mainSource object. If the specified file has an unlabeled alpha channel, the method estimates the alpha interpretation.

Parameters

ParameterTypeDescription
fileExtendscript File objectThe first file in the sequence to be used as the footage main source.
forceAlphabeticalBooleanWhen true, use the “Force alphabetical order” option.

FootageItem.replaceWithSolid()

app.project.item(index).replaceWithSolid(color, name, width, height, pixelAspect)

Description

Changes the source of this FootageItem to the specified solid. Creates a new SolidSource object, sets its values from the parameters, and sets mainSource to that object.

Parameters

ParameterTypeDescription
colorArray of three floating-point values, [R, G, B], in the range [0.0..1.0].The color of the solid.
nameStringThe name of the solid.
widthInteger, in the range [4..30000]The width of the solid in pixels.
heightInteger, in the range [4..30000]The height of the solid in pixels.
pixelAspectFloating-point value, in the range [0.01..100.0]The pixel aspect ratio of the solid.