Rav1e, an AV1 encoder in Rust reaches its new version 0.2

Rav1e is an AV1 video encoder, what is designed to cover all use cases, although in its current form it is more suitable for cases where libaom. Rav1e features high-performance video encoding. Encoder it's written in Rust and it differs from the reference libaom encoder in a significant increase in encoding speed and greater attention to security. The project code is distributed under the BSD license.

rav1e supports all major AV1 features, including vnutrenne and externally coded frames (intra and inter-frame) 64 × 64 superblocks, 4: 2 0, 4: 2: 2 and 4: 4: 4, 8 subsampling color, 10 and 12 bit color depth encoding, RDO (Velocity Distortion Optimization) distortion optimization, various modes to predict changes between frames and detect transformations, control flow rate, and detect scene truncation.

The AV1 format is noticeably ahead of x264 and libvpx-vp9 in terms of compression, but due to the complexity of the algorithms, it requires significantly more time for encoding (libaom is hundreds of times behind libvpx-vp9 and thousands of times behind x264).

The rav1e encoder provides 11 levels of performance, the highest of which allows speeds close to real-time encoding. The encoder is available both as a command line utility and as a library.

Of its main characteristics that stand out from Rav1e:

  • Intra and inter frames
  • 64 × 64 Superblocks
  • 4 × 4 to 64 × 64 RDO selected square and 2: 1/1: 2 rectangular blocks
  • DC, H, V, Paeth, smooth, and a subset of directional prediction modes
  • DCT, (FLIP-) ADST and identity transformations (up to 64 × 64, 16 × 16, and 32 × 32 respectively)
  • 8, 10, and 12-bit depth color
  • 4: 2: 0 (full support), 4: 2: 2 and 4: 4: 4 (limited) chroma sampling
  • Variable speed settings
  • Near real time encoding at high speed levels

About the new version of rav1e 0.2

In the new version of rav1e it is highlighted that various optimizations were carried out, that allowedIncrease productivity by 40% -70%, compared to the first version (depending on the encoding settings).

On the other hand, it is also highlighted that added "serialize" option to cli interface for serialization and deserialization of encoding parameters.

The –benchmark flag has been added to cli for macOS and Linux and also added the ability to configure targeting using the SpeedSetting option (disabled by default as it can lead to desynchronization).

Besides that builds now use debug dwarf format for targets which support it, before it was a mix of dwarfy stabs due to nasm defaults.

How to install rav1e on Ubuntu and derivatives?

For those who are interested in being able to install this AV1 encoder in their system, they should know that currently rav1e is available to be compiled on Linux although for Windows there is an exe available.

In this case we are interested in being able to install it in Ubuntu and its derivatives, so in order to do this, they must have Rust installed on their system.

If you don't have it, what you should do is open a terminal on your system (you can do it with the shortcut Ctrl + Alt + T) and in it you are going to type the following commands:

sudo apt install curl

curl https://sh.rustup.rs -sSf | sh

Later we only have to type option 1 and it will be installed. Once this is done, we are going to configure the environment for the Rust compiler with:

source $HOME/.cargo/env

Now to install rav1e, we are going to type:

sudo apt -y install cargo git perl nasm cmake clang pkg-config

We clone the rav1e code:

git clone https://github.com/xiph/rav1e.git

mv rav1e rav1e-git

cd rav1e-git

And we start with the compilation:

git submodule update –init

cmake aom_build/aom -DAOM_TARGET_CPU=x86_64 -DCONFIG_AV1_ENCODER=0 -DENABLE_TESTS=0 -DENABLE_DOCS=0 -DCONFIG_LOWBITDEPTH=1

make -j$(nproc)

cargo build --release

cp target/

And voila, if you want to know about the use of rav1e you can consult the following link.


Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.