View Source Membrane.RTC.Engine.Endpoint.HLS (Membrane RTC Engine v0.14.0)
An Endpoint responsible for converting incoming tracks to HLS playlist.
This module requires the following plugins to be present in your mix.exs
for H264 & OPUS input:
[
:membrane_h264_ffmpeg_plugin,
:membrane_h264_plugin,
:membrane_http_adaptive_stream_plugin,
:membrane_opus_plugin,
:membrane_aac_plugin,
:membrane_aac_fdk_plugin
]
It can perform mixing audio and composing video (see Membrane.RTC.Engine.Endpoint.HLS.MixerConfig
),
in such case these plugins are also needed:
[
:membrane_video_compositor_plugin,
:membrane_audio_mix_plugin,
:membrane_generator_plugin,
:membrane_realtimer_plugin.
:membrane_audio_filler_plugin
]
bin-options
Bin options
Passed via struct Membrane.RTC.Engine.Endpoint.HLS.t/0
rtc_engine
pid()
Required
Pid of parent Engineowner
pid()
Required
Pid of parent all notifications will be send to. These notifications are:{:playlist_playable, content_type}
{:cleanup, clean_function}
output_directory
Path.t()
Default value:
"hls_output"
Path to directory under which HLS output will be savedsynchronize_tracks?
boolean()
Default value:
true
Set to false if source is different than webrtc. If set to true HLS Endpoint will calculate track offset based onhandle_pad_added
call.mixer_config
MixerConfig.t() | nil
Default value:
nil
Audio and video mixer configuration. If you don't want to use compositor pass nil.hls_config
HLSConfig.t()
Default value:
%Membrane.RTC.Engine.Endpoint.HLS.HLSConfig{manifest_name: "index", manifest_module: Membrane.HTTPAdaptiveStream.HLS, storage: &Membrane.RTC.Engine.Endpoint.HLS.HLSConfig.default_storage/1, target_window_duration: 40000000000, persist?: false, mode: :live, hls_mode: :separate_av, header_naming_fun: &Membrane.HTTPAdaptiveStream.Manifest.Track.default_header_naming_fun/2, segment_naming_fun: &Membrane.HTTPAdaptiveStream.Manifest.Track.default_segment_naming_fun/1, segment_duration: 5000000000, partial_segment_duration: nil}
HLS stream and playlist configuration.
pads
Pads
input
:input
Accepted formats:
_any
Direction: | :input |
Availability: | :on_request |
Mode: | :pull |
Demand unit: | :buffers |
Link to this section Summary
Types
Struct containing options for Membrane.RTC.Engine.Endpoint.HLS
Link to this section Types
@type t() :: %Membrane.RTC.Engine.Endpoint.HLS{ hls_config: Membrane.RTC.Engine.Endpoint.HLS.HLSConfig.t(), mixer_config: Membrane.RTC.Engine.Endpoint.HLS.MixerConfig.t() | nil, output_directory: Path.t(), owner: pid(), rtc_engine: pid(), synchronize_tracks?: boolean() }
Struct containing options for Membrane.RTC.Engine.Endpoint.HLS
Link to this section Functions
@spec options() :: keyword()
Returns description of options available for this module