How to Configure FFV1 Version and Slices in FFmpeg

This article provides a straightforward guide on how to configure the FFV1 codec version (v1 vs v3) and customize the slice count using FFmpeg. You will learn the specific command-line arguments required to optimize your lossless video archiving workflow for speed, compatibility, and error resilience.

Configuring the FFV1 Version (v1 vs v3)

FFmpeg allows you to select the FFV1 version using the -level option. While FFV1 version 1 (v1) offers wider compatibility with legacy tools, FFV1 version 3 (v3) is the modern standard for archival because it adds support for multithreading, self-description metadata, and CRC checksums for error detection.

Configuring the Slice Count

Slices divide each video frame into independent sub-sections. Increasing the slice count allows FFmpeg to use multiple CPU threads to encode and decode the video simultaneously, significantly improving processing speeds. Additionally, if a file suffers corruption, damage is isolated to the affected slice rather than ruining the entire frame.

To set the slice count, use the -slices option followed by the desired number. Common choices include 4, 12, 16, or 24, depending on your system’s CPU threads and archival requirements.

Combining Version and Slice Settings

For optimal performance and long-term preservation, you should combine these settings. The following command encodes a video using FFV1 Version 3 with 24 slices and lossless audio:

ffmpeg -i input.mp4 -c:v ffv1 -level 3 -slices 24 -c:a flac output.mkv