unreal.RtspMediaSource

class unreal.RtspMediaSource(outer: Object | None = None, name: Name | str = 'None')

Bases: BaseMediaSource

RTSP Media Source

C++ Source:

  • Plugin: RTSPMedia

  • Module: RTSPMedia

  • File: RtspMediaSource.h

Editor Properties: (see get_editor_property/set_editor_property)

  • auto_reconnect (bool): [Read-Write] Automatically reconnect when the connection fails The player will begin reconnection attempts after the delay specified in Min Retry Delay

  • decoder_buffer_size (int32): [Read-Write] Decoder reorder buffer size. Use 1 for minimum latency (i.e. no B-frames) Increase if video frames appears out of order

  • decoder_poll_interval_ms (int32): [Read-Write] How frequently to poll the decoder for output frames (in milliseconds) Lower values reduce latency but increase CPU usage

  • host (str): [Read-Write] Host name or IP address of the RTSP server

  • jitter_buffer_auto_adjust (bool): [Read-Write] The jitter buffer accounts for spikes in the network delivery of RTP packets in order to provide a steady stream of packets to the decoder. This setting automatically adjusts the jitter buffer depth based on network conditions. When disabled, the static Depth value is used.

  • jitter_buffer_depth_ms (int32): [Read-Write] A higher buffer depth will absorb more network jitter at the cost of additional latency. On clean networks a low or zero value may be configured which will minimize the latency introduced by the buffer.

  • jitter_buffer_observation_window_seconds (float): [Read-Write] How long network conditions must remain stable before the jitter buffer depth is reduced. Longer windows provide more protection against intermittent spikes.

  • max_fragment_buffer_size_mb (int32): [Read-Write] Places a limit on how much memory is used for fragmented NAL unit reassembly NAL units will be dropped if this memory limit is exceeded Consider increasing this value for high bitrate streams

  • max_queued_video_samples (int32): [Read-Write] Maximum decoded video frames to queue while waiting for game thread consumption Higher values reduce visible skips after game thread hitches at the cost of memory

  • max_reconnect_attempts (int32): [Read-Write] The maximum number of times the player will attempt to reconnect after a connection failure Set to 0 to retry indefinitely

  • max_reconnect_delay_seconds (float): [Read-Write] The maximum amount of time to wait before attempting to reconnect after a connection failure The player will gradually increase the delay before each connection attempt but for no longer than this maximum

  • min_reconnect_delay_seconds (float): [Read-Write] The minimum amount of time to wait before attempting to reconnect after a connection failure

  • path (str): [Read-Write] Path to the stream on RTSP server

  • platform_player_names (Map[str, Name]): [Read-Write] Override native media player plug-ins per platform (Empty = find one automatically).

  • port (int32): [Read-Write] Port number of the RTSP Server

  • provide_cpu_buffer (bool): [Read-Write] Populate a CPU-accessible pixel buffer alongside the GPU texture Whether this is available depends on the underlying decoder implementation

  • request_timeout_seconds (float): [Read-Write] RTSP request timeout in seconds. Increase for slow or unreliable networks to avoid premature session failures

  • socket_buffer_size_kb (int32): [Read-Write] Socket buffer size for stream data in KB. Increase this setting for high bitrate streams (e.g. 4K)

  • transport_protocol (RtspMediaTransportProtocol): [Read-Write] Only TCP interleaved transport is supported

property auto_reconnect: bool

[Read-Write] Automatically reconnect when the connection fails The player will begin reconnection attempts after the delay specified in Min Retry Delay

Type:

(bool)

property decoder_buffer_size: int

[Read-Write] Decoder reorder buffer size. Use 1 for minimum latency (i.e. no B-frames) Increase if video frames appears out of order

Type:

(int32)

property decoder_poll_interval_ms: int

[Read-Write] How frequently to poll the decoder for output frames (in milliseconds) Lower values reduce latency but increase CPU usage

Type:

(int32)

property host: str

[Read-Write] Host name or IP address of the RTSP server

Type:

(str)

property jitter_buffer_auto_adjust: bool

[Read-Write] The jitter buffer accounts for spikes in the network delivery of RTP packets in order to provide a steady stream of packets to the decoder. This setting automatically adjusts the jitter buffer depth based on network conditions. When disabled, the static Depth value is used.

Type:

(bool)

property jitter_buffer_depth_ms: int

[Read-Write] A higher buffer depth will absorb more network jitter at the cost of additional latency. On clean networks a low or zero value may be configured which will minimize the latency introduced by the buffer.

Type:

(int32)

property jitter_buffer_observation_window_seconds: float

[Read-Write] How long network conditions must remain stable before the jitter buffer depth is reduced. Longer windows provide more protection against intermittent spikes.

Type:

(float)

property max_fragment_buffer_size_mb: int

[Read-Write] Places a limit on how much memory is used for fragmented NAL unit reassembly NAL units will be dropped if this memory limit is exceeded Consider increasing this value for high bitrate streams

Type:

(int32)

property max_queued_video_samples: int

[Read-Write] Maximum decoded video frames to queue while waiting for game thread consumption Higher values reduce visible skips after game thread hitches at the cost of memory

Type:

(int32)

property max_reconnect_attempts: int

[Read-Write] The maximum number of times the player will attempt to reconnect after a connection failure Set to 0 to retry indefinitely

Type:

(int32)

property max_reconnect_delay_seconds: float

[Read-Write] The maximum amount of time to wait before attempting to reconnect after a connection failure The player will gradually increase the delay before each connection attempt but for no longer than this maximum

Type:

(float)

property min_reconnect_delay_seconds: float

[Read-Write] The minimum amount of time to wait before attempting to reconnect after a connection failure

Type:

(float)

property path: str

[Read-Write] Path to the stream on RTSP server

Type:

(str)

property port: int

[Read-Write] Port number of the RTSP Server

Type:

(int32)

property provide_cpu_buffer: bool

[Read-Write] Populate a CPU-accessible pixel buffer alongside the GPU texture Whether this is available depends on the underlying decoder implementation

Type:

(bool)

property request_timeout_seconds: float

[Read-Write] RTSP request timeout in seconds. Increase for slow or unreliable networks to avoid premature session failures

Type:

(float)

property socket_buffer_size_kb: int

[Read-Write] Socket buffer size for stream data in KB. Increase this setting for high bitrate streams (e.g. 4K)

Type:

(int32)

property transport_protocol: RtspMediaTransportProtocol

[Read-Only] Only TCP interleaved transport is supported

Type:

(RtspMediaTransportProtocol)