Crate svt_av1_enc

Source
Expand description

Tiny safe abstraction for SVT-AV1 encoder

§Warning ⚠️

This crate must be used with SVT-AV1 2.3.0 version. SVT-AV1 library API is subject to change with new releases, so if you want to use it with different version, do it at your own risk!

§Building

For building options and requirements please follow README

§Example

use svt_av1_enc::*;

// First create config
let mut cfg = SvtAv1EncoderConfig::new(1920, 1080, Some(5));

// Set any desired properties
cfg.config.qp == 30;

// Create encoder from config
let encoder = cfg.into_encoder();

// use encoder.send_picture() to send raw YUV frames to encoder
// use encoder.get_packet() to get done packet

More comprehensive example can be found here

Modules§

ffi
Bindings for SVT-AV1-Enc v2.3.0.

Structs§

Frame
Original name is SvtIOFormat. Frame is the main format to send data (picture) to encoder. It borrows YUV data
Packet
Encoded AV1 data (packet) in borrowed form. For owned form, use to_vec
SvtAv1Encoder
SVT-AV1 Encoder. Use send_picture to send some data to encoder and get_packet to get encoded packets
SvtAv1EncoderConfig
Config for SvtAv1Enc encoder. Construct it with new function, than create encoder with into_encoder