Transcode Lossless Dirac VC-2 Video Using FFmpeg
This guide explains how to transcode video files into the mathematically lossless Dirac video format using the VC-2 HQ encoder in FFmpeg. You will learn the exact command-line syntax, key parameter configurations, and recommended container formats to ensure your video is compressed without any loss of quality for archiving or post-production.
The Basic Lossless VC-2 Command
The native FFmpeg VC-2 encoder (-c:v vc2) is an
implementation of the Dirac Pro standard. To trigger mathematically
lossless compression, you must use the -lossless 1
flag.
Here is the standard command to transcode an input video to lossless VC-2:
ffmpeg -i input.mp4 -c:v vc2 -lossless 1 output.mxfExplaining the Parameters
-i input.mp4: Specifies the source video file you want to transcode.-c:v vc2: Selects FFmpeg’s native VC-2 (Dirac) video encoder.-lossless 1: Enables mathematically lossless encoding, bypassing the default lossy quantization.output.mxf: The output file. Material Exchange Format (MXF) is the recommended container for VC-2 video, though QuickTime (.mov) is also supported.
Advanced Configuration for Professional Workflows
When working with professional video archives, preserving the chroma subsampling, bit depth, and audio structure is critical.
The following command transcodes a video to 10-bit YUV 4:2:2 lossless VC-2 while copying the audio stream without re-encoding:
ffmpeg -i input.mp4 -c:v vc2 -pix_fmt yuv422p10le -lossless 1 -c:a copy output.mxfKey Adjustments:
-pix_fmt yuv422p10le: Forces the output to 10-bit YUV 4:2:2, which is the standard color space for VC-2 high-quality profiles. If your source is 8-bit, you can useyuv422poryuv420p.-c:a copy: Copies the original audio stream directly without re-encoding it, preserving the original audio quality.
If you need to transcode the audio to uncompressed PCM (common in broadcast workflows alongside VC-2), use this command:
ffmpeg -i input.mp4 -c:v vc2 -pix_fmt yuv422p10le -lossless 1 -c:a pcm_s24le output.mxfUsing these configurations, FFmpeg will generate a mathematically lossless Dirac-compliant VC-2 video stream suitable for long-term digital preservation and high-end video editing.