Membrane.ERTMP.Sink (Membrane ERTMP Plugin v0.1.0)

View Source

Membrane sink that publishes an audio/video stream to an RTMP(S) server using Enhanced RTMP (E-RTMP), backed by the Rust rtmp crate from software-mansion/smelter.

Pads

Both :audio and :video pads are dynamic (:on_request) so that the element can later accept multiple video renditions for IVS multitrack once the underlying crate gains multitrack support. For a single-rendition stream connect exactly one :video pad and one :audio pad:

child(:sink, %Membrane.ERTMP.Sink{host: "rtmp.example.com", ...})
|> via_in(Pad.ref(:video, :main))
...
|> via_in(Pad.ref(:audio, :main))
...

Element options

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

  • host

    String.t()

    Required
    RTMP server hostname or IP address

  • port

    1..65535

    Default value: 1935
    RTMP server port

  • app

    String.t()

    Required
    RTMP application name (e.g. "live")

  • stream_key

    String.t()

    Required
    RTMP stream key or full stream URL path

  • use_tls

    boolean()

    Default value: false
    Use TLS (RTMPS, port 443 by default)

Pads

:audio

Accepted formats:

%AAC{encapsulation: :none}
%Opus{}
Direction::input
Availability::on_request
Flow control::auto

:video

Accepted formats:

%H264{alignment: :au, stream_structure: {avc, _dcr}} when avc in [:avc1, :avc3]
%VP8{}
%VP9{}
Direction::input
Availability::on_request
Flow control::auto

Summary

Types

t()

Struct containing options for Membrane.ERTMP.Sink

Functions

Returns description of options available for this module

Types

t()

@type t() :: %Membrane.ERTMP.Sink{
  app: String.t(),
  host: String.t(),
  port: 1..65535,
  stream_key: String.t(),
  use_tls: boolean()
}

Struct containing options for Membrane.ERTMP.Sink

Functions

options()

@spec options() :: keyword()

Returns description of options available for this module