Membrane.HLS.SinkBin (Membrane HLS Plugin v1.0.0)

View Source

Bin responsible for receiving audio and video streams, performing payloading and CMAF muxing to eventually store them using provided storage configuration.

Bin options

Passed via struct Membrane.HLS.SinkBin.t/0

  • packager

    pid()

    Required
    PID of a HLS.Packager.

  • target_segment_duration

    Membrane.Time.t()

    Required
    Target duration for each HLS segment.

  • mode

    {:live, Membrane.Time.t()} | :vod

    Default value: :vod

    • -> This element will include the provided segments in the media playlist each target_segment_duration.
    • :vod -> At the end of the segment production, playlists are written down.
  • flush_on_end

    boolean()

    Default value: true
    Automatically flush the packager when all streams ended. Set to false if flushing manually (via :flush notification).

Pads

:input

Accepted formats:

Membrane.H264
Membrane.AAC
Membrane.Text
Direction::input
Availability::on_request

Pad options:

  • encoding

    :AAC | :H264 | :TEXT

    Required
    Encoding type determining which parser will be used for the given stream.

  • build_stream

    (Membrane.CMAF.Track.t() -> HLS.VariantStream.t() | HLS.AlternativeRendition.t())

    Required
    Build either a HLS.VariantStream or a HLS.AlternativeRendition.

  • segment_duration

    Membrane.Time.t()

    Required
    Duration for a HLS segment.

Summary

Types

Options for pad :input

t()

Struct containing options for Membrane.HLS.SinkBin

Functions

Returns description of options available for this module

Types

input_pad_opts()

@type input_pad_opts() :: [
  encoding: :AAC | :H264 | :TEXT,
  build_stream: (Membrane.CMAF.Track.t() ->
                   HLS.VariantStream.t() | HLS.AlternativeRendition.t()),
  segment_duration: Membrane.Time.t()
]

Options for pad :input

t()

@type t() :: %Membrane.HLS.SinkBin{
  flush_on_end: boolean(),
  mode: {:live, Membrane.Time.t()} | :vod,
  packager: pid(),
  target_segment_duration: Membrane.Time.t()
}

Struct containing options for Membrane.HLS.SinkBin

Functions

options()

@spec options() :: keyword()

Returns description of options available for this module