# UT Video

Canonical URL: https://encode.wiki/codecs/video/utvideo/
Content version: ca42e61ede0a24f789d7287a0001244ad22f4abf
Status: current
License: CC BY-SA 4.0
Checksum (SHA-256): 0771a7eb941cfc5f7e65409262c6142326050b90b5b070cd523d3ec93b50e88d

Ut Video is a fast lossless codec by Takeshi Umezawa, built as a better-compressing alternative to HuffYUV. It is light enough on the CPU to capture HD in real time, which makes it a common choice for lossless screen and video captures and editing intermediates. Files are noticeably larger than [FFV1](/codecs/video/ffv1/), but encoding and decoding are much faster.

The original Ut Video Codec Suite (GPL v2 or later, version 23.2.0) is a Windows VCM and DirectShow codec. FFmpeg ships an independent encoder and decoder, which is what most people use on Linux and macOS. Current Windows builds of the suite require a CPU with AVX2 and BMI2.

## Encode with FFmpeg

```sh
ffmpeg -i input.mkv -c:v utvideo -pred median output.mkv
```

`-pred` takes `none`, `left` (the default) or `median`. `median` gives smaller files at about the same speed. The FFmpeg encoder has no gradient prediction.

The encoder works in 8-bit `yuv420p`, `yuv422p`, `yuv444p`, `gbrp` and `gbrap` and converts anything else, so a 10-bit source is reduced to 8 bits. FFmpeg cannot encode the 10-bit Ut Video Pro family; use [FFV1](/codecs/video/ffv1/) for 10-bit lossless work.

For YCbCr, the FourCC records the matrix: FFmpeg writes `ULH*` (BT.709) when the stream is tagged BT.709 and `ULY*` (BT.601) otherwise. Add `-colorspace bt709` for untagged HD sources, or the decoding application may convert with the wrong matrix.

## Families and FourCCs

The suite contains several codec families. The FourCC in the file tells you which one:

| Family | FourCCs | Notes |
| --- | --- | --- |
| Ut Video | `ULRG`, `ULRA`, `ULY0/2/4`, `ULH0/2/4` | 8-bit RGB, RGBA and YCbCr. `ULY*` is BT.601 and `ULH*` BT.709. |
| Ut Video T2 | `UMRG`, `UMRA`, `UMY2/4`, `UMH2/4` | Usually faster with lower compression; supports inter-frame compression. |
| Ut Video Pro | `UQRG`, `UQRA`, `UQY0/2` | 10-bit. |

FFmpeg encodes only the first family. It decodes all three, but its T2 decoder has no inter-frame support, so use the Windows suite for T2 files encoded with inter-frame compression.

## Pitfalls

- AVI is the traditional container because the Windows suite is a VfW/DirectShow codec. FFmpeg-based tools are just as happy with Matroska.
- Lossless only holds for the format Ut Video stores. Converting RGB to YUV, 10-bit to 8-bit or 4:4:4 to 4:2:0 loses data before compression.
- Files are large and there is no browser or hardware playback; make a viewing copy.
