Skip to content

Kvazaar

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

An open-source HEVC encoder

Latest release
v2.3.2
Last commit
License
BSD-3-Clause
Stars
966

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).

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:

Terminal window
cmake -S kvazaar -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-DKVZ_BIT_DEPTH=10"
cmake --build build

FFmpeg’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.

Terminal window
kvazaar -i input.y4m --preset slow --qp 24 -o output.hevc
ffmpeg -i input.mkv -f yuv4mpegpipe - | kvazaar -i - --input-file-format y4m --preset slow --qp 24 -o output.hevc

Kvazaar 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.

OptionDefaultNotes
--presetmediumultrafast to placebo, same names as x264/x265. The README lists what each preset sets.
--qp22Base QP. There is no CRF mode; B-frames in the GOP pyramid get higher QPs automatically.
--bitrate0 (off)Target bitrate in bits per second, not kbit/s. Uses lambda-domain rate control by default.
--vaqOffVariance-based adaptive quantization, strength 1–20; upstream recommends 5.
--gop16 (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.
--period64Intra period in frames (0 = only the first frame).
--open-gopOnUse --no-open-gop for streams that will be cut at keyframes.
--threads / --owfautoWorker threads and number of frames encoded in parallel.