Answers.Body: <p>The coder here refers to the process used for <a href="https://en.wikipedia.org/wiki/Entropy_encoding" rel="nofollow noreferrer">entropy coding</a> the error residuals. The context size sets how many neighbouring residuals are considered in this process.</p>
  
  <p>As to the relative benefits, have no particular experience here, but since this is a lossless process, the tradeoff will be between time, size and resource use. This latter question is better suited for <a href="https://dsp.stackexchange.com/">https://dsp.stackexchange.com/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-27T12:33:25.863Z
Answers.LastActivityDate: 2018-09-27T12:33:25.863Z
Answers.UserDisplayName: Gyan
Answers.Body: <p>About your other question regarding the <code>-coder</code> option, I was also looking for more info on this.</p>
  <p>The current (Dec. 2020) IETF/cellar WG draft &quot;<a href="https://datatracker.ietf.org/doc/draft-ietf-cellar-ffv1/" rel="nofollow noreferrer">FFV1 Video Coding Format Version 0, 1, and 3</a>&quot; mentions in it's &quot;<a href="https://www.ietf.org/archive/id/draft-ietf-cellar-ffv1-19.html#name-coder_type" rel="nofollow noreferrer">4.2.3. coder_type</a>&quot; chapter :</p>
  <blockquote>
  <p>Restrictions:</p>
  <p>If coder_type is 0, then bits_per_raw_sample SHOULD NOT be &gt; 8.</p>
  <p>Background:</p>
  <p>At the time of this writing, there is no known implementation of FFV1 bitstream supporting Golomb Rice algorithm with
  bits_per_raw_sample greater than 8, and Range Coder is prefered.</p>
  </blockquote>
  <p>So without understanding much about it, I just concluded : &quot;always use <code>-coder 1</code>&quot; ... :-)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-28T14:37:18.703Z
Answers.LastActivityDate: 2020-12-28T14:37:18.703Z
Answers.UserDisplayName: mivk
Body: <p>In the <a href="https://ffmpeg.org/~michael/ffv1.html" rel="noreferrer">docs</a> for FFV1 there's a parameter <code>-context</code>, which can be set to 'small' or 'large'. That's all the documentation I can find. </p>
  
  <p><a href="https://i.sstatic.net/Y1gnj.png" rel="noreferrer"><img src="https://i.sstatic.net/Y1gnj.png" alt="enter image description here"></a></p>
  
  <p>While I'm at it, what are the relative benefits of the different encoders: Golomb Rice vs Range Coder?</p>
  
Tags: <ffmpeg><encoding>
Title: What does the `-context` parameter mean when using FFV1 in ffmpeg
UserDisplayName: stib
ThreadText: # What does the `-context` parameter mean when using FFV1 in ffmpeg
  
  (Asked by: username_0 on 2018-09-27)
  
  In the [docs](https://ffmpeg.org/~michael/ffv1.html) for FFV1 there's a parameter `-context`, which can be set to 'small' or 'large'. That's all the documentation I can find.
  
  [![enter image description here](https://i.sstatic.net/Y1gnj.png)](https://i.sstatic.net/Y1gnj.png)
  
  While I'm at it, what are the relative benefits of the different encoders: Golomb Rice vs Range Coder?
  
  **Tags:** ffmpeg, encoding
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-09-27. Score: 2
  
  The coder here refers to the process used for [entropy coding](https://en.wikipedia.org/wiki/Entropy_encoding) the error residuals. The context size sets how many neighbouring residuals are considered in this process.
  
  As to the relative benefits, have no particular experience here, but since this is a lossless process, the tradeoff will be between time, size and resource use. This latter question is better suited for <https://dsp.stackexchange.com/>
  
  
  ---
  
  ### Answer by username_2 on 2020-12-28. Score: 1
  
  About your other question regarding the `-coder` option, I was also looking for more info on this.
  
  The current (Dec. 2020) IETF/cellar WG draft "[FFV1 Video Coding Format Version 0, 1, and 3](https://datatracker.ietf.org/doc/draft-ietf-cellar-ffv1/)" mentions in it's "[4.2.3. coder\_type](https://www.ietf.org/archive/id/draft-ietf-cellar-ffv1-19.html#name-coder_type)" chapter :
  
  > Restrictions:
  >
  > If coder\_type is 0, then bits\_per\_raw\_sample SHOULD NOT be > 8.
  >
  > Background:
  >
  > At the time of this writing, there is no known implementation of FFV1 bitstream supporting Golomb Rice algorithm with
  > bits\_per\_raw\_sample greater than 8, and Range Coder is prefered.
  
  So without understanding much about it, I just concluded : "always use `-coder 1`" ... :-)
  
  
  ---
  
  