View Source Membrane.VP8.Encoder (Membrane VPx plugin v0.2.0)
Element that encodes a VP8 stream.
This element can receive a Membrane.KeyframeRequestEvent
on it's :output
pad to force the
next frame to be a keyframe.
Buffers produced by this element will have the following metadata that inform whether the buffer contains a keyframe:
%{vp8: %{is_keyframe: is_keyframe :: boolean()}}
Element options
Passed via struct Membrane.VP8.Encoder.t/0
encoding_deadline
Membrane.Time.t() | :auto
Default value:
:auto
Determines how long should it take the encoder to encode a frame. The longer the encoding takes the better the quality will be. If set to 0 the encoder will take as long as it needs to produce the best frame possible. Note that this is a soft limit, there is no guarantee that the encoding process will never exceed it. If set to:auto
the deadline will be calculated based on the framerate provided by incoming stream format. If the framerate isnil
a fixed deadline of 10ms will be set.rc_target_bitrate
pos_integer() | :auto
Default value:
:auto
Gives the encoder information about the target bitrate (in kb/s). If set to:auto
the target bitrate will be calculated automatically based on the resolution and framerate of the incoming stream. Some reference recommended bitrates can be also found hereg_lag_in_frames
non_neg_integer()
Default value:
5
The number of input frames the encoder is allowed to consume before producing output frames. This allows the encoder to base decisions for the current frame on future frames. This does increase the latency of the encoding pipeline, so it is not appropriate in all situations (ex: realtime encoding).Note that this is a maximum value -- the encoder may produce frames sooner than the given limit. If set to 0 this feature will be disabled.
Pads
:input
Accepted formats:
Membrane.RawVideo
Direction: | :input |
Availability: | :always |
Flow control: | :auto |
:output
Accepted formats:
VP8
Direction: | :output |
Availability: | :always |
Flow control: | :auto |
Summary
Types
Struct containing options for Membrane.VP8.Encoder
Types
@type t() :: %Membrane.VP8.Encoder{ encoding_deadline: Membrane.Time.t() | :auto, g_lag_in_frames: non_neg_integer(), rc_target_bitrate: pos_integer() | :auto }
Struct containing options for Membrane.VP8.Encoder
Functions
@spec options() :: keyword()
Returns description of options available for this module