Main Content

RTSP Video Stream Transmit

Stream video to network over real-time streaming protocol

Since R2024a

Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.

  • Raspberry Pi RTSP Video Stream Transmit Block Icon

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

Description

Use the RTSP Video Stream Transmit block to stream video to network over real-time streaming protocol (RTSP). You can stream grayscale, RGB, or YCbCr video over a network and view it on devices connected to the same network. You can also encode the video stream using the H264 or JPEG standards.

Note

When using this block in a Simulink® model, use a minimum of 256 MB of Raspberry Pi® GPU memory to avoid any deterioration in the video feed using the RTSP protocol.

Ports

Input

expand all

Red channel signal of the RGB video to stream, 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 Input image format to RGB.

Data Types: uint8

Green channel signal of the RGB video to stream, 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 Input image format to RGB.

Data Types: uint8

Blue channel signal of the RGB video to stream, 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 Input image format to RGB.

Data Types: uint8

Luminance component of the input video to stream, 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 Input image format to YCbCr 4:2:2.

Data Types: uint8

Blue difference chroma component of the input video to stream, 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 Input image format to YCbCr 4:2:2.

Data Types: uint8

Red difference chroma component of the input video to stream, 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 Input image format to YCbCr 4:2:2.

Data Types: uint8

Grayscale input video signal to stream, 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 input video.

Dependencies

To enable this port, set Input image format to Grayscale.

Data Types: uint8

Parameters

expand all

Video parameters

Specify the format of the input 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.

Select the output image resolution.

  • Specify — Manually specify the input image resolution in the Image size ([width, height]) parameter. Using this option, you can either increase or decrease the resolution of the output video stream. When you specify a higher resolution, the execution speed of a Simulink model decreases.

  • Inherit from input image — The block inherits the resolution of the input image.

Specify the resolution of the input image, in pixels.

Dependencies

To enable this parameter, set Output resolution to Specify.

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

Specify the frame rate of the input video signal, in frames per second.

RTSP stream connection parameters

Specify the Raspberry Pi hardware port number from which you want to stream the video.

Specify a unique identifier to create an RTSP URL for a video stream.

Version History

Introduced in R2024a