Footage
FootageItem
¶
Bases: AVItem
The FootageItem object represents a footage item imported into a project,
which appears in the Project panel.
Example
Info
FootageItem is a subclass of AVItem object, which is a subclass of
Item object. All methods and attributes of AVItem and Item are
available when working with FootageItem.
See: https://ae-scripting.docsforadobe.dev/item/footageitem/
Attributes¶
duration
¶
duration: float
The duration of the item in seconds. Still footages have a duration of 0. Read-only.
footage_missing
¶
footage_missing: bool
When True, the AVItem is a placeholder, or represents footage with a
source file that could not be found when the project was last saved.
In this case, the path of the missing source file is in the
missing_footage_path attribute of the footage item's source-file object.
See FootageItem.main_source and
FileSource.missing_footage_path.
Read-only.
frame_duration
¶
frame_duration: int
The duration of the item in frames. Still footages have a duration of 0. Read-only.
frame_time
¶
frame_time: int
The current time of the item when it is being previewed directly from the Project panel. This value is a number of frames.
guides
¶
The item's ruler guides. Each guide has an orientation and a pixel position. Read-only.
has_audio
¶
has_audio: bool
When True, the footage has an audio component.
When use_proxy is
True, reflects the proxy source rather than the main source.
Read-only.
has_video
¶
has_video: bool
True if the item has a video component.
An AVItem has video when it has non-zero dimensions (width > 0
and height > 0). In a CompItem, the value is always True.
In a FootageItem,
the value depends on the footage source (e.g. audio-only files
return False).
id
¶
id = ChunkField[int](
"_idta", "item_id", read_only=True, default=0
)
The item unique identifier. Read-only.
label
¶
label = enum(Label, '_idta', 'label', default=NONE)
The label color. Colors are represented by their number (0 for None, or 1 to 16 for one of the preset colors in the Labels preferences). Read / Write.
main_source
¶
main_source: FileSource | SolidSource | PlaceholderSource
The footage source. Read-only.
name
¶
name = ChunkField[str](
"_name_utf8", "value", validate=validate_name
)
The name of the item, as shown in the Project panel. Read / Write.
parent_folder
¶
parent_folder: FolderItem | None
The parent folder of this item. None for the root folder.
Read-only.
proxy_source
¶
proxy_source: (
FileSource | SolidSource | PlaceholderSource | None
)
The FootageSource being used as a proxy. Read-only.
To change it, call any of the AVItem methods that change the proxy
source: set_proxy(), set_proxy_with_sequence(),
set_proxy_with_solid(), or set_proxy_with_placeholder().
selected
¶
selected: bool
When True, this item is selected. Read-only.
Note
Item selection is not stored in the .aep binary format; it is a
runtime-only state. Parsed projects always report False.
time
¶
time: float
The current time of the item when it is being previewed directly
from the Project panel. This value is a number of seconds. It is an
error to set this value for a FootageItem whose main_source or
proxy_source is still.
type_name
¶
type_name: str
A user-readable name for the item type ("Folder", "Footage" or "Composition"). These names are application locale-dependent, meaning that they are different depending on the application's UI language. Read-only.
use_proxy
¶
use_proxy = ChunkField[bool](
"_idta",
"use_proxy",
validate=_validate_use_proxy,
post_set=_sync_proxy_active,
)
When True, a proxy is used for the item. Read / Write.
It is set to True by all the set_proxy methods, and to False by
the set_proxy_to_none() method.
Functions¶
add_guide
¶
remove_guide
¶
remove_guide(guide_index: int) -> None
Removes an existing guide by index.
Parameters:
-
guide_index(int) –The 0-based index of the guide to remove.
Raises:
-
IndexError–If
guide_indexis out of range.
replace_with_placeholder
¶
replace_with_placeholder(
name: str | None,
width: int,
height: int,
frame_rate: float,
duration: float,
) -> None
Replace the footage source with a placeholder.
Parameters:
-
name(str | None) –The placeholder name. Pass
Noneto useMissing Name. An empty string becomesPlaceholder. -
width(int) –Width in pixels (4-30000).
-
height(int) –Height in pixels (4-30000).
-
frame_rate(float) –Frame rate in fps (1.0-99.0).
-
duration(float) –Duration in seconds (> 0, <= 10800).
replace_with_solid
¶
replace_with_solid(
color: list[float],
name: str | None,
width: int,
height: int,
pixel_aspect: float = 1.0,
) -> None
Replace the footage source with a solid.
Parameters:
-
color(list[float]) –Solid color as [R, G, B] in 0.0-1.0 range.
-
name(str | None) –The solid name. Pass
Noneto auto-generate a name from the color (e.g.Red Solid 1). An empty string becomes????. -
width(int) –Width in pixels (1-30000).
-
height(int) –Height in pixels (1-30000).
-
pixel_aspect(float, default:1.0) –Pixel aspect ratio (0.01-100.0).
set_proxy_with_placeholder
¶
set_proxy_with_placeholder(
name: str | None,
width: int,
height: int,
frame_rate: float,
duration: float,
) -> None
Set a placeholder as the proxy source.
Parameters:
set_proxy_with_solid
¶
set_proxy_with_solid(
color: list[float],
name: str | None,
width: int,
height: int,
pixel_aspect: float = 1.0,
) -> None
Set a solid as the proxy source.
Parameters:
-
color(list[float]) –Solid color as [R, G, B] in 0.0-1.0 range.
-
name(str | None) –The solid name. Pass
Noneto auto-generate a name from the color (e.g.Red Solid 1). An empty string becomes????. -
width(int) –Width in pixels (1-30000).
-
height(int) –Height in pixels (1-30000).
-
pixel_aspect(float, default:1.0) –Pixel aspect ratio (0.01-100.0).