title: FFMPEG loop breaks all the time asking pessing Q
body: <p>I have a sh script using FFMPEG to take one picture from RTSP streams.
  There is a timeout -stimeout to kill the connection if the connection takes too long.
  (-timout is not possible). most IP list the -stimeout works without any problems.
  But sometimes the script stops asking the user pressing -Q and the loop is broken until keypress Q.
  I already tried adding -q in the code.
  but this doesn't work at all.
  any suggestions?</p>
  <pre><code>for IP in $IPS;          
  do  
  
  FFM=&quot;$(ffmpeg -y  -stimeout 8000000 -rtsp_transport tcp -ss 0.5  -i &quot;rtsp://$IP:554/12&quot; -vframes 1 -s 640x480 -f image2 images/$IP.jpg) &gt;/dev/null&quot;
  
  done
  
  </code></pre>
  <p>Error</p>
  <pre><code>[rtsp @ 0000000000457c40] Could not find codec parameters for stream 0 (Video: h264, none, 640x352): unspecified pixel format
  Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
  Guessed Channel Layout for Input Stream #0.1 : mono
  Input #0, rtsp, from 'rtsp://123.456.789.101:554/12':
    Metadata:
      title           : 11
    Duration: N/A, start: 0.000000, bitrate: 64 kb/s
    Stream #0:0: Video: h264, none, 640x352, 90k tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
  Stream mapping:
    Stream #0:0 -&gt; #0:0 (h264 (native) -&gt; mjpeg (native))
  Press [q] to stop, [?] for help
  
  </code></pre>
  <p>ignore the dev/null  I got it wrong on purpose to see the output.</p>