Nodes

View on GitHub

Documentation / Nodes

Nodes

Reference for every node in the workflow editor: what it does, its fields with defaults and limits, and what the validation on Run checks. Field names in code style are the keys used in the API; the inspector shows them with friendlier labels.

Connections

  • A Camera has one output and connects to exactly one Detect.
  • Detect connects to any number of filters and actions.
  • Every filter has two outputs, If and Else. An event that passes leaves through If; one that fails leaves through Else. An edge without a branch counts as If.
  • Snapshot connects onward to other actions, which then receive the snapshot. Other actions have no output.
  • Every node runs at most once per event.

The palette groups nodes into Sources, Detection, Logic, Object, Spatial, Temporal, and Actions. Enterprise nodes (Count, Line crossing, Dwell, Slack) show a lock until a license key is configured.

Sources

Camera — camera_source

FieldDefaultLimitsMeaning
nameCamera1 to 128 charactersName. Shown in the monitor and in alert messages
source_typertsprtsp, rtmp, srt, webrtc, whep, fileSource. How MediaMTX ingests the stream; see Cameras
urlemptyup to 2048 charactersURL. Stream URL for pull sources, asset key for file; unused for webrtc

On Run the URL must match the source type: rtsp:// or rtsps:// for RTSP, rtmp:// or rtmps:// for RTMP, srt:// for SRT, http://, https://, whep://, or wheps:// for WHEP, and an asset key made of letters, digits, ., _, -, and / for File.

Detection

Detect — detect

FieldDefaultLimitsMeaning
model_idnonea model from models/Model. Required on Run.
event_kindsallup to 64 kinds the model producesEvents. Empty passes every event kind of the model.
confidence_threshold0.50 to 1Confidence. Detections below it are dropped before tracking.
inference_fps11 to 15Checks per second. How often the model runs on this camera.

Selecting a model in Studio fills in its recommended confidence.

Filters

A filter passes or fails each event. Filters that inspect detections pass an event with no detections, except where noted.

If / Else — if_else_filter

Compares one property of the event. The condition object selects the property with field:

fieldoperatorvaluePasses when
event_kindis, is_notan event kindThe event's kind matches (or does not)
object_classcontains, not_containsa label, up to 256 charactersA detection with that label is present (or absent)
detection_counteq, neq, gt, gte, lt, lte0 to 1000, default gte 1The number of detections compares as chosen
max_confidencethe same six operators0 to 1, default gte 0.5The highest confidence compares as chosen

On Run, event_kind and object_class need a value, and it must be one the upstream model can produce.

Class — class_filter

FieldDefaultLimitsPasses when
classesemptyup to 64 labelsAny detection has one of the labels. Empty passes everything.

Labels must belong to the upstream model. An event with no detections fails this filter.

Size — size_filter

FieldDefaultLimitsPasses when
min_area00 to 1Any detection's box covers at least this fraction of the frame…
max_area10 to 1, at least min_area…and at most this fraction

Useful to ignore distant objects or false detections the size of a few pixels.

Zone — zone_filter

FieldDefaultLimitsPasses when
polygonempty3 to 100 points, coordinates 0 to 1 relative to the frameThe centre of any detection's box lies inside the polygon

Draw the polygon in the inspector or on a live frame with Edit on preview. On Run the polygon needs at least three points.

Schedule — time_window_filter

FieldDefaultLimitsMeaning
start_hour00 to 23Start hour, inclusive
end_hour230 to 23End hour, inclusive; smaller than start_hour wraps past midnight
weekdaysMonday to Friday0 (Monday) to 6 (Sunday), at least one on RunWeekdays the window applies
invertoffOutside schedule: pass outside the window instead, for after-hours scenarios

Times are evaluated in EVENT_TIMEZONE.

Debounce — debounce_filter

FieldDefaultLimitsMeaning
seconds301 to 3600After an event passes, further events from the same camera fail for this long

The window is kept per node and per camera, so several Debounce nodes in one workflow are independent.

Count — count_threshold_filter (Enterprise)

FieldDefaultLimitsPasses when
polygonemptyup to 100 points; fewer than 3 counts the whole frame
operatorgtegte, lteThe number of detections inside the polygon is at least (or at most)…
count10 to 1000…this value

Line crossing — line_crossing_filter (Enterprise)

FieldDefaultLimitsPasses when
lineemptyexactly 2 points on RunA tracked object's centre moved from one side of the line to the other since the previous check
directionanyany, in, outin counts an object crossing from the left side of the line to its right side when looking from the first point to the second; out counts the opposite direction

Relies on tracking ids; raise Checks per second for fast objects.

Dwell — dwell_filter (Enterprise)

FieldDefaultLimitsPasses when
polygonempty3 to 100 points
min_seconds601 to 3600A tracked object has stayed inside the polygon for at least this long

Actions

Fields marked with a credential type need a stored credential of that type; Actions and integrations describes each integration.

Alert — log_alert_action

FieldDefaultLimits
severitywarningSeverity: info, warning, critical
cooldown_seconds30Cooldown seconds, 0 to 3600; 0 records every event

Snapshot — snapshot_action

FieldDefault
annotateon: draw detections onto the image (Annotate)

Webhook — webhook_action

FieldDefaultLimits
urlemptyURL: an http:// or https:// URL on Run
methodPOSTMethod: POST, GET, PUT

Telegram — telegram_action

FieldDefaultLimits
credential_idnonea telegram_bot credential
chat_idempty1 to 64 characters
message_template[{kind}] camera={camera_id} at {ts}up to 4096 characters

Email — email_action

FieldDefaultLimits
credential_idnonean smtp credential
toemptyup to 320 characters
subject_template[{kind}] on camera {camera_id}up to 998 characters
body_template{kind} at {ts}, camera, snapshotup to 8192 characters

MQTT — mqtt_action

FieldDefaultLimits
credential_idnonean mqtt credential
topiclooksee/events1 to 512 characters
payload_templateempty: send the event as JSONup to 8192 characters

Discord — discord_action

FieldDefaultLimits
credential_idnonea discord_webhook credential
message_template[{kind}] camera={camera_id} at {ts}up to 2000 characters

Slack — slack_action (Enterprise)

FieldDefaultLimits
credential_idnonea slack_webhook credential
message_template[{kind}] camera={camera_id} at {ts}up to 4096 characters

Limits

A graph holds up to 200 nodes, 400 edges, and 100 comments. Node ids are up to 128 characters and edge ids up to 256.

Validation

Saving a graph checks its structure. Run additionally checks that every node can execute. Studio focuses the node an error refers to; the API returns the code in the code field with status 422, or 402 for a licensing error.

CodeMeaning
duplicate_node_ids, duplicate_edge_idTwo nodes or edges share an id
edge_node_missingAn edge points at a node that does not exist
branch_on_non_filterAn edge has an If/Else branch but leaves a node that is not a filter
no_camera_sourceThe workflow has no Camera
graph_cycleEdges form a loop
node_not_runnableA required field is empty or invalid; the message names the field
feature_not_licensedAn Enterprise node without a license key (status 402)
detect_node_missing, multiple_detect_nodesA Camera reaches no Detect, or more than one
model_not_selected, model_unavailableA Detect has no model, or its model is not in models/
unsupported_event_kindsDetect selects events the model does not produce
unsupported_classesA Class filter names labels the upstream model does not produce
unsupported_condition_event, unsupported_condition_classAn If / Else condition names an event or label the upstream model does not produce
asset_store_not_configured, asset_unavailableA File camera without an asset library, or with a missing object
credential_unavailable, credential_type_mismatchAn action's credential is missing or of another type

Nodes that no Camera reaches are allowed and ignored at run time; Studio marks them with a warning.