Custom Function Repo

Manually process or modify frames and metadata using python code from a specific Git repository

Overview

Custom Function Repo node lets you run custom python code from a specific Git repository to process or modify frames, and extract or add metadata to frames.

Inputs & Outputs

  • Inputs : 1, Media Format : Raw Video
  • Outputs : 1, Media Format: Raw Video
  • Output Metadata : See below.

Pipeline usage

Use this node when reusable custom logic is maintained as an installable Python package in Git. The repository must contain package_name.module_name, and the selected function (default process_frame) must accept frame plus keyword arguments and return whether the frame should continue downstream. The node parses configuration once as JSON and passes the resulting object as the configuration keyword argument on every frame. Pin git_version and package_version for repeatable deployments, use a read-only token for private repositories, and avoid logging the token. Installation/import errors occur when the deployment first runs, so validate the package and function contract before relying on it in production.

Properties

PropertyDescriptionTypeDefaultRequired
git_repo_urlThe URL of the Git repository where the custom code package is located. See example here.stringYes
git_versionGit version to use. Can be a branch name, a tag, or a commit hash. Optional.stringNo
git_tokenRead-only token to use for private Git repositories.stringNo
package_nameName of the package to install from the Git repository.stringnullYes
package_versionPython package version to install from the Git repository.stringnullYes
module_nameName of the Python module to use from the package.stringnullYes
function_nameName of the function to use from the module. Defaults to process_frame if not specified.stringnullNo
configurationJSON object containing the configuration for the function.string{}No

Output Metadata

Output metadata is defined by the custom Python code. The example shows a representative custom field; actual keys and values depend on the function implementation.

PathTypeDescription
custom_metadata_keystringValue of custom metadata key.

JSON example

{
  "custom_metadata_key": "value"
}

Did this page help you?