Main Content

RTSP Video Stream Receive

Receive video from network over real-time streaming protocol

Since R2024b

  • Raspberry Pi Video Stream Transmit Block Icon

Libraries:
Simulink Support Package for Raspberry Pi Hardware / Audio and Video

Description

Use the RTSP Video Stream Receive block to receive a real-time streaming protocol (RTSP) video stream from a network from a streaming source. You can create a source to stream the video over a network using either the RTSP Video Stream Transmit block or any other RTSP streaming device. The block outputs either a grayscale, RGB, or YCbCr video. The block can decode the video stream using the H264 or JPEG video encoding standards.

Note

To generate C/C++ code for this block, you must have Simulink® Coder™ and Embedded Coder® licenses.

Ports

Output

expand all

The port outputs the status of the RTSP Video Stream Receive block upon the video reception from the transmitter.

  • 0 — Indicates a successful read operation of the video stream over the network.

  • 1 — Indicates an interrupted stream from the transmitter which further results that the RTSP Video Stream Receive block cannot read any further data from the transmitter.

  • 2 — Indicates a stream error that requires user intervention to fix it, for example, the Raspberry Pi® hardware fails to receive data from the transmitter.

  • 3 — Indicates a GStreamer pipeline creation error that can occur due to misconfiguration of stream URL or image properties.

  • 4 — Indicates a fatal error that prevents the further execution of the block, for example, an internal program failure.

Data Types: int32

Red channel signal of the RGB video, specified as an M-by-N grid of pixels. Here, M is the number of rows and N is the number of columns for the red component.

Dependencies

  • To enable this port, set Image format to RGB.

Data Types: uint8

Green channel signal of the RGB video, specified as an M-by-N grid of pixels. Here, M is the number of rows and N is the number of columns for the green component.

Dependencies

  • To enable this port, set Image format to RGB.

Data Types: uint8

Blue channel signal of the RGB video, specified as an M-by-N grid of pixels. Here, M is the number of rows and N is the number of columns for the blue component.

Dependencies

  • To enable this port, set Image format to RGB.

Data Types: uint8

Luminance component of video, specified as an M-by-N grid of pixels. Here, M is the number of rows and N is the number of columns for the luminance component.

Dependencies

  • To enable this port, set Image format to YCbCr 4:2:2.

Data Types: uint8

Blue difference chroma component of video, specified as an M-by-N grid of pixels. Here, M is the number of rows and N is the number of columns for the blue difference chroma component.

Dependencies

  • To enable this port, set Image format to YCbCr 4:2:2.

Data Types: uint8

Red difference chroma component of video, specified as an M-by-N grid of pixels. Here, M is the number of rows and N is the number of columns for the red difference chroma component.

Dependencies

  • To enable this port, set Image format to YCbCr 4:2:2.

Data Types: uint8

Grayscale video, specified as an M-by-N grid of pixels. Here, M is the number of rows and N is the number of columns for the grayscale video.

Dependencies

  • To enable this port, set Image format to Grayscale.

Data Types: uint8

Parameters

expand all

Specify a unique RTSP URL to receive the video stream in this format: rtsp://<raspberrypi IP address>/<mount point identifier>

Specify the format of the output video stream.

Tip

To view a color video on your device, set this parameter to YCbCr 4:2:2. Because this format requires less bandwidth, you can stream the video without significantly affecting the video quality.

Specify image resolution of the video frames, in pixels.

Specify customized resolution of the output image, in pixels.

Dependencies

  • To enable this parameter, set Image size to custom.

Select decoding format for the real-time streaming protocol (RTSP) video stream.

Specify how often the block outputs an image frame from the video stream.

Version History

Introduced in R2024b