Av item
AVItem
¶
Bases: Item
The AVItem object provides access to attributes and methods of
audio/visual files imported into After Effects.
Info
AVItem is a subclass of Item. All methods and attributes of Item
are available when working with AVItem.
Info
AVItem is the base class for both CompItem and FootageItem, so
AVItem attributes and methods are also available when working with
CompItem and FootageItem objects. See CompItem object and
FootageItem object.
See: https://ae-scripting.docsforadobe.dev/item/avitem/
Attributes¶
duration
¶
duration: ChunkField[float]
The duration of the item in seconds. Still footages have a duration of 0. Read-only.
frame_duration
¶
frame_duration: ChunkField[int]
The duration of the item in frames. Still footages have a duration of 0. Read-only.
frame_rate
¶
frame_rate: ChunkField[float]
The frame rate of the item in frames-per-second. 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 AVItem has an audio component.
In a CompItem, the value is linked to the composition.
In a FootageItem,
the value is linked to the main_source object.
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.
name
¶
name = ChunkField[str](
"_name_utf8", "contents", transform=strip_null
)
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.
pixel_aspect
¶
pixel_aspect: ChunkField[float]
The pixel aspect ratio of the item (1.0 is square). Read-only.
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
is still (item.main_source.is_still is True).