Main Content

Network Video Receive

Receive video from a network RTP stream

  • Library:
  • NVIDIA Jetson and NVIDIA DRIVE / Audio and Video

  • NVIDIA video stream block

Description

Receives video from a network RTP stream. When running on hardware, the block outputs video from the network.

Ports

Output

expand all

This port outputs the image signal of each pixel.

Data Types: uint8 | uint16

This port outputs the red component of each pixel.

Dependencies

This port appears only when you select RGB for Format and Separate color signal for Image signal in the block parameters window.

Data Types: uint8

This port outputs the green component of each pixel.

Dependencies

This port appears only when you select RGB for Format and Separate color signal for Image signal in the block parameters window.

Data Types: uint8

This port outputs the blue component of each pixel.

Dependencies

This port appears only when you select RGB for Format and Separate color signal for Image signal in the block parameters window.

Data Types: uint8

Parameters

expand all

Specify the port number from which you want to receive the video packets. Match the local port number with the remote port number of the sending host.

Programmatic Use

Block Parameter: Port
Type: character vector
Values: '3000'|scalar
Default: '3000'

Specify the resolution of the image to be captured, in pixels.

Programmatic Use

Block Parameter: ImageSize
Type: character vector
Values: [width, height]|
Default: '[320, 240]'

Specify the format of the video stream: Grayscale, Grayscale (16-bit), or RGB.

Programmatic Use

Block Parameter: ImageFormat
Type: character vector
Values: 'RGB'|'Grayscale'|'Grayscale (16-bit)'
Default: 'Grayscale (16-bit)'

Specify how to output RGB color video signal. If you select One multidimensional signal, the block outputs an M-by-N-by-P color video signal, where P is the number of color planes, at the Image port. If you select Separate color signal, additional ports appear on the block. Each port outputs one M-by-N plane of an RGB video stream.

Dependencies

To enable this parameter, set Format to RGB.

Programmatic Use

Block Parameter: ImageSignal
Type: character vector
Values: 'One multidimensional signal'|'Separate color signal'|
Default: 'One multidimensional signal'

Select the type of compression algorithm to use for decoding the RTP video stream.

Note

When selecting H265 decoder, the receiver must be started before the sender starts the video stream. This is because metadata required to decode the data is emitted at the start of the stream. Alternatively, you can configure the sender to insert this metadata at intervals within the stream. For example, when using GStreamer, use the following command,

gst-launch-1.0 -v videotestsrc is-live=true ! video/x-raw,
framerate=100/1,width=320,height=240 ! videoconvert 
! x265enc tune=zerolatency ! h265parse config-interval=2 
! rtph265pay ! udpsink host=127.0.0.1 port=3000

Programmatic Use

Block Parameter: Decoder
Type: character vector
Values: 'JPEG'|'VP8'|'VP9'|'H264'|'H265'|'None (uncompressed)'
Default: 'JPEG'

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

Note

When hardware acceleration is enabled, the image resolution is automatically scaled if the sender and receiver specifications for resolution are different. If you disable hardware acceleration, the automatic scaling is also disabled. In such cases, ensure the image resolution specification at the sender and receiver are the same.

If the video frame size is not a multiple of 16, the hardware accelerator libraries pads the borders of the received video frame to output the requested size. If this behavior is not desired, disable hardware acceleration.

Programmatic Use

Block Parameter: UseHWAcceleration
Type: character vector
Values:'off'|'on'
Default: 'on'

Select the sample time of the video device.

Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.

Programmatic Use

Block Parameter: SampleTime
Type: character vector
Values: scalar | vector
Default: '0.1'

Version History

Introduced in R2021b