Skip to main content

Module encoder

Module encoder 

Source
Expand description

Codec-agnostic video encoder interface.

The Encodable trait abstracts over concrete encoder backends so that consumers can encode I420 frames without depending on a particular codec or implementation. Two backends implement it today:

  • crate::vp9::Vp9Encoder — the pure-Rust VP9 encoder (always compiled, including on wasm32).
  • The legacy libvpx-backed Vp9Encoder in [libvpx], available only with the libvpx feature on native targets, used as a test oracle and as an opt-in encode backend.

Both are interchangeable behind Box<dyn Encodable>.

Structs§

EncodedFrame
A single compressed frame produced by an encoder.
EncoderConfig
Configuration for a video encoder, independent of the concrete backend.

Traits§

Encodable
A codec-agnostic video encoder.

Functions§

create_encoder
Construct an encoder for the given codec.