title: Force ffmpeg to exit with error code whenever thumbnail isn't successfully created
body: <p>To get a thumbnail from an image at <code>100</code> seconds I can do <code>ffmpeg -ss 100 -i /tmp/video.mp4 -frames:v 1 -s 200x100 image.jpg</code>. However, if the video is less than <code>100</code> seconds, ffmpeg doesn't create a thumbnail but also doesn't exit with any error code, which is quite unexpected.</p>
  
  <p>The command exits with no error code (exit status of <code>0</code>). It only outputs a message on <code>stderr</code> saying <code>Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)</code>.</p>
  
  <p>I would like ffmpeg to exit with an error code under <strong>any situation where a thumbnail hasn't been created</strong>. Otherwise I'll always have to do another check from my application code after the ffmpeg command to ensure that the expected number of thumbnails has been output to the filesystem.</p>
  
  <p>Is there a way around having to do this application-level check, and force ffmpeg to fail whenever it doesn't successfully write a thumbnail to the filesystem?</p>