Main Content

Video Send

Send video stream to remote hardware

Since R2023b

Add-On Required: This feature requires the MATLAB Coder Support Package for NVIDIA Jetson and NVIDIA DRIVE Platforms add-on.

  • INVIDIA Video send block

Libraries:
NVIDIA Jetson and NVIDIA DRIVE / Audio and Video

Description

The Video Send block sends video streams from Simulink® to a specified remote device. You can send grayscale and RGB images to the remote device and specify the compression and quality of the video stream. This block uses the Gstreamer framework to handle data streaming.

Ports

Input

expand all

RGB or grayscale image signal to stream, specified as an M-by-N-by-3 matrix or M-by-N matrix, respectively.

Dependencies

The Image Signal parameter must be set to One multidimensional signal.

Data Types: uint8 | uint16

Red channel signal of the RGB image to stream, specified as an M-by-N matrix.

Dependencies

The Image Signal parameter must be set to Separate color signals.

Data Types: uint8

Green channel signal of the RGB image to stream, specified as an M-by-N matrix.

Dependencies

The Image Signal parameter must be set to Separate color signals.

Data Types: uint8

Blue channel signal of the RGB image to stream, specified as an M-by-N matrix.

Dependencies

The Image Signal parameter must be set to Separate color signals.

Data Types: uint8

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Video parameters

Specify the input video stream signal format as one of the following:

  • RGB - RGB image (8-bit per color channel).

  • Grayscale - Grayscale image (8-bit).

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: ImageFormat
Values: 'RGB' (default) | 'Grayscale'

Specify the nature of the RGB image input signal as one of the following:

  • One multidimensional signal - One input port for an M-by-N-by-3 color video signal with R, G, and B color channels.

  • Separate color signals - Three separate input ports for R,G and B channels. Each port accepts one M-by-N matrix.

Dependencies

The Format parameter must be set to RGB.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: ImageSignal
Values: 'One multidimensional signal' (default) | 'Separate color signal'

Specify the compression format for the video stream.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: Compression
Values: 'JPEG' (default) | 'VP8' | 'VP9' | 'H264' | 'H265' | 'None (uncompressed)'

Specify the quality of the JPEG video stream as a positive scalar. This parameter controls the encoding speed and compression ratio of the video stream. A higher quality value increases the image quality at the expense of a higher network bandwidth. Specify a lower value for low-bandwidth network connections.

Dependencies

The Compression parameter must be set to JPEG.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: JPEGQuality
Values: 85 (default) | positive scalar in the range [0,100]

Select this parameter to enable use of graphics hardware on the NVIDIA® target for encoding.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: UseHWAcceleration
Values: 'on' (default) | 'off'
Connection parameters

Specify the IP address or host name of the remote device, to which the block sends the message, as a character vector.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: RemoteAddress
Values: 127.0.0.1 (default) | valid IP address in quotes

Specify the IP port of the remote device, to which the block sends the message. When streaming the video, this block picks the first available local UDP port, independent of the remote port you specify.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

To get the block parameter value programmatically, use the get_param (Simulink) function.

Parameter: RemotePort
Values: 3000 (default) | integer from 0 to 65535

Version History

Introduced in R2023b