View Source Membrane.RTMP.Sink (Membrane RTMP plugin v0.23.3)

Membrane element being client-side of RTMP streams. It needs to receive at least one of: video stream in H264 format or audio in AAC format. Currently it supports only:

  • RTMP proper - "plain" RTMP protocol
  • RTMPS - RTMP over TLS/SSL other RTMP variants - RTMPT, RTMPE, RTMFP are not supported. Implementation based on FFmpeg.

Element options

Passed via struct Membrane.RTMP.Sink.t/0

  • rtmp_url

    String.t()

    Required
    Destination URL of the stream. It needs to start with rtmp:// or rtmps:// depending on the protocol variant. This URL should be provided by your streaming service.

  • max_attempts

    pos_integer() | :infinity

    Default value: 1
    Maximum number of connection attempts before failing with an error. The attempts will happen every 500 ms

  • tracks

    [track_type()]

    Default value: [:audio, :video]
    A list of tracks, which will be sent. Can be :audio, :video or both.

Pads

:video

Accepted formats:

%H264{stream_structure: structure} when H264.is_avc(structure)
Direction::input
Availability::on_request
Flow control::manual
Demand unit::buffers

:audio

Accepted formats:

AAC
Direction::input
Availability::on_request
Flow control::manual
Demand unit::buffers

Summary

Types

t()

Struct containing options for Membrane.RTMP.Sink

Functions

Returns description of options available for this module

Types

@type t() :: %Membrane.RTMP.Sink{
  max_attempts: pos_integer() | :infinity,
  rtmp_url: String.t(),
  tracks: [track_type()]
}

Struct containing options for Membrane.RTMP.Sink

@type track_type() :: :audio | :video

Functions

@spec options() :: keyword()

Returns description of options available for this module