Skip to content

Output module

OutputModule

An OutputModule object of a RenderQueueItem generates a single file or sequence via a render operation, and contains attributes and methods relating to the file to be rendered.

Example
from py_aep import parse

app = parse("project.aep")
om = app.project.render_queue.items[0].output_modules[0]
print(om.file)

See: https://ae-scripting.docsforadobe.dev/renderqueue/outputmodule/

Attributes

file

file: str

The full path for the file this output module is set to render.

Resolves template variables like [compName], [width], [frameRate], etc. to their actual values based on the composition and render settings. Read / Write.

file_template

file_template: str

The raw file path template, may contain [compName] and [fileExtension] variables. Read / Write.

format_options

Format-specific render options for this output module. The concrete type depends on the output format:

Read-only.

include_source_xmp

include_source_xmp = ChunkField[bool](
    "_om_ldat", "include_source_xmp"
)

When True, writes all source footage XMP metadata to the output file. Read / Write.

name

name: str

The name of the output module, as shown in the user interface. Read-only.

parent

Reference to parent RenderQueueItem, used for resolving file paths and accessing comp and render settings. Read-only.

post_render_action

post_render_action = enum(
    PostRenderAction, "_om_ldat", "post_render_action"
)

An action to perform when rendering is complete. Read / Write.

post_render_target_comp

post_render_target_comp: CompItem

The CompItem to use for post-render actions that require a comp. Only used when post_render_action is IMPORT_AND_REPLACE or SET_PROXY. Read-only.

settings

settings: SettingsView

[SettingsView][py_aep.models.settings.SettingsView] dict with ExtendScript-compatible keys. Includes "Video Output", "Audio Bit Depth", "Output Color Space", "Preserve RGB", "Convert to Linear Light", etc. Matches the format from OutputModule.get_settings(GetSettingsFormat.NUMBER).

templates

templates: list[str]

Available output module template names.

Requires ae_preferences_dir to have been passed to parse(). Returns an empty list if no preferences directory was provided.

Functions

apply_template

apply_template(name: str) -> None

Apply an output module template by name.

Copies the template's settings (channels, resize, crop, audio, post-render action, etc.) and format info (Rouu data) to this output module.

Requires ae_preferences_dir to have been passed to parse().

Parameters:

  • name (str) –

    Template name (e.g. "Lossless", "H.264 - Match Render Settings - 15 Mbps").

Raises:

  • ValueError

    If the template name is not found.

get_setting

get_setting(
    key: str, format: GetSettingsFormat = STRING
) -> Any

Return a single output module setting in the specified format.

Parameters:

  • key (str) –

    The setting key (e.g. "Video Output", "Audio Bit Depth").

  • format (GetSettingsFormat, default: STRING ) –

    The output format.

get_settings

get_settings(
    format: GetSettingsFormat = STRING,
) -> dict[str, Any]

Return output module settings in the specified format.

Parameters:

  • format (GetSettingsFormat, default: STRING ) –

    The output format. GetSettingsFormat.NUMBER returns numeric values (enums unwrapped to ints). GetSettingsFormat.STRING returns all values as strings

remove

remove() -> None

Remove this output module from the render queue item.

Raises:

  • RuntimeError

    If this is the last output module (AE requires at least one).