Membrane.VKVideo.Encoder (Membrane vk video plugin v0.2.2)

Copy Markdown View Source

H.264 encoder taking advantage of hardware acceleration provided by Vulkan video extensions.

Element options

Passed via struct Membrane.VKVideo.Encoder.t/0

  • tune

    :low_latency | :high_quality

    Default value: :low_latency
    Specifies whether the encoder should be optimized for minimal latency (which is important in case of livestreams) or for higher quality (applicable to offline encoding).

  • approx_framerate

    {non_neg_integer(), pos_integer()} | nil

    Default value: nil
    Framerate of the stream expressed in number of frames per second. It's only used by the rate control mechanism and therefore it does not need to be an exact value. If nil, the framerate will be read from the stream format's structure or set to fixed value of 30 frames per second if framerate is not provided by the stream format.

  • rate_control

    :encoder_default
    | :disabled
    | {:variable_bitrate, __MODULE__.VariableBitrate.t()}
    | {:constant_bitrate, __MODULE__.ConstantBitrate.t()}

    Default value: :encoder_default
    Specifies which rate control mechanism should by used by the encoder.

Pads

:input

Accepted formats:

%Membrane.RawVideo{pixel_format: :NV12}
Direction::input
Availability::always
Flow control::auto

:output

Accepted formats:

%Membrane.H264{stream_structure: :annexb, alignment: :au}
Direction::output
Availability::always
Flow control::auto

Summary

Types

t()

Struct containing options for Membrane.VKVideo.Encoder

Functions

Returns description of options available for this module

Types

t()

@type t() :: %Membrane.VKVideo.Encoder{
  approx_framerate: {non_neg_integer(), pos_integer()} | nil,
  rate_control:
    :encoder_default
    | :disabled
    | {:variable_bitrate, Membrane.VKVideo.Encoder.VariableBitrate.t()}
    | {:constant_bitrate, Membrane.VKVideo.Encoder.ConstantBitrate.t()},
  tune: :low_latency | :high_quality
}

Struct containing options for Membrane.VKVideo.Encoder

Functions

options()

@spec options() :: keyword()

Returns description of options available for this module