The Demux (Demultiplexer) node is used to separate a MessageGroup into individual outputs. It currently serves as way to demultiplex the output of Sync node.

How to Place It

pipeline = dai.Pipeline()
demux = pipeline.create(dai.node.MessageDemux)
dai::Pipeline pipeline;
auto demux = pipeline.create<dai::node::MessageDemux>();

Inputs and Outputs

input          │                   │
──────────────►│                   │
               │       Demux       │        output1
               │                   ├───────────►
               │                   │        output2
               │                   ├───────────►
               │                   │        ...

Message types

  • input - MessageGroup

  • output1, output2, … - Individual output messages


The Demux node is particularly useful for handling different types of data coming from a single source. For example, when the Sync node is used to synchronize the outputs of multiple nodes, the output of the Sync node is a MessageGroup containing all the messages from the synchronized nodes. The Demux node can be used to separate the messages into individual streams.

# Create sync node and set sync threshold
sync = pipeline.create(dai.node.Sync)

# Create demux node
demux = pipeline.create(dai.node.MessageDemux)

# Sync the outputs of multiple nodes["rgb"])["depth"])
script.outputs["out"].link(sync.inputs["script"]) # Sync output is a MessageGroup containing all the messages from the synchronized nodes

# Demux the MessageGroup into individual messages
// Create sync node and set sync threshold
auto sync = pipeline.create<dai::node::Sync>();

// Create demux node
auto demux = pipeline.create<dai::node::MessageDemux>();

// Sync the outputs of multiple nodes>input["rgb"]);>input["depth"]);

sync->>input); // Sync output is a MessageGroup containing all the messages from the synchronized nodes

// Demux the MessageGroup into individual messages

Examples of Functionality


class depthai.node.MessageDemux
class Id

Node identificator. Unique for every node on a single Pipeline

getAssetManager(*args, **kwargs)

Overloaded function.

  1. getAssetManager(self: depthai.Node) -> depthai.AssetManager

  2. getAssetManager(self: depthai.Node) -> depthai.AssetManager

getInputRefs(*args, **kwargs)

Overloaded function.

  1. getInputRefs(self: depthai.Node) -> List[depthai.Node.Input]

  2. getInputRefs(self: depthai.Node) -> List[depthai.Node.Input]

getInputs(self: depthai.Node) → List[depthai.Node.Input]
getName(self: depthai.Node)str
getOutputRefs(*args, **kwargs)

Overloaded function.

  1. getOutputRefs(self: depthai.Node) -> List[depthai.Node.Output]

  2. getOutputRefs(self: depthai.Node) -> List[depthai.Node.Output]

getOutputs(self: depthai.Node) → List[depthai.Node.Output]
getParentPipeline(*args, **kwargs)

Overloaded function.

  1. getParentPipeline(self: depthai.Node) -> depthai.Pipeline

  2. getParentPipeline(self: depthai.Node) -> depthai.Pipeline

class dai::node::MessageDemux : public dai::NodeCRTP<Node, MessageDemux, MessageDemuxProperties>

Public Functions

MessageDemux(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId)
MessageDemux(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId, std::unique_ptr<Properties> props)

Public Members

Input input = {*this, "input", Input::Type::SReceiver, {{DatatypeEnum::MessageGroup, false}}}

Input message of type MessageGroup

OutputMap outputs

A map of outputs, where keys are same as in the input MessageGroup

Public Static Attributes

static constexpr const char *NAME = "MessageDemux"

Got questions?

Head over to Discussion Forum for technical support or any other questions you might have.