Skip to main content

Sinks

In most cases, Nimble is meant to be the server in a client-server model; but Sinks allow Nimble to act as a client, initiate a connection to an external resource, and then push data out (from the end of a pipeline).

Every sink has a mandatory type field that indicates the implementation:

  • type: The sink implementation type. There are 5 different implementations:
    • file: Save annotated video stream to file (for debug use).
    • embedding: Produces an "embedding" database with a dump of embedding metadata along with each image frame.
    • pickle: Directly serialize pipeline metadata to Python "pickle" files (for debug use).
    • zmq: Publish pipeline metadata (with optional jpeg) to a ZMQ socket. Deprecated.
    • inf: Infinite data sink. Deprecated.

Every sink also has an optional filter property, defined as a list of source IDs. Each pipeline metadata frame is filtered using this property to make sure it came from an allowed source. This effectively allows the sink to target a specific channel (source + pipeline) or multiple channels.

Different sink types may define additional properties, such as address:

type: "file"         # string: "file", "embedding", "pickle", "zmq", "inf"
address: "video.mp4" # string: url or path, depending on 'type' property
filter: [] # array of source ids: source(s) to allow, no filter if list is empty
tip

The WebSocket endpoint is always enabled for all channels and does not need to be explicitly specified as a sink. The WebSocket is the recommended way to consume analytics metadata from Nimble.