Membrane.HLS.SinkBin (Membrane HLS Plugin v1.1.2)
View SourceBin 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 aHLS.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 tofalse
if flushing manually (via:flush
notification).
Pads
:input
Accepted formats:
Membrane.H264
Membrane.AAC
Membrane.Text
Membrane.RemoteStream
Direction: | :input |
Availability: | :on_request |
Pad options:
container
:CMAF | :TS | :PACKED_AAC
Default value:
:CMAF
How A/V tracks are packaged.encoding
:AAC | :H264 | :TEXT
Required
Encoding type determining which parser will be used for the given stream.build_stream
(track() -> HLS.VariantStream.t() | HLS.AlternativeRendition.t())
Required
Build either aHLS.VariantStream
or aHLS.AlternativeRendition
.segment_duration
Membrane.Time.t()
Required
Duration for a HLS segment.
Summary
Types
@type input_pad_opts() :: [ container: :CMAF | :TS | :PACKED_AAC, encoding: :AAC | :H264 | :TEXT, build_stream: (track() -> HLS.VariantStream.t() | HLS.AlternativeRendition.t()), segment_duration: Membrane.Time.t() ]
Options for pad :input
@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
@type track() :: Membrane.CMAF.Track.t() | map()
Functions
@spec options() :: keyword()
Returns description of options available for this module