View Source Membrane.HTTPAdaptiveStream.SinkBin (Membrane HTTP Adaptive Stream plugin v0.7.0)
Bin responsible for receiving audio and video streams, performing payloading and CMAF muxing to eventually store them using provided storage configuration.
input-streams
Input streams
Parsed H264 or AAC video or audio streams are expected to be connected via the :input pad.
The type of stream has to be specified via the pad's :encoding option.
output
Output
Specify one of Membrane.HTTPAdaptiveStream.Storages as :storage to configure the sink.
bin-options
Bin options
Passed via struct Membrane.HTTPAdaptiveStream.SinkBin.t/0
muxer_segment_durationpos_integerDefault value:
2000000000manifest_nameString.t()Default value:
"index"
Name of the main manifest filemanifest_modulemoduleRequired
Implementation of theMembrane.HTTPAdaptiveStream.Manifestbehaviour.storageStorage.config_t()Required
Storage configuration. May be one ofMembrane.HTTPAdaptiveStream.Storages.*. SeeMembrane.HTTPAdaptiveStream.Storagebehaviour.target_window_durationpos_integer | :infinityDefault value:
40000000000
Manifest duration is kept above that time, while the oldest segments are removed whenever possible.persist?booleanDefault value:
false
If true, stale segments are removed from the manifest only. Once playback finishes, they are put back into the manifest.target_segment_durationpos_integerDefault value:
0
Expected length of each segment. Setting it is not necessary, but may help players achieve better UX.hls_mode:muxed_av | :separate_avDefault value:
:separate_av
Option defining how the incoming tracks will be handled and how CMAF will be muxed.- In
:muxed_avaudio will be added to each video rendition, creating CMAF segments that contain both audio and video. - In
:separate_avaudio and video tracks will be separate and synchronization will need to be sorted out by the player.
- In
pads
Pads
input
:input
| Availability | :on_request |
| Caps | Membrane.H264,Membrane.AAC |
| Demand unit | :buffers |
| Direction | :input |
| Mode | :pull |
| Name | :input |
Options:
encoding:H264 | :AACRequired
Encoding type determining which payloader will be used for the given stream.track_nameString.t() | nilDefault value:
nil
Name that will be used to name the media playlist for the given track, as well as its header and segments files. It must not contain any URI reserved characters
Link to this section Summary
Functions
Returns pads descriptions for Membrane.HTTPAdaptiveStream.SinkBin
Returns description of options available for this module
Link to this section Types
@type input_pad_opts_t() :: [encoding: :H264 | :AAC, track_name: String.t() | nil]
Options for pad :input
@type t() :: %Membrane.HTTPAdaptiveStream.SinkBin{ hls_mode: :muxed_av | :separate_av, manifest_module: module(), manifest_name: String.t(), muxer_segment_duration: pos_integer(), persist?: boolean(), storage: Membrane.HTTPAdaptiveStream.Storage.config_t(), target_segment_duration: pos_integer(), target_window_duration: pos_integer() | :infinity }
Struct containing options for Membrane.HTTPAdaptiveStream.SinkBin
Link to this section Functions
@spec membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]
Returns pads descriptions for Membrane.HTTPAdaptiveStream.SinkBin
@spec options() :: keyword()
Returns description of options available for this module