Repository navigation
First public release.
Added
- AV1 and VP9 encoding behind one interface (
VideoEncoder): hardware encoders NVENC (Windows, Linux; AV1), VA-API (Linux; AV1, VP9), AMD AMF (Windows; AV1) and Quick Sync (Windows; AV1, VP9), software encoders SVT-AV1 and libvpx. - Software decoding of AV1 (dav1d) and VP9 (libvpx) behind
VideoDecoder. - Encoder settings: frame rates up to 120 fps, temporal layers, thread count and maximum frame size; unsupported settings are rejected when the encoder is opened.
- Detection with reasons:
detect_encodersreports for every encoder whether it works and, if not, why, together with device and driver version. - Self-test:
selftest::measure_av1checks that an encoder delivers a usable stream;DEFAULT_PASS_PERCENTis the default threshold. - Fallback:
default_order,open_best_encoder(custom order possible) andopen_software_decoder. - Build: bundled sources by default (Linux, macOS); prebuilt libraries through
LIBVPX_STATIC_DIR,SVTAV1_STATIC_DIR,DAV1D_STATIC_DIRandHWENC_SDK_DIR; system libraries throughHWCODEC_USE_SYSTEM_LIBS=1. On Windows (x86_64-pc-windows-msvc) the libraries are linked prebuilt: from crates.io they come inside the packagehwcodec-prebuilt-x86_64-pc-windows-msvc, without any download; a git checkout downloads the same files from the releasenative-libs-1of this repository and checks them against a SHA-256 fixed in the crate (HWCODEC_NO_DOWNLOAD=1forbids that download). - Colour conversion from BGRA to I420 (
convert::bgra_to_i420). - Colour conversion from I420 to RGBA:
I420Frame::to_rgba, andI420Frame::append_rgba, which writes the picture behind what a buffer already holds (for example a frame header) and so saves a picture-sized allocation and copy. The conversion handles two pixels per chroma sample and takes about a third less time than the per-pixel loop it replaces; the pixels are identical.examples/rgba_speed.rsmeasures it. - Cargo features
nvenc,amf,qsv,vaapi,svt-av1,libvpx,dav1d, all on by default. - Reduced builds: every subset of the cargo features builds, including none. A build without features has no build dependencies (no bindgen, no pkg-config) and needs no libclang, C compiler or native library on any target, which is what a phone build starts from.
TEMPORAL_LAYERS,AV1_TEMPORAL_LAYERS,Av1Options,vp9_threadsandav1_cpu_supportedexist in every build, independent of the features. Android and iOS are compile-checked without features, not tested. - Bundled vendor headers and codec sources; no FFmpeg.
- Examples and tests, including mocked-driver tests.
Known limits
- Tuned for live video (low latency) only; a quality preset is planned for 0.2.
- Decoding is software only; hardware decoding is planned for 0.2.
- macOS has software encoding and decoding only. AMF and Quick Sync exist on Windows only; on Linux, AMD and Intel graphics cards are used through VA-API.
- Tested on real hardware so far: VA-API AV1 encoding on an AMD Radeon RX 9070 XT (Linux, Mesa 26.2.5). Every other hardware path is untested; the README has the table and says how to report results.
- The prebuilt Windows libraries exist for
x86_64-pc-windows-msvconly. Other Windows targets and cross builds need the*_STATIC_DIRvariables.
Changed
- Extracted from the Mumcord
crates/screensharecrate and relicensed underMIT OR Apache-2.0. - Renamed
EncodertoVp9EncoderandDecodertoVp9Decoder.