Changes between Version 1 and Version 2 of Encode/FFV1


Ignore:
Timestamp:
May 29, 2014, 4:20:09 PM (5 years ago)
Author:
peter_b
Comment:

Copied cheatsheet from my page at das-werkstatt.

Legend:

Unmodified
Added
Removed
Modified
  • Encode/FFV1

    v1 v2  
    1 FFV1 encoding guide "stub".
     1= FFV1 encoding cheatsheet: =
     2
     3== FFV1 version 1: ==
     4The following list contains encoding parameters for FFV1 (version 1):
     5
     6||= Name =||= FFmpeg argument =||= Valid values =||= Comments =||
     7|| Coder: || -coder || 0, 1 || 0=Golomb Rice, 1=Range Coder ||
     8|| Context: || -context || 0, 1 || 0=small, 1=large ||
     9|| GOP size: || -g || integer >= 1 || For archival use, GOP-size should be "1". ||
     10
     11=== Examples: ===
     121. '''Copy audio "as-is" and use FFV1.1 as video codec.'''
     13    Parameters are GOP-size=1, coder=1, context=1:
     14    {{{
     15    ffmpeg -i <input_video> -acodec copy
     16    -vcodec ffv1 -level 1
     17    -coder 1 -context 1 -g 1 <output_video>
     18    }}}
     19
     20
     21== FFV1 version 3: ==
     22The following list contains encoding parameters for FFV1 (version 3).
     23
     24||= Name =||= FFmpeg argument =||= Valid values =||= Comments =||
     25|| Coder: || -coder || 0, 1 || 0=Golomb Rice, 1=Range Coder ||
     26|| Context: || -context || 0, 1 || 0=small, 1=large ||
     27|| GOP size: || -g || integer >= 1 || For archival use, GOP-size should be "1". ||
     28|| Version: || -level || 1, 3 || Select which FFV1 version to use. ||
     29|| 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. ||
     30|| 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. ||
     31|| 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. ||
     32|| 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 [http://en.wikipedia.org/wiki/Variable_bitrate#Multi-pass_encoding_and_single-pass_encoding Wikipedia article about "Variable bitrate" (VBR)]. ||
     33|| 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 [http://ffmpeg.org/ffmpeg.html#Video-Options FFmpeg's documentation about video options]. ||
     34
     35=== Examples: ===
     36* '''Copy audio "as-is" and use FFV1.3 as video codec.'''
     37    Parameters are GOP-size=1, coder=1, context=1, 24 slices and slice-CRC on:
     38    {{{
     39ffmpeg -i <input_video> -threads 8 -acodec copy
     40-vcodec ffv1 '''-level 3'''
     41-coder 1 -context 1 -g 1 -slices 24 -slicecrc 1 <output_video>
     42    }}}
     43
     44* '''Encode using 2-pass mode:'''
     45    ** 1st pass:
     46        {{{
     47        ffmpeg -i <input_video> -threads 8 -an -vcodec ffv1
     48        -coder 1 -context 1 -g 1 -level 3 -slices 24 -slicecrc 1
     49        '''-pass 1 -passlogfile my_passlog'''
     50        <output_video-pass1>
     51        }}}
     52        NOTE: You can delete the "<output_video-pass1>" after the first pass.
     53
     54    ** 2nd pass:
     55        {{{
     56        ffmpeg -i <input_video> -threads 8 -acodec copy -vcodec ffv1
     57        -coder 1 -context 1 -g 1 -level 3 -slices 24 -slicecrc 1
     58        '''-pass 2''' -passlogfile my_passlog
     59        <output_video>
     60        }}}