1) Using FFmpeg

FFV1 version 1:

The following list contains encoding parameters for FFV1 (version 1):

Name FFmpeg argument Valid values Comments
Coder: -coder 0, 1 0=Golomb Rice, 1=Range Coder
Context: -context 0, 1 0=small, 1=large
GOP size: -g integer ≥ 1 For archival use, GOP-size should be "1".

Examples:

  1. Copy audio "as-is" and use FFV1.1 as video codec.

    Parameters are GOP-size=1, coder=1, context=1:

    ffmpeg -i <input_video> -acodec copy -vcodec ffv1 -level 1 -coder 1 -context 1 -g 1 <output_video>

 

FFV1 version 3:

The following list contains encoding parameters for FFV1 (version 3).

Name FFmpeg argument Valid values Comments
Coder: -coder 0, 1 0=Golomb Rice, 1=Range Coder
Context: -context 0, 1 0=small, 1=large
GOP size: -g integer ≥ 1 For archival use, GOP-size should be "1".
Version: -level 1, 3 Select which FFV1 version to use.
Threads: -threads integer ≥ 1 The number of threads to use while processing. Adjust this to match how many of your available CPU cores you want to use.
Slices: -slices 4, 6, 9, 12, 16, 24, 30 Each frame is split into this number of slices. This affects multithreading performance, as well as filesize: Increasing the number of slices might speed up performance, but also increases the filesize.
Error correction/detection: -slicecrc 0, 1 0=off, 1=on
Enabling this option adds CRC information to each slice. This makes it possible for a decoder to detect errors in the bitstream, rather than blindly decoding a broken slice.
Multi-pass encoding: -pass 1, 2 1=1st pass, 2=2nd pass
FFV1.3 is able to be encoded in multiple passes, to increase compression efficiency. It requires encoding the file twice, though:
The 1st pass is to analyze the video source data and logging the results, and the 2nd pass uses this previously gathered information to achieve a higher compression ratio.
More information about multi-pass encoding can be read up in the Wikipedia article about "Variable bitrate" (VBR).
Multi-pass logfile: -passlogfile a filename prefix This is the prefix of the logfile used for storing the information gathered during previous passes in multi-pass encoding mode.
Additional info about passlogfile can be found in FFmpeg's documentation about video options.

Examples:

  1. Copy audio "as-is" and use FFV1.3 as video codec.

    Parameters are GOP-size=1, coder=1, context=1, 24 slices and slice-CRC on:

    ffmpeg -i <input_video> -threads 8 -acodec copy -vcodec ffv1 -level 3 -coder 1 -context 1 -g 1 -slices 24 -slicecrc 1 <output_video>

  2. Encode using 2-pass mode:

    1st pass:

    ffmpeg -i <input_video> -threads 8 -an -vcodec ffv1 -coder 1 -context 1 -g 1 -level 3 -slices 24 -slicecrc 1 -pass 1 -passlogfile my_passlog <output_video-pass1>
    NOTE: You can delete the "<output_video-pass1>" after the first pass.

    2nd pass:

    ffmpeg -i <input_video> -threads 8 -acodec copy -vcodec ffv1 -coder 1 -context 1 -g 1 -level 3 -slices 24 -slicecrc 1 -pass 2 -passlogfile my_passlog <output_video>