Schemas / Pixel / raster

rig.pixel.source

v0.31.0 · draft 10 fields 1 required

Fields

FieldTypeMeaning
kind enumnone · image-file · generator · image-sequence · video-device · video-file · cast-receive required none, image-file, generator, image-sequence, video-device, video-file, cast-receive
asset entity optional Asset ref when kind needs a path; absent otherwise
generatorName string optional Generator id; required when kind=generator
sequenceFps float optional Optional. Sequence playback
sequenceFrame int optional Optional. Current frame index; absent = 0
videoDeviceRef uint optional Optional. Host device index when kind=video-device; absent = default device
videoDeviceName string optional Optional. Device name; stable identity when indices shift (re-plugged or reordered devices)
videoWidth uint optional Optional. Selected capture width; absent/0 = host default
videoHeight uint optional Optional. Selected capture height; absent/0 = host default
videoTime float optional Optional. Seconds into clip when kind=video-file; absent = 0

Playback / capture settings for a raster input. Format when present.

File identity is rig.media.asset_ref via asset. Compose rig.meta.named for a label.

Only kind is required - emit the fields the chosen kind needs and leave the rest absent.

kind=cast-receive is an inbound live frame (AirPlay / peer). How the host opens the session stays fulfillment.

kind=video-device is a live video input (camera, capture card, virtual camera) - not a file, and not a generic device. videoDeviceRef and videoDeviceName are machine-local, same bargain as MIDI portIndex / portName: ship whichever the host API exposes, and fail visibly rather than bind the wrong device. Prefer videoDeviceName when the host reports one. videoWidth / videoHeight are the one selected capture mode. Mode lists, negotiation, and fallback stay fulfillment; the mode actually delivered is host cache.

Loop comes from the asset_ref when applicable. Decode / grab / bake = fulfillment.

JSON Schema

Resolves at https://rig.works/schemas/rig.pixel.source.schema.jsonraw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.pixel.source.schema.json",
  "title": "rig.pixel.source",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "none",
        "image-file",
        "generator",
        "image-sequence",
        "video-device",
        "video-file",
        "cast-receive"
      ]
    },
    "asset": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "generatorName": {
      "$ref": "./_defs.schema.json#/$defs/string"
    },
    "sequenceFps": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "sequenceFrame": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "videoDeviceRef": {
      "$ref": "./_defs.schema.json#/$defs/uint"
    },
    "videoDeviceName": {
      "$ref": "./_defs.schema.json#/$defs/string"
    },
    "videoWidth": {
      "$ref": "./_defs.schema.json#/$defs/uint"
    },
    "videoHeight": {
      "$ref": "./_defs.schema.json#/$defs/uint"
    },
    "videoTime": {
      "$ref": "./_defs.schema.json#/$defs/float"
    }
  },
  "required": [
    "kind"
  ]
}