How to Transcode Video to Lossless FFV1 with FFmpeg

This guide provides a straightforward tutorial on how to transcode video files into the high-end, mathematically lossless FFV1 format using FFmpeg. You will learn the exact command-line syntax, key parameters required for digital preservation, and how to optimize the encoding process for speed and multi-threaded performance.

The Basic FFV1 Conversion Command

To convert any video to FFV1 with its original audio stream left untouched, use the following basic FFmpeg command:

ffmpeg -i input.mp4 -c:v ffv1 -c:a copy output.mkv

For professional archiving and digital preservation, you should use FFV1 Version 3. This version supports multi-threading, slice-level CRC checksums for error detection, and better compression.

Use this optimized command for high-performance, archival-grade transcoding:

ffmpeg -i input.mp4 -c:v ffv1 -level 3 -coder 1 -context 1 -g 1 -slices 24 -slicecrc 1 -c:a flac output.mkv

Explanation of Advanced Parameters

Preserving Pixel Format and Color Space

FFmpeg will automatically attempt to choose the correct pixel format. However, if you want to explicitly preserve the exact color depth and chroma subsampling of your source file (such as 10-bit YUV 4:2:2), add the -pix_fmt flag:

ffmpeg -i input.mp4 -c:v ffv1 -level 3 -pix_fmt yuv422p10le -c:a copy output.mkv

Common lossless pixel formats for FFV1 include: * yuv420p: Standard 8-bit 4:2:0 (common for web video). * yuv422p10le: 10-bit 4:2:2 (common for professional broadcast and digitization). * rgb24: 8-bit RGB (best for screen recordings or graphics).