Kvazaar
37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0An open-source HEVC encoder
Kvazaar is an open-source H.265 / HEVC encoder written in C by the Ultra Video Group at Tampere University, Finland. It is an academic project, licensed under the 3-clause BSD licence, and is still maintained: the latest release is v2.3.2 (September 2025), with ongoing commits on master. The same group’s VVC encoder, uvg266, is based on Kvazaar.
For quality-focused HEVC encoding most people use x265, which has a more mature rate control and psychovisual tuning. Kvazaar is mainly of interest for research, for its fast presets and low-delay GOP structures, and when a permissive licence matters (x265 is GPL).
Get Kvazaar
Section titled “Get Kvazaar”Arch Linux packages it as kvazaar; other platforms usually build from source with CMake or Autotools as described in the README. On MinGW/MSYS2, build with Clang (CC=clang ./configure): with GCC the AVX2 optimizations are disabled because of a long-standing GCC issue, and performance suffers badly.
The sample bit depth is fixed at compile time and defaults to 8. For 10-bit, build with -DKVZ_BIT_DEPTH=10:
cmake -S kvazaar -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-DKVZ_BIT_DEPTH=10"cmake --build buildFFmpeg’s libkvazaar wrapper accepts only 8-bit yuv420p, and many FFmpeg builds do not include it. Extra options go through -kvazaar-params as a comma-separated key=value list.
Encode with Kvazaar
Section titled “Encode with Kvazaar”kvazaar -i input.y4m --preset slow --qp 24 -o output.hevcffmpeg -i input.mkv -f yuv4mpegpipe - | kvazaar -i - --input-file-format y4m --preset slow --qp 24 -o output.hevcKvazaar detects Y4M from the file extension; for a pipe, give --input-file-format y4m, or --input-res and --input-fps for raw YUV. It does not take the bit depth from the Y4M header, so a 10-bit build needs --input-bitdepth 10 for 10-bit input. The output is a raw HEVC stream to mux afterwards.
| Option | Default | Notes |
|---|---|---|
--preset | medium | ultrafast to placebo, same names as x264/x265. The README lists what each preset sets. |
--qp | 22 | Base QP. There is no CRF mode; B-frames in the GOP pyramid get higher QPs automatically. |
--bitrate | 0 (off) | Target bitrate in bits per second, not kbit/s. Uses lambda-domain rate control by default. |
--vaq | Off | Variance-based adaptive quantization, strength 1–20; upstream recommends 5. |
--gop | 16 (8 at fast and faster) | GOP structure: 8 or 16 for a B-frame pyramid, 0 to disable, or lp-… for low-delay P/B GOPs. |
--period | 64 | Intra period in frames (0 = only the first frame). |
--open-gop | On | Use --no-open-gop for streams that will be cut at keyframes. |
--threads / --owf | auto | Worker threads and number of frames encoded in parallel. |