View Source Membrane.RTC.Engine.Endpoint.RTSP (Membrane RTC Engine v0.13.0)

An Endpoint responsible for connecting to a remote RTSP stream source and sending the appropriate media track to other Endpoints (see Limitations).

This module requires the following plugins to be present in your mix.exs:

[
  {:connection, "~> 1.1"},
  {:membrane_rtsp, "~> 0.5.0"},
  {:membrane_udp_plugin, "~> 0.9.2"}
]

limitations

Limitations

Currently, only H264 streams are supported.

At the moment, if H264 parameters are passed out-of-band, only the HLS Endpoint will be able to subscribe to tracks created by the RTSP Endpoint.

If the RTSP Endpoint has yet to successfully connect to the stream source, a reconnect attempt can be made, either by the endpoint itself, or by calling Membrane.RTC.Engine.Endpoint.RTSP.request_reconnect/2. Once connected, however, if RTSP signalling crashes, the endpoint WILL NOT be able to reconnect, and will shut down instead. A manual restart of the endpoint will then be needed to restore its functionality.

Note that the RTSP Endpoint is not guaranteed to work when NAT is used by either side of the connection. By default, the endpoint will attempt to create client-side NAT binding by sending an empty datagram from client to source, after the completion of RTSP setup. This behaviour may be disabled by setting the option :pierce_nat to false.

bin-options

Bin options

Passed via struct Membrane.RTC.Engine.Endpoint.RTSP.t/0

  • rtc_engine

    pid()

    Required
    PID of parent Engine

  • source_uri

    URI.t()

    Required
    URI of source stream

  • rtp_port

    1..65535

    Default value: 20000
    Local port RTP stream will be received at

  • max_reconnect_attempts

    non_neg_integer() | :infinity

    Default value: 3
    How many times the endpoint will attempt to reconnect before hibernating

  • reconnect_delay

    non_neg_integer()

    Default value: 15000
    Delay (in ms) between successive reconnect attempts

  • keep_alive_interval

    non_neg_integer()

    Default value: 15000
    Interval (in ms) in which keep-alive RTSP messages will be sent to the remote stream source

  • pierce_nat

    boolean()

    Default value: true
    Whether to attempt to create client-side NAT binding by sending an empty datagram from client to source, after the completion of RTSP setup

pads

Pads

output

:output

Accepted formats:

Membrane.RTP
Direction::output
Availability::on_request
Mode::pull
Demand unit::buffers

Link to this section Summary

Types

t()

Struct containing options for Membrane.RTC.Engine.Endpoint.RTSP

Functions

Returns description of options available for this module

Request that a given RTSP Endpoint attempts a reconnect to the remote stream source.

Link to this section Types

@type t() :: %Membrane.RTC.Engine.Endpoint.RTSP{
  keep_alive_interval: non_neg_integer(),
  max_reconnect_attempts: non_neg_integer() | :infinity,
  pierce_nat: boolean(),
  reconnect_delay: non_neg_integer(),
  rtc_engine: pid(),
  rtp_port: 1..65535,
  source_uri: URI.t()
}

Struct containing options for Membrane.RTC.Engine.Endpoint.RTSP

Link to this section Functions

@spec options() :: keyword()

Returns description of options available for this module

Link to this function

request_reconnect(rtc_engine, endpoint_id)

View Source
@spec request_reconnect(rtc_engine :: pid(), endpoint_id :: String.t()) :: :ok

Request that a given RTSP Endpoint attempts a reconnect to the remote stream source.