title: Is there a way to handle discontinuities with FFMPEG?
body: <p>I am running ffmpeg like this, to get a screenshot from an HLS manifest:</p>
  
  <p><code>ffmpeg -i 'https://example.com/myfile.ism/manifest' -vframes 1 test.jpg -y</code></p>
  
  <p>There are times where there are gaps in the HLS manifest. When I run that command, it fails because it can't find a frame. Is there anything I can do to make it more resilient? ie if it fails getting the time this very second, try the second before that?</p>
  
  <p>When I watch the video in something like video.js, or even HLS directly in Safari, I see a frame regardless of gaps. It just jumps sometimes - I always see a frame.</p>
  
  <p>How would I be able to replicate that here such that the ffmpeg command will always return a frame?</p>