View Source Membrane.MP4.Muxer.CMAF (Membrane MP4 plugin v0.19.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.

    If set to nil, the muxer assumes it should not produce partial segments

pads

Pads

input

:input

Accepted formats:

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

output

:output

Accepted formats:

Membrane.CMAF.Track
Direction::output
Availability::always
Mode::pull
Demand mode::manual

Link to this section Summary

Types

t()

Struct containing options for Membrane.MP4.Muxer.CMAF

Functions

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 options() :: keyword()

Returns description of options available for this module