The Wayback Machine - https://web.archive.org/web/20200529191714/https://github.com/xiph/rav1e
Skip to content
The fastest and safest AV1 encoder.
Assembly Rust Other
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update CI (#2329) May 28, 2020
.travis CI: Update libdav1d to 0.7.0-dmo1 May 22, 2020
benches Thread CDEF with tiles Apr 2, 2020
crates/vergen Use the upstream nasm-rs Jan 27, 2020
doc Update Design documentation based on rav1e 0.4.0 Apr 1, 2020
examples Make Config fully opaque May 20, 2020
fuzz Add Copyright notice headers Nov 26, 2019
ivf Added Copyright messages. Nov 5, 2019
src Split context.rs May 29, 2020
tests Don't assign cmd to intermediate variable May 29, 2020
tools draw-importances.py: use an absolute scale Dec 18, 2019
v_frame Add monochrome support May 15, 2020
.editorconfig Add max_line_length into .editorconfig Jul 13, 2019
.gitattributes Create tests for rav1e binary Mar 24, 2020
.gitignore Add extra CLI opts in AWCY script Feb 19, 2019
.gitlab-ci.yml Define allowed clippy lints in code Oct 9, 2019
.mailmap Add .mailmap Dec 6, 2018
.travis.yml Prune Travis configuration Dec 3, 2019
CONTRIBUTING.md Rename "native" CPU feature level to "rust" Mar 19, 2020
Cargo.toml Update av-metrics to 0.5 (#2347) May 29, 2020
LICENSE Update Licence date to 2020 Mar 19, 2020
PATENTS Initial commit Sep 24, 2017
README.md Update README.md#building (#2328) May 26, 2020
build.rs Add profile name to version string (#2259) May 26, 2020
build.sh build.sh: Clean up and add some checks (#2142) Feb 2, 2020
cbindgen.toml Add v_frame to the cbindgen-parse crates Feb 19, 2020
clippy.toml Implement quick and dirty simd intrinsics for sgr Aug 2, 2019
license_template.txt Update copyright line in LICENSE. Nov 26, 2019
rustfmt.toml Update rustfmt.toml Jul 30, 2019

README.md

rav1e Travis Build Status AppVeyor Build Status Actions Status Coverage Status

The fastest and safest AV1 encoder.

Overview

rav1e is an 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.

Features

  • Intra, inter, and switch frames
  • 64x64 superblocks
  • 4x4 to 64x64 RDO-selected square and 2:1/1:2 rectangular blocks
  • DC, H, V, Paeth, smooth, and all directional prediction modes
  • DCT, (FLIP-)ADST and identity transforms (up to 64x64, 16x16 and 32x32 respectively)
  • 8-, 10- and 12-bit depth color
  • 4:2:0 (full support), 4:2:2 and 4:4:4 (limited) chroma sampling
  • 11 speed settings (0-10)
  • Near real-time encoding at high speed levels
  • Constant quantizer and target bitrate (single- and multi-pass) encoding modes
  • Still picture mode

Releases

For the foreseeable future, a weekly pre-release of rav1e will be published every Tuesday.

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.

Building

NASM

Some x86_64-specific optimizations require a recent version of NASM and are enabled by default.

Install nasm

ubuntu 20.04

sudo apt install nasm

ubuntu 18.04

sudo apt install nasm-mozilla
# link nasm into $PATH
sudo ln /usr/lib/nasm-mozilla/bin/nasm /usr/local/bin/

fedora 31, 32

sudo dnf install nasm

windows
Have a NASM binary in your system PATH.

release binary

To build release binary in target/release/rav1e run:

cargo build --release

Unstable features

Experimental API and Features can be enabled by using the unstable feature.

cargo build --features unstable

Those Features and API are bound to change and evolve, do not rely on them staying the same over releases.

Target-specific builds

The rust autovectorizer can produce a binary that is about 6%-7% faster if it can use avx2 in the general code, you may allow it by issuing:

RUSTFLAGS="-C target-cpu=native" cargo build --release

or

RUSTFLAGS="-C target-feature=+avx2,+fma" cargo build --release

The resulting binary will not work on cpus that do not sport the same set of SIMD extensions enabled.

Building the C-API

rav1e provides a C-compatible set of library, header and pkg-config file.

To build and install it you can use cargo-c:

cargo install cargo-c
cargo cinstall --release

Compressing video

Input videos must be in y4m format. The monochrome color format is not supported.

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 build compatible aomdec using the following:

mkdir aom_test
cd aom_test
cmake /path/to/aom -DAOM_TARGET_CPU=generic -DCONFIG_AV1_ENCODER=0 -DENABLE_TESTS=0 -DENABLE_DOCS=0 -DCONFIG_LOWBITDEPTH=1
make -j8
./aomdec ../output.ivf -o output.y4m

Configuring

rav1e has several optional features that can be enabled by passing --features to cargo test. Passing --all-features is discouraged.

  • asm - enabled by default. When enabled, assembly is built for the platforms supporting it.
    • It requires nasm on x86_64.
    • It requires gas on aarch64.

NOTE: SSE2 is always enabled on x86_64, neon is always enabled for aarch64, you may set the environment variable RAV1E_CPU_TARGET to rust to disable all the assembly-optimized routines at the runtime.

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:

https://arewecompressedyet.com/analyzer/?d=https://people.xiph.org/~mbebenita/analyzer/inspect.js&f=path_to_output.ivf

Design

The File Structure and design of the encoder is explained more in the Structure document.

Contributing

Please read our guide to contributing to rav1e.

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.

You can’t perform that action at this time.