The fastest and safest AV1 encoder.
Clone or download
ycho Early termination for bottomup partition search (i.e. speed 0 only) (#…

This works for speed 0 (i.e. bottomup partition search) only.

Almost no change in bdrate with more than x2 faster for large QIndex 252
with no change in its bitstream size.
Latest commit 3a261f3 Jan 16, 2019

The fastest and safest AV1 encoder.

Build Status Coverage Status


rav1e is an experimental AV1 video encoder. It is designed to eventually cover all use cases, though in its current form it is most suitable for cases where libaom (the reference encoder) is too slow.


  • Intra and inter frames
  • 64x64 superblocks
  • 4x4 to 64x64 RDO-selected square blocks
  • DC, H, V, Paeth, and smooth prediction modes
  • DCT, ADST and identity transforms (up to 64x64, 16x16 and 32x32 respectively)
  • 8-, 10- and 12-bit depth color
  • Variable speed settings
  • Near real-time encoding at high speed levels

Windows builds

Automated AppVeyor builds can be found here. Click on a build (it is recommended you select a build based on "master"), then click ARTIFACTS to reveal the rav1e.exe download link.


rav1e can optionally use a local copy of libaom to run some extended tests and some x86_64-specific optimizations require a recent version of NASM.

Internal libaom setup

This repository uses a git submodule. To initialize it, run:

git submodule update --init

This is also required every time you switch branches or pull a submodule change.

In order to build, test and link to the codec on UNIX, you need Perl, NASM, CMake, Clang and pkg-config. To install this on Ubuntu or Linux Mint, run:

sudo apt install perl nasm cmake clang pkg-config

On Windows, pkg-config is not required. A Perl distribution such as Strawberry Perl, CMake, and a NASM binary in your system PATH are required.

Compressing video

Input videos must be in y4m format and have 4:2:0 chroma subsampling.

cargo run --release --bin rav1e -- input.y4m -o output.ivf

Decompressing video

Encoder output should be compatible with any AV1 decoder compliant with the v1.0.0 specification. You can also build the included compatible aomdec using the following:

mkdir aom_test
cd aom_test
make -j8
./aomdec ../output.ivf -o output.y4m

Using the AOMAnalyzer

Local Analyzer

  1. Download the AOM Analyzer.
  2. Download inspect.js and inspect.wasm and save them in the same directory.
  3. Run the analyzer: AOMAnalyzer path_to_inspect.js output.ivf

Online Analyzer

If your .ivf file is hosted somewhere (and CORS is enabled on your web server) you can use:


  • src/ - High-level functions that write symbols to the bitstream, and maintain context.
  • src/ - Low-level implementation of the entropy coder, which directly writes the bitstream.
  • src/ - The top level library, contains code to write headers, manage buffers, and iterate throught each superblock.
  • src/ - Functions and enums to manage partitions (subdivisions of a superblock).
  • src/ - Intra prediction implementations.
  • src/ - Quantization and dequantization functions for coefficients.
  • src/ - RDO-related structures and distortion computation functions.
  • src/transform/*.rs - Implementations of DCT and ADST transforms.
  • src/ - Misc utility code.
  • src/bin/ - rav1e command line tool.
  • src/bin/ - Command line tool for debugging.
  • aom_build/ - Local submodule of libaom. Some C functions and constants are used directly. Also used for benchmarking and testing.


Coding style

Check code formatting with rustfmt before submitting a PR. rav1e currently uses the nightly version of rustfmt.

To install nightly:

rustup install nightly

To install the nightly version of rustfmt:

rustup component add rustfmt-preview --toolchain nightly


cargo +nightly fmt -- --check

You should also try clippy. Rust also uses nightly for clippy.

To install clippy:

rustup component add clippy-preview --toolchain nightly


cargo +nightly clippy


Run unit tests with:

cargo test

Run encode-decode integration tests with:

cargo test --release --features=decode_test

Run regular benchmarks with:

cargo bench

Run comparative benchmarks with:

cargo bench --features=comparative_bench

Getting in Touch

Come chat with us on the IRC channel #daala on Freenode! If you don't have IRC set up you can easily connect from your web browser.