Gst-nvdsudpsink

The Gst-nvdsudpsink plugin is a sink type component which can be used to transmit the RTP packets over IP network. Internally, the plugin uses Rivermax SDK APIs for network communications. NVIDIA Mellanox Rivermax® offers a unique IP-based solution for any media and data streaming use case. For more details see the Rivermax Product Page.

  • Rivermax utilizes the kernel bypass technology and RDMA capabilities to achieve better CPU performance, low latency, and higher bandwidth.

  • Rivermax SDK provides two types of APIs for transmission – Media and Generic. This component has support for both the APIs. By default, it uses Generic APIs and can transmit any type of payload (Compressed, Uncompressed, audio etc.).

  • Rivermax media APIs are used for specific case of SMPTE 2110-20, 30, 40 streams. This component supports SMPTE 2110-20 (non-interlaced) and SMPTE 2110-30 streams with traffic shaping.

  • Rivermax media API mode can be enabled by setting sdp-file property of the component. For uncompressed video streams with media API, packets-per-line and payload-size properties along with sdp-file must be set.

Payload size and packets per line for some of common formats

To calculate the payload size and packets per line, use the following steps:

  1. Calculate line stride as follows:

    line stride = (width * pgroup size) / pgroup coverage
    
  2. Divide this stride into number of packets having equal bytes. This will be value of packet-per-line.

  3. Add 20 bytes to size of each packet calculated in step 2 for RTP + Payload header. This will be value for payload-size.

    Note

    It is assumed that there is only single Sample Row Data per RTP packet and line stride is equally divisible.

Following are values for some of the common formats:

YCbCr-4:2:2 1920x1080 8 bit:  payload-size:1300, packets-per-line:3
YCbCr-4:2:2 1920x1080 10 bit: payload-size:1220, packets-per-line:4
YCbCr-4:2:0 1920x1080 8 bit:  payload-size:1460, packets-per-line:2
YCbCr-4:2:0 1920x1080 10 bit: payload-size:1220, packets-per-line:3
RGB 1920x1080 8 bit:  payload-size:1460, packets-per-line:4
RGB 1920x1080 10 bit: payload-size:1220, packets-per-line:6

Refer to the SMPTE ST 2110-20:2017 for more information.

System can also have Gstreamer provided OSS implementation of udp sink (udpsink) component. In that case system would have two implementations for udp sink - udpsink and nvdsudpsink. nvdsudpsink component can only be used with NVIDIA Mellanox ConnectX-5 and above cards after having installed Rivermax SDK and its license.

Note

Nvidia Mellanox OFED version 5.5 which is required by Rivermax has installation issue on Jetson platform. Please use the following command as work around to install OFED on Jetson platform:

sudo ./mlnxofedinstall --with-vma --force-fw-update --add-kernel-support --force --without-iser-modules --without-isert-modules --without-iser-dkms --without-isert-dkms
  • Follow the instruction on the SDK page to obtain development license for Rivermax or purchase it here: https://store.mellanox.com/categories/ethernet/connectx-smartnics/rivermax-licenses.html.

  • To select nvdsudpsink out of two installations, use either LOCAL_IFACE_IP environment variable or local-iface-ip property. Use the command below to export the environment variable:

    export LOCAL_IFACE_IP=<IP of Mellanox NIC>
    
  • nvdsudpsink component also requires CAP_NET_RAW capability. Either run the application that uses nvdsudpsink component with superuser privilege or set the CAP_NET_RAW capabilities using the following command.

    sudo setcap CAP_NET_RAW=ep <absolute path of application>
    

For example:

sudo setcap CAP_NET_RAW=ep /opt/nvidia/deepstream/deepstream/bin/deepstream-app

sudo setcap CAP_NET_RAW=ep /usr/bin/gst-launch-1.0
Gst-nvdsudpsrc

Inputs and Outputs

  • Inputs

    • GstBufferList having RTP packets as buffer content.

  • Control parameters

    • LOCAL_IFACE_IP ENV flag or local-iface-ip property

    • host

    • port

    • chunk-size

    • packets-per-chunk

    • payload-size

    • sdp-file

    • packets-per-line

  • Output

    • None

Features

The following table summarizes the features of the plugin.

Gst-nvdsudpsink plugin features

Feature

Description

Release

Supports Rivermax Generic and Media APIs

By default, it supports generic APIs, but media API can be enabled by setting sdp-file property.

DS 6.1

Supports any type of RTP packet (Compressed, Uncompressed, audio etc.) with Generic APIs

No restriction on content of RTP payload in case of Generic APIs.

DS 6.1

Supports RTCP packets,In addition to RTP

RTCP packets can also be transmitted.

DS 6.1

Traffic shaping in case of Uncompressed streams (video and audio)

By using Rivermax media APIs,packet pacing can be enabled for uncompressed video and audio streams.

DS 6.1

Supports SMPTE 2110-20 (Only progressive video)

Uncompressed SMPTE 2110-20 (non-interlaced) streams with packet pacing is supported through Rivermax media APIs.

DS 6.1

Supports SMPTE 2110-30

Uncompressed SMPTE 2110-30 stream with packet pacing is supported through Rivermax media APIs.

DS 6.1

Gst Properties

The following table describes the Gst-nvdsudpsink plugin’s Gst properties.

Gst-nvdsudpsink plugin gst properties

Property

Meaning

Type and Range

Example / Notes

Platforms

port

The port number to send the RTP packets to

Integer, 0 to 65535

Port=5004

dGPU Jetson

host

Unicast / Multicast address to send the packets

String

address=192.168.4.60

dGPU Jetson

chunk-size

Number of chunks to allocate in case of generic APIs

Integer, 1 to 65535

chunk-size=100

dGPU Jetson

packets-per-chunk

Number of packets per chunk

Integer, 1 to 65535

packets-per-chunk=10

dGPU Jetson

payload-size

Size of payload in RTP packet

Integer, 0 to 65535

payload-size=1400

dGPU Jetson

packets-per-line

Number of packets per line in case of media APIs

Integer, 1 to 65535

packets-per-line=4

dGPU Jetson

sdp-file

Path to SDP file, to enable the use of Rivermax media APIs

String

sdp-file=”sdp_video.txt”

dGPU Jetson

local-iface-ip

IP Address associated with network interface through which to transmit the data

String

local-iface-ip=”192.168.2.20”

dGPU Jetson