Skip to main content

VVenC

vvencapp spamming the terminal output with progress per-picture-order-count cause god knows why

VVenC is an open source command line application for encoding H.266/VVC written in C++ and developed by Fraunhofer Heinrich-Hertz-Institute (HHI).

Installation​

Arch Linux users may check the AUR for the vvenc and vvenc-git packages.

Compilation from source as shown belowe requires CMake.

git clone https://github.com/fraunhoferhhi/vvenc.git
cd vvenc
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .

Binaries will be available in bin/release-static/

FFmpeg Integration​

Although not officially supported, you can compile your own FFmpeg binary with libvvenc and libvvdec. A comprehensive tutorial can be found in the official VVenC wiki (archive).

The official guide is rather verbose, as FFmpeg (at the time of writing, 19 Feb 2024) does not support vvenc/vvdec officially. Below is an easy build script which uses an FFmpeg fork called FFmpeg-VVC. It is maintained by Marten Martin Eesmaa, who also maintains the VVCEasy GitHub repo featuring guides and more general information about working with VVC.

Please be aware the script below produces a build of FFmpeg licensed under LGPL version 2.1 or later. It is legal to distribute the resulting binary, given you do not interfere with the flags provided below.

Build FFmpeg with libvvdec, libvvenc, and fdk-aac
brew install libxml2 ffmpeg nasm # macOS-only; if on Linux, use your native package manager. Package names may differ.
git clone https://github.com/fraunhoferhhi/vvenc
git clone https://github.com/fraunhoferhhi/vvdec
git clone https://github.com/mstorsjo/fdk-aac
cd vvenc && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
sudo cmake --build . --target install -j $nproc
cd ../../
cd vvdec && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
sudo cmake --build . --target install -j $nproc
cd ../../
cd fdk-aac && ./autogen.sh && ./configure
make -j
sudo make install
cd ../
git clone --depth=1 https://github.com/MartinEesmaa/FFmpeg-VVC
cd FFmpeg-VVC
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure --enable-libfdk-aac --enable-libvvenc --enable-libvvdec --enable-static --enable-pic --enable-libxml2 --pkg-config-flags="--static" --enable-sdl2
make -j

Binaries will be available in the final directory you end up in after the build process is complete.

Usage​

There are two encoders, the simple encoder (vvencapp) and the full-featured expert mode encoder (vvencFFapp) which is based on the VTM configuration scheme. VVenC used to only accept YUV files input until support was added for Y4M.

Here are some examples:

Standard VVenC input
vvencapp -i input.y4m --qp 20 -o output.266
Preset slow + qpa (already default) + YUV420P10
vvencapp -i input.y4m --preset slow --qpa on --qp 20 -c yuv420_10 -o output.266
Piping with FFmpeg
ffmpeg -hide_banner -loglevel error -i input.mkv -pix_fmt yuv420p10le -strict -1 -f yuv4mpegpipe - | vvencapp -i - --y4m --preset medium --qpa on --qp 20 -c yuv420_10 -o output.266
Limitations

VVenC currently does not support input resolutions below 540p. In addition, VVenC usually produces bitstreams that don't decode correctly when using FFmpeg's recently implemented native ffvvc decoder (this is true as of the time of writing on 19 Feb 2024). For proper decoding, build FFmpeg with libvvdec.

QPA

VVenC by default operates with QP (Quantization Parameter), which is basically fixed quality. For "CRF-like" rate control, QPA is enabled by default QPA (provided by --qpa) enables perceptually motivated QP adaptation based on XPSNR. QPA modifies the QP value on the fly spatially and temporally as well as enabling temporal RDO.