View Source Membrane.AAC.Parser (Membrane AAC plugin v0.19.0)

Parser for Advanced Audio Codec.

Supports both plain and ADTS-encapsulated output (configured by out_encapsulation). Input with encapsulation :none is supported, but correct AAC stream format needs to be supplied with the stream.

If PTS is absent, it calculates and puts one based on the sample rate.

Element options

Passed via struct Membrane.AAC.Parser.t/0

  • samples_per_frame

    AAC.samples_per_frame()

    Default value: 1024
    Count of audio samples in each AAC frame

  • out_encapsulation

    AAC.encapsulation()

    Default value: :ADTS
    Determines whether output AAC frames should be prefixed with ADTS headers

  • audio_specific_config

    binary() | nil

    Default value: nil
    Decoder configuration data AudioSpecificConfig(), as defined in ISO/IEC 14496-3 - if received via side channel it should be provided via this option.

  • output_config

    :audio_specific_config
    | :esds
    | {:esds, avg_bit_rate :: non_neg_integer(), max_bit_rate :: non_neg_integer()}
    | nil

    Default value: nil
    Determines which config spec will be generated and included in output stream format as config:

    • esds - the field will be an esds MP4 atom. avg_bit_rate and max_bit_rate can be additionally provided and will be included in the esds. If not provided they will be set to 0.
    • audio_specific_config - the field will be a decoder configuration data AudioSpecificConfig(), as defined in ISO/IEC 14496-3.

Pads

:input

Accepted formats:

AAC
Membrane.RemoteStream
Direction::input
Availability::always
Flow control::manual
Demand unit::buffers

:output

Accepted formats:

AAC
Direction::output
Availability::always
Flow control::manual
Demand unit:nil

Summary

Types

t()

Struct containing options for Membrane.AAC.Parser

Functions

Returns description of options available for this module

Types

@type t() :: %Membrane.AAC.Parser{
  audio_specific_config: binary() | nil,
  out_encapsulation: Membrane.AAC.encapsulation(),
  output_config:
    :audio_specific_config
    | :esds
    | {:esds, avg_bit_rate :: non_neg_integer(),
       max_bit_rate :: non_neg_integer()}
    | nil,
  samples_per_frame: Membrane.AAC.samples_per_frame()
}

Struct containing options for Membrane.AAC.Parser

@type timestamp() :: Ratio.t() | Membrane.Time.t()

Functions

@spec options() :: keyword()

Returns description of options available for this module