View Source Membrane.MP4.Muxer.ISOM (Membrane MP4 plugin v0.19.0)

Puts payloaded streams into an MPEG-4 container.

Due to the structure of MPEG-4 containers, the muxer has to be used along with Membrane.File.Sink or any other sink that can handle Membrane.File.SeekEvent. The event is used to fill in mdat box size after processing all incoming buffers and, if fast_start is set to true, to insert moov box at the beginning of the file.

element-options

Element options

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

  • fast_start

    boolean()

    Default value: false
    Generates a container more suitable for streaming by allowing media players to start playback as soon as they start to receive its media data.

    When set to true, the container metadata (moov atom) will be placed before media data (mdat atom). The equivalent of FFmpeg's -movflags faststart option.

  • chunk_duration

    Time.t()

    Default value: 1000000000
    Expected duration of each chunk in the resulting MP4 container.

    Once the total duration of samples received on one of the input pads exceeds that threshold, a chunk containing these samples is flushed. Interleaving chunks belonging to different tracks may have positive impact on performance of media players.

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:

%RemoteStream{type: :bytestream, content_format: MP4}
Direction::output
Availability::always
Mode::pull
Demand mode::manual

Link to this section Summary

Types

t()

Struct containing options for Membrane.MP4.Muxer.ISOM

Functions

Returns description of options available for this module

Link to this section Types

@type t() :: %Membrane.MP4.Muxer.ISOM{
  chunk_duration: Membrane.Time.t(),
  fast_start: boolean()
}

Struct containing options for Membrane.MP4.Muxer.ISOM

Link to this section Functions

@spec options() :: keyword()

Returns description of options available for this module