Skip to main content

Local setup

The simplest setup: a video stream sent through NanoPing and back on a single machine, over localhost. It needs one node and no network configuration, which makes it a good first test.

The pipeline sends the camera stream twice over a simulated bad link, with 2% packet loss and 100 ms delay: once protected by Raft, and once as plain UDP. You see both side by side, in windows labelled NanoPing and UDP. Raft repairs the lost packets, so the NanoPing window stays clean while the UDP window breaks up.

Download the pipeline

Requirements​

  • One node with a webcam.
  • GStreamer installed on the same machine.

Steps​

  1. Open Pipelines, click Add, choose From File and upload local-demo.json.
  2. Open the pipeline's Code panel and check the GStreamer commands in the lifecycle handler. The file is set up for macOS on Apple Silicon; on other systems, change the path of gst-launch-1.0, and on Linux the camera source. See Lifecycle handler.
  3. Start the pipeline. It starts GStreamer by itself and opens the two windows. On macOS, allow camera access if asked.

To make the link better or worse, change Loss Probability (in percent) and Delay on the Loss Constant and Delay Constant components, then click Save & Deploy.

Removing the comparison​

If you do not need the plain UDP window, remove its part of the pipeline:

  1. Delete the UDP Local on 127.0.0.1:5001, the Peer Router after it, and the Peer Writer for 127.0.0.1:6001 with its UDP Remote.
  2. On the first carrier's Loss Constant and Delay Constant, delete only the flows the plain UDP path used. Keep the components, since the first Raft carrier still runs through them.
  3. In the lifecycle handler, delete the command for the UDP window, and remove 127.0.0.1:5001 from multiudpsink clients= in the camera command.