Membrane.HLS.SinkBin (Membrane HLS Plugin v1.1.3)
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
packagerpid()Required
PID of aHLS.Packager.target_segment_durationMembrane.Time.t()Required
Target duration for each HLS segment.mode{:live, Membrane.Time.t()} | :vodDefault 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_endboolean()Default value:
true
Automatically flush the packager when all streams ended. Set tofalseif flushing manually (via:flushnotification).
Pads
:input
Accepted formats:
Membrane.H264Membrane.AACMembrane.TextMembrane.RemoteStream| Direction: | :input |
| Availability: | :on_request |
Pad options:
container:CMAF | :TS | :PACKED_AACDefault value:
:CMAF
How A/V tracks are packaged.encoding:AAC | :H264 | :TEXTRequired
Encoding type determining which parser will be used for the given stream.omit_subtitle_repetitionboolean()Default value:
false
When writing subtitle playlists, subtitles that span over multiple segments are repeated in both segments. When this flag is turned on, subtitles appear only in the segment in which they start.build_stream(track() -> HLS.VariantStream.t() | HLS.AlternativeRendition.t())Required
Build either aHLS.VariantStreamor aHLS.AlternativeRendition.segment_durationMembrane.Time.t()Required
Duration for a HLS segment.
Summary
Types
@type input_pad_opts() :: [ container: :CMAF | :TS | :PACKED_AAC, encoding: :AAC | :H264 | :TEXT, omit_subtitle_repetition: boolean(), 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