title: FFMPEG: extract a fram from a live stream once every 5 seconds
body: <p>I'm tryin gto extract a single frame from a live stream, every 5 seconds without using the -vf option. I'm using a Raspberry Pi so CPU is all important.</p>
  
  <p>Basically, I'm streaming a UDP stream from a live source, which uses very little CPU but I want to take a snapshot every 5 seconds.</p>
  
  <p>This works, but only produces a single image.</p>
  
  <pre><code>-c copy -f mpegts udp://239.0.0.1:1234 -vcodec copy -vframes 1 out.png
  </code></pre>
  
  <p>This works, but uses all the CPU and more.</p>
  
  <pre><code>-c copy -f mpegts udp://239.0.0.1:1234 -vcodec copy -vf fps=1 out%d.png
  </code></pre>
  
  <p>Anyone know if I can do this without using a filter? My other solution is to run a second ffmpeg and connect to the UDP stream, which is really cumbersome. </p>