rav1r

Library New

AV1 encoder derived from rav1e, used by vidr. Its output stays bit-exact with upstream.

Checked · Sources

Downloads
56
Dependents
1
Stars
0
Forks
0
Contributors
103
Commits
4,305
Latest release
0.1.1 ·

About

From the project README ·

AV1 encoder in Rust, derived from rav1e.

rav1r keeps the rav1e encoder library and drops the command-line tools, the C API, and the stale dependencies. The default build is pure Rust.

Status · Usage · Features · What differs · Origin · Contributing · License

rav1r is an AV1 video encoder library for Rust, derived from rav1e. The default build is pure Rust, and no Python is needed. rav1r is the AV1 encoder of the ml-rust media stack. vidr calls it as a library. Frames go in through Context::send_frame and AV1 packets come out of Context::receive_packet. Muxing lives in containr.

For the same input and config, rav1r encodes the same bytes as upstream rav1e. A test gate checks this on a fixed matrix of clips. The gate runs locally and not in CI. asm is off by default.

Status

In development. Version 0.1.0 is on crates.io, and vidr depends on it.

Minimum Rust version: 1.85.

Not supported yet
  • A command-line encoder. rav1r is a library.
  • A C API.
  • IVF and Y4M reading and writing. Use containr for containers.
  • AV1 decode.
  • wasm builds.

Usage

Add the crate with cargo add rav1r, or rav1r = "0.1" in Cargo.toml.

This example shows the API. It encodes one blank frame:

Read the full README
use rav1r::prelude::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let cfg = Config::default();
    let mut ctx: Context<u8> = cfg.new_context()?;
    ctx.send_frame(ctx.new_frame())?;
    ctx.flush();
    loop {
        match ctx.receive_packet() {
            Ok(packet) => println!("packet of {} bytes", packet.data.len()),
            Err(EncoderStatus::Encoded) => {}
            Err(EncoderStatus::LimitReached) => break,
            Err(err) => return Err(err.into()),
        }
    }
    Ok(())
}

examples/simple_encoding.rs shows a longer run. doc/ holds the upstream design notes.

Features

The default build needs only a Rust toolchain.

FeatureWhat it addsDefault
threadingrayon for tile and lookahead parallelismYes
asmHand-written assembly. Needs NASM 2.15 or newer on x86_64, or a C compiler on aarch64No
serializeserde support for the config and stats typesNo
unstableConfig::with_thread_poolNo
tracingProfiling spans through tracingNo
dump_lookahead_dataLookahead debug data written to diskNo
desync_finderEntropy coder desync debuggingNo
check_asmA comparison of each assembly routine with the Rust routineNo
decode_test, decode_test_dav1dDecode with libaom or dav1d in testsNo
quick_testShorter encode-decode testsNo

asm links the objects under src/x86 and src/arm. Their headers name VideoLAN, the dav1d authors, Two Orioles, and Martin Storsjo, among others, and they stay in place.

What differs from rav1e

Removed
RemovedReason
rav1e and rav1e-ch binaries, clap, and the other CLI dependenciesrav1r is a library
C API (capi, cbindgen.toml)No C caller exists
Channel API (channel-api) and Config::with_parallel_gopsNothing uses it
Fuzz targets, benches, tools/, cross/Each pulls in dependencies or toolchains
IVF and Y4M code (ivf/, y4m)Containers belong to containr
wasm support (wasm feature, wasm-bindgen)vidr does not target wasm
built, simd_helpers, noop_proc_macro, arg_enum_proc_macro, maybe-rayonStale. Small in-tree code replaces each
v_frame, aligned-vec, av-scenechange, av1-grainInlined. See the next table
Inlined
SourceNow inEffect on the API
v_frame, aligned-vecsrc/frame_buffer/None. Frame, plane, and pixel types keep their paths
av-scenechangesrc/scenechange/, the subset the encoder callsScene detection uses rav1r's own SATD. Its SAD for fast detection is Rust only. RAV1E_CPU_TARGET applies, and CPU_TARGET does not. Output is unchanged
av1-grainsrc/api/config/grain.rs, the film grain typesgenerate_photon_noise_params, parse_grain_table, write_grain_table, DiffGenerator, and the TransferFunction conversion methods are gone from the prelude
Changed
  • version module: version::hash is gone. version::long and version::full return the crate version.
  • Enums that derived ArgEnum: they keep FromStr, Display, and variants(). variants() returns a slice. descriptions() is gone.
  • asm: off by default.
  • threading: with it off, rayon is absent and the encoder runs on the calling thread.
Kept

12-bit, 4:2:2, and 4:4:4 stay in the encoder, because they keep merges from upstream small.

Origin

rav1r derives from rav1e at commit 31435de9d76fddd38f6dcc31d4014574cebb2092 of its master branch. NOTICE holds the attribution.

The published rav1e 0.8.1 fails cargo deny, and vidr's deny.toml denies git sources. So vidr cannot depend on upstream. rav1r is a separate crate that vidr depends on.

Contributing

Contributions are welcome. See CONTRIBUTING.md for conventions, checks, and merging from upstream.

Questions and design discussion happen on Discord.

License and patents

rav1r is licensed under the BSD 2-Clause License in LICENSE. PATENTS holds the Alliance for Open Media Patent License 1.0.

The patent license sets conditions on every distribution:

  • A source distribution carries PATENTS in its root directory.
  • A binary distribution reproduces the AOM Patent License 1.0 in its documentation, legal notices, or other written materials. It reproduces the BSD license text there too.
  • Section 1.3 of PATENTS ends the patent license for a licensee that sues over an Implementation, with two stated exceptions.

Original rav1e copyright notices stay in every file.

Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
Optional
  • Binds native code: aom-sys (feature decode_test), libdav1d-sys (feature decode_test_dav1d)
  • Build uses a native toolchain: cc (feature asm)
Python bindings
No Python binding crate found
License
BSD-2-Clause

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days.

rav1r beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
rav1r This page New

AV1 encoder derived from rav1e, used by vidr. Its output stays bit-exact with upstream.

56 downloads over 30 days 1 0 0.1.1 GPU support unknown Binds native code: aom-sys (feature decode_test), libdav1d-sys (feature decode_test_dav1d). Build uses a native toolchain: cc (feature asm) BSD-2-Clause

Media containers for vidr and voxr: reads and writes MP4, MOV, Matroska and WebM, with integer timestamps and raw edit lists.

206 downloads over 30 days 2 0 0.1.1 GPU support unknown No native code found Apache-2.0
vidr App New

GPU video library on numr and boostr: NVDEC, NVENC and Vulkan Video for H.264, HEVC, AV1 and VP9, CPU decoders, MP4 and MKV through containr, frames as GPU tensors, and vidr-remaster for restoration and upscaling, run on real clips.

30 downloads over 30 days Not applicable 0 0.1.1 CUDA, WebGPU, Vulkan Binds native code: dav1d-sys (feature dav1d) Apache-2.0
Why NewIts first release on 5 Nov 2026 is under 180 days old.

The check tests the Featured gates once the first release passes this age limit.

What else the check found

  • The last activity is on 6 Nov 2026, 3 days ago. The rules expect an update within 365 days. Dormancy rule

Check notes

  • the latest release was packaged from a dirty working tree

Exact rules: New. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 0.1.1 base 300, capped at 2 releases = 100, raised to the 365-day floor: E = 365 days
  • dormancy: last activity 2026-11-06, 3 days ago, E = 365: active
  • new: new: first release 2026-11-05 is under 180 days old

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents0crates.io database dumpYes
New dependents (365 days)0crates.io database dumpYes
Peak active dependents0crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 3 days ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-11-06GitHub repositoryYes
Latest release2026-11-06crates.io database dumpYes
First release2026-11-05crates.io database dumpYes
Latest version0.1.1crates.io database dumpYes
Days the oldest outside issue waits for a reply0GitHub repositoryYes
Maintainer replies over 365 days0GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution2 releases, 56 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases2crates.io database dumpYes
Downloads over 30 days56crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository0 stars, 0 forks, 103 contributors, 4,305 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars0GitHub repositoryYes — one part of the repository route
GitHub forks0GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account103GitHub contributorsYes — one part of the repository route
Commits on the default branch4305GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseBSD-2-Clausecrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: aom-sys (feature decode_test), libdav1d-sys (feature decode_test_dav1d). Build uses a native toolchain: cc (feature asm)crates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly1crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.