Crates.io | rav1e |
lib.rs | rav1e |
version | 0.7.1 |
source | src |
created_at | 2019-11-09 05:48:33.756387 |
updated_at | 2024-01-10 11:04:05.530735 |
description | The fastest and safest AV1 encoder |
homepage | |
repository | https://github.com/xiph/rav1e/ |
max_upload_size | |
id | 179643 |
size | 9,977,864 |
The fastest and safest AV1 encoder.
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.
Find the documentation in doc/
For the foreseeable future, a weekly pre-release of rav1e will be published every Tuesday.
rav1e currently requires Rust 1.70.0 or later to build.
Some x86_64
-specific optimizations require NASM 2.14.02
or newer and are enabled by default.
strip
will be used if available to remove the local symbols from the asm objects.
The CI is testing against nasm 2.15.05
, so bugs for other versions might happen. If you find one please open an issue!
ubuntu 20.04 (nasm 2.14.02
)
sudo apt install nasm
ubuntu 18.04 (nasm 2.14.02
)
sudo apt install nasm-mozilla
# link nasm into $PATH
sudo ln /usr/lib/nasm-mozilla/bin/nasm /usr/local/bin/
fedora 31, 32 (nasm 2.14.02
)
sudo dnf install nasm
windows (nasm 2.15.05
)
Have a NASM binary in your system PATH.
$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"
macOS (nasm 2.15.05
)
brew install nasm
To build release binary in target/release/rav1e
run:
cargo build --release
Experimental API and Features can be enabled by using the unstable
feature.
cargo build --features <feature>,unstable
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 compiler can produce a binary that is about 11%-13% faster if it can use avx2
, bmi1
, bmi2
, fma
, lzcnt
and popcnt
in the general code, you may allow it by issuing:
RUSTFLAGS="-C target-cpu=native" cargo build --release
# or
RUSTFLAGS="-C target-cpu=x86-64-v3" cargo build --release
The resulting binary will not work on cpus that do not sport the same set of extensions enabled.
NOTE : You may use
rustc --print target-cpus
to check if the cpu is supported, if not-C target-cpu=native
would 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
Please refer to the cargo-c installation instructions.
Input videos must be in y4m format. The monochrome color format is not supported.
cargo run --release --bin rav1e -- input.y4m -o output.ivf
(Find a y4m-file for testing at tests/small_input.y4m
or at http://ultravideo.cs.tut.fi/#testsequences)
Encoder output should be compatible with any AV1 decoder compliant with the v1.0.0 specification. You can decode using dav1d, which is now packaged .
dav1d -i 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 Cargo.toml
asm
- enabled by default. When enabled, assembly is built for the platforms supporting it.
x86_64
: Requires nasm
.aarch64
gas
clang
assembler by setting CC=clang
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.
Please read our guide to contributing to rav1e.
Come chat with us on the IRC channel #daala on Libera.Chat! You can also use a web client to join with a web browser.