title: Select keyframe closest to a particular instant with FFMPEG
body: <p>I have an MP4 video created by some third party software. I am not aware if the keyframes are at regular intervals or not. I have been successful in extracting a video frame corresponding to the 3rd minute (180 seconds * frames/s) with FFMPEG.</p>
  <p>What I want to do is extract the &quot;closest&quot; keyframe to the third minute - since it is often the case that the frame that I extract with the currently successful code is NOT a keyframe and therefore blurry.</p>
  <p>I know there is a way to extract <em>all</em> keyframes in FFMPEG, but is there a way to extract the keyframe closest to a particular time in a video?</p>