Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

require_prop

require_prop(
  input: Clip,
  #{
    key: String,
    kind?: String,
    value?: MetadataValue,
  }
)

Validates that each input frame carries required metadata before passing the frame through unchanged.

The input must be one fixed-format planar Gray, YUV, or planar RGB clip. key must already exist in the active MetadataSchema. If you set kind, it must match the registered kind for that key. If you set value, it must also match the registered kind, and value: none is rejected. Missing keys, cleared keys, type mismatches, and value mismatches fail render.

Examples

register_prop("acme/filter:enabled", "bool")

output = source("input.mkv")
    .std.require_prop(#{ key: "acme/filter:enabled", kind: "bool", value: true })

Input

One fixed-format planar Gray, YUV, or planar RGB clip.

Output

A clip with unchanged media and frame data when every frame satisfies the metadata requirement.

Options

  • key (String) – Select the registered metadata key to require.
  • kind (String) – Require a specific metadata kind; supported values are "bool", "int", "float", "string", "array", "rational", "blob", and "binary".
  • value (MetadataValue) – Require an exact metadata value.