title: Using FFMPEG select video filter with -ss on input
body: <p>I'm currently using an ffmpeg command like this, where I want to select very particular video frames from between (say) 6 and 8 seconds into the video:</p>
  
  <pre><code>ffmpeg
    -t 10
    -i test/timer.mp4
    -ss 6
    -vf "select=eq(ceil(n * 1 / 29.97) + 1\, ceil((n+1) * 1 / 29.97)) * lt(n\, 8 * 29.97)"
    tmp/%07d.png
  </code></pre>
  
  <p>However, this makes ffmpeg decode the entire video up to 6s because the <code>-ss</code> comes after the <code>-i</code>. How can I change this command to still do the video filter based on <em>absolute</em> timestamp into the video? For instance,</p>
  
  <pre><code>ffmpeg
    -ss 6
    -t 4
    -i test/timer.mp4
    -vf "select=eq(ceil(n * 1 / 29.97) + 1\, ceil((n+1) * 1 / 29.97)) * lt(n\, 8 * 29.97)"
    tmp/%07d.png
  </code></pre>
  
  <p>Is <em>not</em> equivalent because <code>n</code> now refers to the frame number starting <em>after</em> 6s into the video. This ends up selecting different frames.</p>
  
  <p>Any way to reference the input video's absolute timestamp or frame number when using <code>-ss</code> on it?</p>