rav1r
Library New
AV1 encoder derived from rav1e, used by vidr. Its output stays bit-exact with upstream.
- Downloads
- 56
- Dependents
- 1
- Stars
- 0
- Forks
- 0
- Contributors
- 103
- Commits
- 4,305
- Latest release
- 0.1.1 ·
About
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.
| Feature | What it adds | Default |
|---|---|---|
threading | rayon for tile and lookahead parallelism | Yes |
asm | Hand-written assembly. Needs NASM 2.15 or newer on x86_64, or a C compiler on aarch64 | No |
serialize | serde support for the config and stats types | No |
unstable | Config::with_thread_pool | No |
tracing | Profiling spans through tracing | No |
dump_lookahead_data | Lookahead debug data written to disk | No |
desync_finder | Entropy coder desync debugging | No |
check_asm | A comparison of each assembly routine with the Rust routine | No |
decode_test, decode_test_dav1d | Decode with libaom or dav1d in tests | No |
quick_test | Shorter encode-decode tests | No |
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
| Removed | Reason |
|---|---|
rav1e and rav1e-ch binaries, clap, and the other CLI dependencies | rav1r is a library |
C API (capi, cbindgen.toml) | No C caller exists |
Channel API (channel-api) and Config::with_parallel_gops | Nothing 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-rayon | Stale. Small in-tree code replaces each |
v_frame, aligned-vec, av-scenechange, av1-grain | Inlined. See the next table |
Inlined
| Source | Now in | Effect on the API |
|---|---|---|
v_frame, aligned-vec | src/frame_buffer/ | None. Frame, plane, and pixel types keep their paths |
av-scenechange | src/scenechange/, the subset the encoder calls | Scene 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-grain | src/api/config/grain.rs, the film grain types | generate_photon_noise_params, parse_grain_table, write_grain_table, DiffGenerator, and the TransferFunction conversion methods are gone from the prelude |
Changed
versionmodule:version::hashis gone.version::longandversion::fullreturn the crate version.- Enums that derived
ArgEnum: they keepFromStr,Display, andvariants().variants()returns a slice.descriptions()is gone. asm: off by default.threading: with it off,rayonis 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
PATENTSin 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.
Compatibility
- 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.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
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 |
|
containr New
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 |
|
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 daysdormancy: last activity 2026-11-06, 3 days ago, E = 365: activenew: 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
- Description: written for the catalogue
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 0 | crates.io database dump | Yes | |
| New dependents (365 days) | 0 | crates.io database dump | Yes | |
| Peak active dependents | 0 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 3 days ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-11-06 | GitHub repository | Yes | |
| Latest release | 2026-11-06 | crates.io database dump | Yes | |
| First release | 2026-11-05 | crates.io database dump | Yes | |
| Latest version | 0.1.1 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 0 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 0 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution2 releases, 56 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 2 | crates.io database dump | Yes | |
| Downloads over 30 days | 56 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository0 stars, 0 forks, 103 contributors, 4,305 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 0 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 0 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 103 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 4305 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | BSD-2-Clause | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: aom-sys (feature decode_test), libdav1d-sys (feature decode_test_dav1d). Build uses a native toolchain: cc (feature asm) | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 1 | crates.io database dump | No |
Corrections and review history
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.