Membrane.G711.FFmpeg.Encoder (Membrane G711 FFmpeg Plugin v0.1.4)

View Source

Membrane element that encodes raw audio frames to G711 format (A-law and μ-law are supported). It is backed by encoder from FFmpeg.

The element expects that each received buffer has whole samples, so the parser (Membrane.Element.RawAudio.Parser) may be required in a pipeline before the encoder. The amount of samples in a buffer may vary.

Additionally, the encoder has to receive proper stream_format (see accepted format on input pad) before any encoding takes place.

Element options

Passed via struct Membrane.G711.FFmpeg.Encoder.t/0

  • encoding

    :PCMA | :PCMU

    Default value: :PCMA
    G.711 encoding to use (A-law or μ-law)

Pads

:input

Accepted formats:

%RawAudio{channels: G711.num_channels(), sample_rate: G711.sample_rate(), sample_format: :s16le}
Direction::input
Availability::always
Flow control::auto

:output

Accepted formats:

%G711{encoding: encoding} when encoding in [:PCMA, :PCMU]
Direction::output
Availability::always
Flow control::auto

Summary

Types

t()

Struct containing options for Membrane.G711.FFmpeg.Encoder

Functions

Returns description of options available for this module

Types

t()

@type t() :: %Membrane.G711.FFmpeg.Encoder{encoding: :PCMA | :PCMU}

Struct containing options for Membrane.G711.FFmpeg.Encoder

Functions

options()

@spec options() :: keyword()

Returns description of options available for this module