Processor outputs
outputs create reusable Project Viewer items. This is the correct mechanism
when a processor produces a subtitle file, rendered video, generated image or
other asset that should remain available after the processor finishes.
There are three output forms.
Tip: Give outputs stable, descriptive names and unique
refvalues when later actions need to create clips from those generated assets.
Existing file
{
"ref": "rendered",
"clip_type": "video",
"name": "Rendered Segment",
"source": r"D:\Exports\segment.mp4",
"source_duration": 12.0,
}The source file must exist.
Set owned=True only for files created by the current processor/render request
that Yrendr may delete during rollback. Do not mark arbitrary user files as owned.
Materialized content
{
"ref": "captions",
"clip_type": "subtitle",
"name": "Captions",
"extension": ".srt",
"content": srt_text,
"encoding": "utf-8",
"destination_dir": r"D:\Exports",
"source_duration": 90.0,
}If destination_dir is omitted, Yrendr writes the file under its generated output
directory. Filenames are sanitized and made unique automatically.
content may be text or bytes.
ZIP/archive member
A processor can ask Yrendr to materialize one member from an existing ZIP archive without loading the entire file into the processor result:
{
"ref": "photo_001",
"clip_type": "image",
"name": "DSC_0001",
"archive_source": r"D:\Photos\shoot.zip",
"archive_member": "selected/DSC_0001.jpg",
}Yrendr extracts the member into its generated-output directory using a sanitized, unique filename and adds the result to Project Viewer. The archive member path is never used directly as the destination path.
Generated Project Viewer asset
{
"ref": "title_asset",
"clip_type": "text",
"name": "Generated title",
"properties": {
"text": "Chapter One",
"font_size": 72,
},
}No file is created for this form.
Referencing an output from an action
A later create_clip action can attach to an output with asset_ref:
return {
"outputs": [
{
"ref": "captions",
"clip_type": "subtitle",
"name": "Captions",
"extension": ".srt",
"content": srt_text,
}
],
"actions": [
{
"action": "create_clip",
"clip_type": "subtitle",
"asset_ref": "captions",
"track": 1,
"start": 0.0,
"duration": 2.0,
"properties": {"text": "Hello"},
}
],
}Output refs must be unique within one result.