View Source Membrane.RTSP.Source (Membrane RTSP plugin v0.2.0)

Source bin responsible for connecting to an RTSP server.

This element connects to an RTSP server, depayload and parses the received media if possible. If there's no suitable depayloader and parser, the raw payload is sent to the subsequent elements in the pipeline.

In case connection can't be established or is severed during streaming this bin will crash.

The following codecs are depayloaded and parsed:

  • H264
  • H265

Notifications

  • {:new_track, ssrc, track} - sent when the track is parsed and available for consumption by the next elements. An output pad Pad.ref(:output, ssrc) should be linked to receive the data.

Bin options

Passed via struct Membrane.RTSP.Source.t/0

  • stream_uri

    binary()

    Required
    The RTSP URI of the resource to stream.

  • allowed_media_types

    [:video | :audio | :application]

    Default value: [:video, :audio, :application]
    The media type to accept from the RTSP server.

  • transport

    transport()

    Default value: :tcp
    Transport protocol that will be used in the established RTSP stream. In case of UDP a range needs to be provided from which receiving ports will be chosen.

  • timeout

    Time.t()

    Default value: 15000000000
    RTSP response timeout

  • keep_alive_interval

    Time.t()

    Default value: 15000000000
    Interval of a heartbeat sent to the RTSP server at a regular interval to keep the session alive.

Pads

:output

Accepted formats:

_any
Direction::output
Availability::on_request

Summary

Types

t()

Struct containing options for Membrane.RTSP.Source

Functions

Returns description of options available for this module

Types

@type t() :: %Membrane.RTSP.Source{
  allowed_media_types: [:video | :audio | :application],
  keep_alive_interval: Membrane.Time.t(),
  stream_uri: binary(),
  timeout: Membrane.Time.t(),
  transport: transport()
}

Struct containing options for Membrane.RTSP.Source

@type transport() ::
  {:udp, port_range_start :: non_neg_integer(),
   port_range_end :: non_neg_integer()}
  | :tcp

Functions

@spec options() :: keyword()

Returns description of options available for this module