View Source Membrane.MP4.Muxer.CMAF (Membrane MP4 plugin v0.17.0)

Puts payloaded stream into Common Media Application Format, an MP4-based container commonly used in adaptive streaming over HTTP.

Multiple input streams are supported. If that is the case, they will be muxed into a single CMAF Track. Given that all input streams need to have a keyframe at the beginning of each CMAF Segment, it is recommended that all input streams are renditions of the same content.

The muxer also supports creation of partial segments that do not begin with a key frame when the partial_segment_duration_range is specified. The muxer tries to create many partial segments to match the regular segment target duration. When reaching the regular segment's target duration the muxer tries to perform lookaheads of the samples to either create a shorter/longer partial segment so that a new segment can be started (beginning with a keyframe).

If a stream contains non-key frames (like H264 P or B frames), they should be marked with a mp4_payload: %{key_frame?: false} metadata entry.

element-options

Element options

Passed via struct Membrane.MP4.Muxer.CMAF.t/0

  • segment_duration_range

    SegmentDurationRange.t()

    Default value: %Membrane.MP4.Muxer.CMAF.SegmentDurationRange{min: 2000000000, target: 2000000000}

  • partial_segment_duration_range

    SegmentDurationRange.t() | nil

    Default value: nil
    The duration range of partial segments, when set to nil the muxer assumes it should not produce partial segments

pads

Pads

input

:input

Availability :on_request
Caps Membrane.MP4.Payload
Demand mode :manual
Demand unit :buffers
Direction :input
Mode :pull
Name :input

output

:output

Availability :always
Caps Membrane.CMAF.Track
Demand mode :manual
Demand unit :buffers
Direction :output
Mode :pull
Name :output

Link to this section Summary

Types

t()

Struct containing options for Membrane.MP4.Muxer.CMAF

Functions

Returns pads descriptions for Membrane.MP4.Muxer.CMAF

Returns description of options available for this module

Link to this section Types

@type t() :: %Membrane.MP4.Muxer.CMAF{
  partial_segment_duration_range:
    Membrane.MP4.Muxer.CMAF.SegmentDurationRange.t() | nil,
  segment_duration_range: Membrane.MP4.Muxer.CMAF.SegmentDurationRange.t()
}

Struct containing options for Membrane.MP4.Muxer.CMAF

Link to this section Functions

@spec membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]

Returns pads descriptions for Membrane.MP4.Muxer.CMAF

@spec options() :: keyword()

Returns description of options available for this module