Skip to content

uvg266

currentMigrated from docs/encoders/uvg266.mdx at 37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0

uvg266 is an open-source software encoder for encoding to the H.266 / VVC codec. Developed by the Ultra Video Group, written in C and licensed under BSD 3-clause. The encoder is based on Kvazaar, their open source HEVC encoder solution.

uvg266 is available in the Arch User Repository (AUR) as uvg266 and uvg266-git.

Ultra Video Group does not ship any pre-built binaries of their encoders so you’ll have to compile them yourself.

Windows users are recommended to compile via MinGW-W64 which comes with MSYS2.

Terminal window
git clone https://github.com/ultravideo/uvg266.git
cd uvg266/build
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0
make -j 8

Binaries will be available in the same folder (build), or you can run make install on Linux to install (May need elevated permissions).

You need to compile with -DUVG_BIT_DEPTH=10 in the CMake -DCMAKE_C_FLAGS option to enable support for encoding 10-bit videos.

For example:

Terminal window
-DCMAKE_C_FLAGS="-DUVG_BIT_DEPTH=10"

With native optimizations:

Terminal window
-DCMAKE_C_FLAGS="-flto -O3 -march=native -pipe -fno-plt -DUVG_BIT_DEPTH=10"
Simple Y4M input with QP 20 and raw 266 bitstream output
uvg266 -i input.y4m --input-file-format y4m --qp 20 -o output.266
Preset slow, CRF 20, Y4M input
uvg266 -i input.y4m --input-file-format y4m --qp 20 --preset slow -o output.266
FFmpeg piping
ffmpeg -v error -i input.mkv -f yuv4mpegpipe -strict -1 - | uvg266 -i - --input-file-format y4m --qp 20 --preset slow -o output.266
  1. Could not find a strategy for crc32c_8x8! - You’re out of luck, uvg266 failed to initialize its block partitioning strategy for your specific CPU instruction set, so you can’t use the encoder or encode that specific video.