Convert Uncompressed Video to UT Video Using FFmpeg
This article provides a quick, step-by-step guide on how to convert large, uncompressed video files into the visually lossless UT Video format using the FFmpeg command-line tool. You will learn the essential commands to perform this conversion while preserving perfect image quality, managing different color spaces, and maintaining original audio tracks.
The UT Video codec is an excellent choice for archiving and editing
because it offers mathematically lossless compression, which
significantly reduces file sizes without sacrificing a single pixel of
quality. FFmpeg supports this codec natively via the
utvideo encoder wrapper.
Basic Conversion Command
To convert an uncompressed video file to UT Video with the default settings, use the following basic command structure:
ffmpeg -i input_uncompressed.avi -c:v utvideo -c:a copy output.mkvIn this command: * -i input_uncompressed.avi specifies
your source uncompressed video. * -c:v utvideo selects the
UT Video encoder for the video stream. * -c:a copy copies
the existing audio stream stream without re-encoding it, preserving its
original uncompressed quality (such as PCM audio). *
output.mkv is the resulting file. The Matroska (.mkv)
container is highly recommended for UT Video.
Preserving Specific Color Spaces
UT Video supports several pixel formats. To avoid automatic
conversion errors and ensure your video retains its exact color
representation, you should explicitly define the pixel format using the
-pix_fmt flag.
For YUV 4:2:2 (Standard Broadcast/Editing)
If your source video is in YUV 4:2:2 format, use:
ffmpeg -i input.avi -c:v utvideo -pix_fmt yuv422p -c:a copy output.mkvFor YUV 4:2:0 (Common Distribution Format)
If you want to compress the video to a standard YUV 4:2:0 format:
ffmpeg -i input.avi -c:v utvideo -pix_fmt yuv420p -c:a copy output.mkvFor RGB (High-End Graphics and Screen Recordings)
If your source is RGB (often used for gameplay capture, animation, or graphics) and you want to keep the RGB color space:
ffmpeg -i input.avi -c:v utvideo -pix_fmt rgb24 -c:a copy output.mkvFor RGBA (With Alpha/Transparency Channel)
If your uncompressed video contains an alpha transparency channel that you must preserve:
ffmpeg -i input.avi -c:v utvideo -pix_fmt rgba -c:a copy output.mkvVerifying the Output
Once the conversion process is complete, you can verify that the output file is indeed encoded in UT Video by running:
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=noprint_wrappers=1 output.mkvThis command will output codec_name=utvideo, confirming
a successful lossless conversion.