Skip to main content

Anatomy of a video generator definition

A generator definition's YAML file is made up of distinct sections. You are encouraged to reference this guide as you create and edit your first video generator definition.

1. Gating

An optional section that allows you to control if and when a normfill invocation skips an ingested robolog. The gating mechanism is based on a GQL search query you specify within the generator definition, and it uses the same syntax as that used in Model-Prime's search interface.

Tip: The gating section is optional, but recommended. An enabled generator whose latest, tested generator version omits the gating section will run on all newly ingested robologs.

You could use the gating section to specify that only robologs exceeding a certain size should be processed by the normfill invocation. Or, you could specify that only robologs with a matching regular expression applied to their file path are processed by the invocation. The possibilities are endless.

Note: A generator definition's gating section is ignored during backfill invocations. This is because backfill invocations run on whichever robologs you choose while creating the backfill invocation request. Test invocations do use the gating section, however, as it provides you with a way to validate the gating logic against the robologs you select for testing.

2. Outputs

A section that specifies the generator's outputs. Only one output per generator is supported at this time.

Output name

An identifier used as a label in our web UI video player, and as the directory name for generated videos stored in your Model-Prime data lake.

Frame height

The height of the output video frame in pixels.

Inputs

A list of input channels to use for generating the output.

Channel name

The name of the channel to use as input. This must match the name of a channel in the robolog.

Rotate

The angle by which the input channel's frame should be rotated. This is optional and defaults to 0 degrees.

Position

The input channel's tiling position in a grid, expressed in "Y:X" format where Y is the image's vertical tile position and X the horizontal tile position. This attribute is required when more than one input channel is defined for an output. The maximum supported grid size is 4x4 at this time.

Example 1

A single input's height is scaled up to the configured frame height and its aspect ratio is maintained.

Example 2

Two inputs with positions "1:1" and "1:2" are tiled horizontally. The total output height is equal to the frame height while the widths are determined by the input channel's aspect ratio.

Example 3

Up to four inputs with positions "1:1", "1:2", "2:1", and "2:2" are tiled in a 2x2 grid configuration. Each row height is divided evenly between the target frame height. Any unassigned tiles will be left empty and at least one tile must be assigned in each row and column.

Tiling Positions