VVenC

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â
- Linux & macOS
- Windows
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â
Since 15th June 2024, you can officially compile your own FFmpeg binary with libvvenc. If you use earlier FFmpeg revisions you will need to apply a custom patch. A comprehensive tutorial can be found in the official VVenC wiki (archive).
A VVC decoder has been integrated into FFmpeg in early 2024, FFmpeg 7.0 is the first release to support it. However if you still want to compile FFmpeg with the vvdec decoder, you can refer to the official VVenC wiki (archive).
There is an FFmpeg fork called FFmpeg-VVC. It is maintained by Martin Eesmaa, who is the author of 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.
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.
VVenC builds with Visual Studio via CMake; with VS & CMake installed:
git clone https://github.com/fraunhoferhhi/vvenc.git
cd vvenc
mkdir build; cd build
cmake .. -G "Visual Studio 17 2022" -A x64
Then open the generated solution & build the vvencapp target in Release configuration. Alternatively, MSYS2/MinGW builds work with the Linux instructions above.
Supported Color Spaceâ
vvencapp accepts 4:2:0 & 4:0:0 (grayscale) input, in 8-bit (yuv420) or 10-bit (yuv420_10). 4:2:2 & 4:4:4 are not supported by the simple app; the expert vvencFFapp exposes more, but VVC deployment reality is 4:2:0 anyway.
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:
vvencapp -i input.y4m --qp 20 -o output.266
vvencapp -i input.y4m --preset slow --qpa on --qp 20 -c yuv420_10 -o output.266
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
ffmpeg -i input.mkv -c:v libvvenc -qp 32 -preset fast out.mp4
FFmpeg vvenc plugin only supports yuv420p10le output pixel format which means resulting video will always have 10 bit color depth.
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.
Parameters worth knowingâ
--preset [faster|fast|medium|slow|slower|medium_lowDecEnergy]
Presets trading speed for efficiency, medium by default. medium_lowDecEnergy matches medium quality while targeting lower decode energy (useful for mobile playback).
-q, --qp [0-63]
Fixed QP for constant-quality encoding, or -b/--bitrate for rate control (which can run two passes: --passes 2, with optional -m/--maxrate for capped VBR).
-t, --threads [-1]
Thread count. By default VVenC scales automatically with resolution: 4 threads below 720p, 8 up to 5K, 12 beyond.
-i input.y4m
Y4M input files are auto-detected from the header (width, height, framerate, bit depth). When piping from stdin (-i -), pass --y4m explicitly: there is no file extension to sniff, & without the flag vvencapp encodes zero frames.
--refreshtype/--refreshsec/--intraperiod
Keyframe placement: --refreshtype cra (open GOP) is the default, with intra refresh every 1 second by default via --refreshsec 1. Use --intraperiod N to specify in frames, or --refreshtype idr for closed GOP. Scene cuts are not detected; the refresh interval is fixed.
The raw .266 output muxes into MP4 with FFmpeg 7.0+ the same way as VTM output: ffmpeg -f vvc -i output.266 -c copy output.mp4.