8 unstable releases (3 breaking)
|0.4.0-alpha||Sep 16, 2020|
|0.3.4||Sep 9, 2020|
|0.3.3||Jun 7, 2020|
|0.3.1||Feb 20, 2020|
|0.1.0||Nov 9, 2019|
902 downloads per month
Used in 6 crates (3 directly)
The fastest and safest AV1 encoder.
Table of Content
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.
- 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
Find the documentation in
For the foreseeable future, a weekly pre-release of rav1e will be published every Tuesday.
x86_64-specific optimizations require NASM
2.14.02 or newer and are enabled by default.
The CI is testing against
nasm 2.15.04, so bugs for other versions might happen. If you find one please open an issue!
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
Have a NASM binary in your system PATH.
$NASM_VERSION="2.15.04" # 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"
brew install nasm
To build release binary in
cargo build --release
Experimental API and Features can be enabled by using the
cargo build --features <feature>,unstable
- Channel API:
cargo build --features channel-api,unstable
Those Features and API are bound to change and evolve, do not rely on them staying the same over releases.
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.
NOTE : You may use
rustc --print target-cpusto check if the cpu is supported, if not
-C target-cpu=nativewould be a no-op.
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
Input videos must be in y4m format. The monochrome color format is not supported.
cargo run --release --bin rav1e -- input.y4m -o output.ivf
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
rav1e has several optional features that can be enabled by passing
--features to cargo. Passing
--all-features is discouraged.
Find a full list in feature-table in
asm- enabled by default. When enabled, assembly is built for the platforms supporting it.
- Alternative: Use
clangassembler by setting
SSE2 is always enabled on
neon is always enabled for aarch64, you may set the environment variable
rust to disable all the assembly-optimized routines at the runtime.
Please read our guide to contributing to rav1e.
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.