title: Translating ffmpeg command line to C++ codec settings
body: <p>I've been doing some work in ffmpeg for a while in C++.
  Most of the help regarding encoder settings is explained as command line options.
  For example (taken from the ffmpeg site):</p>
  
  <pre><code>-mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 100 -pass 1/2’ 
  </code></pre>
  
  <p><em>but beware the ’-g 100’ might cause problems with some decoders. Things to try:</em></p>
  
  <pre><code> ’-bf 2’, ’-flags qprd’, ’-flags mv0’, ’- flags skiprd.
  </code></pre>
  
  <p>This is not really usefull when you want to set these options in C.
  For example I managed to find <em>int trellis;</em> in the <em>AVCodecContext</em> struct so that is one solved, but what about the others?</p>
  
  <p>Is there a way to determine what command line parameters correspond to what AVCodecContext members ?
  I tried setting them like this:</p>
  
  <pre><code>AVCodecContext* c;
  av_opt_set_int(c-&gt;priv_data, "cmp", 2, 0);
  </code></pre>
  
  <p>But this returns an error code that the option does not exist.
  I've also tried:</p>
  
  <pre><code>  av_opt_set(c-&gt;priv_data, "cmp", "2", 0);
  </code></pre>
  
  <p>I still get the error that the option does not exist.</p>
  
  <p><strong>So, is there a way to determine what AVCodecContext members I should set that are equivalent to the ffmpeg command line parameters above ?</strong></p>