# uvg266

Canonical URL: https://encode.wiki/tools/software-encoders/uvg266/
Content version: ca42e61ede0a24f789d7287a0001244ad22f4abf
Status: current
License: CC BY-SA 4.0
Checksum (SHA-256): 98a0d1246d3927cbc0ca0163880bf5b06645aa2ea5dc31badf90e7c8f1422cc2

> **Repository:** [ultravideo/uvg266](https://github.com/ultravideo/uvg266). An open-source VVC encoder based on Kvazaar. Latest release: [v0.8.1](https://github.com/ultravideo/uvg266/releases/tag/v0.8.1), Jul 1, 2024. Last commit: Apr 24, 2026. License: BSD-3-Clause. Stars: 296.

[uvg266](https://github.com/ultravideo/uvg266) is an open-source C encoder for [H.266 / VVC](/codecs/video/vvc/) from Tampere University's [Ultra Video Group](https://ultravideo.fi/). It is derived from their HEVC encoder [Kvazaar](/tools/software-encoders/kvazaar/), uses x264-style preset names, and is BSD-3-Clause licensed. The README still describes it as under development with speed and rate-distortion performance improving.

For serious VVC work [VVenC](/tools/software-encoders/vvenc/) is the encoder with FFmpeg integration and perceptual optimisation, but uvg266 is a quick, simple alternative with a Kvazaar-style command line.

## Get it

There are no official binaries. The last tagged release is v0.8.1 (July 2024), but `master` has had newer work, including a rewritten CMake build in April 2026. Build from `master` unless you need the tag:

```sh
git clone https://github.com/ultravideo/uvg266.git
cmake -S uvg266 -B uvg266/build -DCMAKE_BUILD_TYPE=Release
cmake --build uvg266/build --parallel
```

The binary is `uvg266/build/bin/uvg266`.

> **Caution.**
>
> The default build is **8-bit only**. Passing `--input-bitdepth 10` to it fails with a usage error. For 10-bit input and output, configure with `-DUVG_BIT_DEPTH=10`; that build then codes everything, 8-bit sources included, as 10-bit.
## Encode

```sh
uvg266 -i input.y4m --preset medium --qp 30 -o output.266
```

Y4M input carries its own resolution and frame rate. Raw YUV needs `--input-res=1920x1080 --input-fps 24` (and `--input-bitdepth 10` on a 10-bit build). To feed it from FFmpeg:

```sh
ffmpeg -i input.mkv -f yuv4mpegpipe - | uvg266 -i - --input-file-format y4m -o output.266
```

For 10-bit sources, use `-pix_fmt yuv420p10le -strict -1` in FFmpeg (it refuses to write 10-bit Y4M otherwise) and add `--input-bitdepth 10`. uvg266 ignores the bit depth in the Y4M header: without that option a 10-bit build reads 10-bit input as 8-bit and silently encodes garbage.

The output is a bare VVC stream. Wrap it with `ffmpeg -framerate 24 -i output.266 -c copy output.mp4` or [MP4Box](/tools/utilities/mp4box/), and decode with FFmpeg 7.1 or newer or [VVdeC](https://github.com/fraunhoferhhi/vvdec).

## Options that matter

| Option           | Default      | Notes                                                                                      |
| ---------------- | ------------ | ------------------------------------------------------------------------------------------ |
| `--preset`       | `medium`     | `ultrafast` … `veryslow`, `placebo`, as in x264. The README has the per-preset tool table. |
| `-q`, `--qp`     | `22`         | Fixed quantizer. There is no CRF mode; the rate–quality trade-off is set by QP.            |
| `--bitrate`      | `0` (off)    | Target bits per second; enables rate control. `--rc-algorithm` picks `lambda` or `oba`.    |
| `-p`, `--period` | `64`         | Intra period in frames (`0` = first frame only, `1` = all intra).                          |
| `--gop`          | preset-based | `8` or `16` for B-frame pyramids, or `lp-…` for low-delay structures.                      |
| `-r`, `--ref`    | preset-based | Reference frames, 1–15.                                                                    |
| `--threads`      | auto         | Number of encoder threads.                                                                 |

Run `uvg266 --help` for the full list.
