rav1e reads y4m, writes IVF, and turns on assembly before you ask
The fastest and safest AV1 encoder.
At a glance
- What is it?
- rav1e is Xiph's AV1 encoder written in Rust, positioned as the option for workloads where libaom is too slow. Its defaults are opinionated in ways worth knowing before a first build: assembly is enabled by default and needs NASM on x86_64, validations of the C API come through cargo-c rather than cargo, and the documented weekly pre-release cadence has published nothing newer than September 2025 while the branch keeps moving.
- Who is it for?
- rav1e fits a pipeline that already produces planar y4m and wants an AV1 encoder in Rust with one speed dial running from exhaustive to near real-time.
- Can I use it commercially?
- Yes. BSD-2-Clause is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly Assembly, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- xiph/rav1e4,167 ★ · +15
| Repository | 2026-09-23 | 2026-11-15 |
|---|---|---|
| xiph/rav1e | 4.2k | 4.2k |
15 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The published crate carries src/ and leaves out examples, fuzzers and docs
The `include` list in Cargo.toml is short: /Cargo.toml, /LICENSE, /PATENTS, /README.md, /build.rs, /cbindgen.toml and /src/**. Everything else in the repository is repository-only. The crate you pull from a registry therefore carries no `doc/`, no `examples/`, no `fuzz/` targets, no `benches/`, no `tools/` scripts, no `cross/` configuration and no test video, even though all of those directories sit at the top level. `examples/simple_encoding.rs` is the clearest case: it is the first file a new user looks for, and it does not travel with the package.
Two settings explain part of the layout. `autobenches = false` and `autobins = false` mean Cargo does not auto-discover benchmark targets or extra binaries, so each has to be declared, and `default-run = "rav1e"` names the binary a bare `cargo run` uses. The manifest says version 0.8.0, edition 2021, `rust-version` 1.85.0, and BSD-2-Clause, with a PATENTS file and a license_template.txt sitting next to the LICENSE at the root, which is the usual Xiph arrangement for code plus patent terms.
Target-specific builds claim 11 to 13 percent and then narrow where the binary runs
Two build flags decide how much of a CPU the encoder can use. The gain is put at roughly 11% to 13% when the general code is compiled with `avx2`, `bmi1`, `bmi2`, `fma`, `lzcnt` and `popcnt` available:
RUSTFLAGS="-C target-cpu=native" cargo build --release
# or
RUSTFLAGS="-C target-cpu=x86-64-v3" cargo build --releaseThe cost is stated just as plainly: the resulting binary will not run on CPUs that lack the same set of extensions, which turns a compiler flag into a deployment decision you have to make deliberately. There is a quieter failure mode as well. If the host CPU is not supported, `-C target-cpu=native` is a no-op rather than an error, so you can end up with the generic binary and no warning that the fast path was skipped. `rustc --print target-cpus` is the check the README suggests for that case. Without either flag, `cargo build --release` produces the baseline binary at `target/release/rav1e`.
Assembly is on by default, and the CI tests exactly one NASM version
The `asm` feature is in the default set and pulls in `nasm-rs` and `cc`, so the default build is not a pure Rust build. On x86_64 it requires NASM 2.14.02 or newer, and the README warns that CI tests against nasm 2.15.05, so bugs on other versions can happen and are worth an issue. `strip` is used when available to drop local symbols from the assembly objects.
Two instruction sets are always on: `SSE2` on x86_64 and `neon` on aarch64. One environment variable, `RAV1E_CPU_TARGET` set to `rust`, disables every assembly-optimised routine at runtime, which is the escape hatch for a host where the assembly is suspect. On aarch64 the assembler is `gas`, or you can set `CC=clang` and let clang assemble instead.
Installing NASM is per platform, and the Windows route is the least forgiving, since it fetches a zip, unpacks it with 7z and fixes PATH for the current session only:
$NASM_VERSION="2.15.05" # or newer
$LINK="https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
curl --ssl-no-revoke -LO "$LINK/nasm-$NASM_VERSION-win64.zip"
7z e -y "nasm-$NASM_VERSION-win64.zip" -o "C:\nasm"
# set path for the current sessions
set PATH="%PATH%;C:\nasm"Linux is `sudo apt install nasm` on Ubuntu 20.04, `sudo ln /usr/lib/nasm-mozilla/bin/nasm /usr/local/bin/` after `sudo apt install nasm-mozilla` on Ubuntu 18.04, `sudo dnf install nasm` on Fedora 31 and 32, and macOS is `brew install nasm`.
Weekly pre-releases on Tuesdays, and the three newest are from September 2025
The Releases section promises a weekly pre-release published every Tuesday, for the foreseeable future. The three most recent releases on record are p20250902 dated 2025-09-02, p20250826 dated 2025-08-26 and p20250819 dated 2025-08-19, each named Weekly pre-release. The branch itself was pushed on 2026-10-01 and the repository carries no archive flag, so commits continue while the published artefacts stop in September 2025.
Cargo.toml still reads 0.8.0, which fits a project that versions itself in the manifest and publishes dated snapshots rather than semantic releases. Nothing in the file promises a 1.0, and the release list marks no stable channel either. If you track this encoder by release date, the number worth watching is the distance between the newest pre-release and the newest commit, not the version string, and the C API consumers among you should notice that `capi` is an opt-in feature rather than part of the default set.
Input must be y4m, monochrome is refused, and decoding goes through dav1d
The interface is narrower than a general transcoder. Input video must be in y4m format and the monochrome color format is not supported, so a source has to be converted to planar YUV before rav1e ever sees it:
cargo run --release --bin rav1e -- input.y4m -o output.ivfOutput lands in an IVF container, and the compatibility target is precise: encoder output should work with any AV1 decoder compliant with the v1.0.0 specification, with dav1d named as the decoder to check it against.
dav1d -i output.ivf -o output.y4mFor a test input the README points at `tests/small_input.y4m` inside the repository and at an external collection of test sequences. Because that file sits outside the crate's `include` list, anyone installing from a registry has to fetch it from the repository instead of finding it beside the installed package.
dump_lookahead_data names eight debug artefacts the encoder can write
One cargo feature is documented by its own comment block. `dump_lookahead_data` enables debug dumping of lookahead computation results, and Cargo.toml enumerates what reaches disk: quarter-resolution luma planes as `i-qres.png`, half-resolution luma planes as `i-hres.png`, motion vectors as `i-mvs.bin`, block importances as `i-imps.bin`, spatial scales as `i-activity_scales.bin`, temporal scales as `i-distortion_scales.bin`, spatiotemporal scales as `i-spatiotemporal_scales.bin` and segmentation thresholds as `i-thresholds.bin`. It depends on `byteorder` and `image` only, so the dump is self-contained.
The remaining optional features point at where work is happening. `tracing` adds profiling with tracing-subscriber and tracing-chrome. `serialize` pulls serde, toml, `v_frame/serialize`, serde-big-array and `av1-grain/serialize`, which is what a frame-level debug serialisation format would need. `desync_finder` adds backtrace, `check_asm` and `quick_test` add no dependencies at all, `dump_ivf` reuses the `ivf` crate, and `wasm` brings wasm-bindgen. Two features link against system libraries: `decode_test` depends on `aom-sys` and `decode_test_dav1d` on `dav1d-sys`, a hint that conformance work is done against other implementations rather than against itself.
Eleven speed settings from exhaustive to near real-time, and --all-features is discouraged
The encoder core advertises intra, inter and switch frames, 64x64 superblocks, RDO-selected square and rectangular blocks from 4x4 to 64x64, DC, H, V, Paeth, smooth and every directional prediction mode, DCT, (FLIP-)ADST and identity transforms up to 64x64, 16x16 and 32x32 respectively, 8, 10 and 12-bit depth color, 4:2:0, 4:2:2 and 4:4:4 chroma sampling, constant quantizer and target bitrate modes in single- and multi-pass form, and a still picture mode. Speed is one dial with 11 settings, 0 through 10, running from exhaustive to near real-time.
Feature selection is where the caution sits. The README says optional features are enabled by passing `--features` to cargo and that `--all-features` is discouraged, which is the right instinct given a default set of `binaries`, `asm`, `threading`, `signal_support` and `git_version`. Experimental API lives behind the `unstable` feature:
cargo build --features channel-api,unstableThe Channel API arrives with crossbeam, and the README says these features and API are bound to change and evolve and should not be relied on across releases.
Editorial conclusion
rav1e fits a pipeline that already produces planar y4m and wants an AV1 encoder in Rust with one speed dial running from exhaustive to near real-time. Check three things before committing to it: whether your build host can satisfy the default `asm` feature, which means NASM on x86_64 and gas or `CC=clang` on aarch64; whether you can live with an input format limited to y4m and no monochrome support; and which artefact you intend to pin, since the published weekly pre-releases stop at p20250902 while the branch carries commits dated 2026-10-01. For a library consumer, note that the C-compatible library, header and pkg-config file are installed through cargo-c, and that the `unstable` feature is explicitly not a promise of stability across releases.
Frequently asked questions
What does AV1 stand for?
The repository never spells the name out. What it does state is that rav1e is an AV1 video encoder and that its output should be compatible with any AV1 decoder compliant with the v1.0.0 specification, with dav1d named as a decoder to test against.
Is rav1e faster than libaom?
The project positions itself as the fastest and safest AV1 encoder and says it is most suitable for cases where libaom, the reference encoder, is too slow, but no benchmark figures appear in the documentation to back either claim. A `benches/` directory and a `bench` cargo feature exist in the repository, and compilation with `-C target-cpu=native` is said to add about 11% to 13%.
What input formats does rav1e accept?
Input video must be in y4m format, and the monochrome color format is not supported. The example invocation is `cargo run --release --bin rav1e -- input.y4m -o output.ivf`, and a small test input sits at `tests/small_input.y4m` in the repository.
How do you decode rav1e output?
Output should be compatible with any AV1 decoder compliant with the v1.0.0 specification. The README suggests dav1d for checking, with `dav1d -i output.ivf -o output.y4m`, and the optional `decode_test_dav1d` feature links against `dav1d-sys` while `decode_test` links against `aom-sys`.
Can rav1e be built on aarch64?
Yes, with an assembler. The `asm` feature is enabled by default and aarch64 requires `gas`, or you can set `CC=clang` to use the clang assembler instead. `neon` is always enabled on aarch64, as `SSE2` is on x86_64, and setting the environment variable `RAV1E_CPU_TARGET` to `rust` disables all assembly-optimised routines at runtime.
Is rav1e still receiving commits?
The branch was last pushed on 2026-10-01 and the repository is not archived, while Cargo.toml carries version 0.8.0. Published releases are weekly pre-releases, and the three most recent listed are p20250819, p20250826 and p20250902, dated August and September 2025.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/xiph-rav1e)Star history chart for your README
[](https://hysenlabs.com/projects/xiph-rav1e)Was this useful?