title: convert raw video .y4m to mpg video with certain GOP
body: <p>I want to compress a raw video <strong>.y4m</strong> to <strong>mpg</strong>, and I want then to extract the frames from the mpg video, I need the GOP of the compression to be <code>:IBBPBBPBBPBBPBBIBBP....15:2</code></p>
  
  <p>I used this command:</p>
  
  <pre><code>ffmpeg -i video.ym4 -vcodec libx264 -sameq -y -r 30 output.avi 2&gt;list.txt
  ffmpeg -i output.avi -vcodec libx264 -y -sameq -vf showinfo -y -f image2 image%3d.jpeg -r 30 2&gt;list1.txt
  </code></pre>
  
  <p>The output contains only 2 I frames, <code>100 P</code> and <code>198 B</code> frames, it is not <code>15:2 GOP</code>, what to do?</p>
  
  <p>I need one <code>I-frame</code> every 15 frames, and the pattern to b <code>IBBPBBP..</code></p>
  
  <p>Sorry, Im new to <code>ffmpeg</code>, please help me, this is the input to my project, it is the important step to me.</p>