title: ffmpeg progress is freezing frames when scene change
body: <p>I'm capturing data from IP camera with RTSP protocol with ffmpeg with command:</p>
  
  <pre><code>ffmpeg -rtsp_transport tcp -progress /media/kamip/stats.txt -i rtsp://192.168.1.220:554/live/h264/ch0 
  -c:v copy -c:a copy -strict 1 -map 0 -f segment -strftime 1 
  -segment_time 1800 /media/kamip/cam_%d_%m_%Y_%H_%M_%S.mkv
  </code></pre>
  
  <p>I'm using this for 5 cameras. One is different type and it is in different location.
  Because ffmpeg does not support reconnect I'm writing status to /media/kamip/stats.txt file. In another script I'm parsing this output and every 30 seconds I'm checking if frame number changed, if yes - it is ok, if not, I'm restarting above command.</p>
  
  <p>The problem is only in the night. When is quite dark and suddenly lights on, for example when car is parking, the /media/kamip/stats.txt is showing the same frame number, so my script is recognizing this as a lost connection (video freeze)</p>
  
  <p>I tried "-strict 1" option and I think it is better (one false alarm per day instead of 10 per day), so I think this may be related to ffmpeg, not camera/video source, especially because the video is fine even frame number reported by ffmpeg is still the same. Also VLC does not have this kind of problem (but I cannot use it currently for this camera)</p>
  
  <p>I found that ffmpeg has build-in scene change detector, but it should works only when encoding video (I'm using "copy" option for audio and video)?</p>
  
  <p>I'm thinking about different way of analyzing the video capturing, but this "-progress" in ffmpeg should works fine - and it is working fine for other cameras for few years).</p>
  
  <p>I also do not see any errors, 
  when I encoded one cutted file with "-loglevel debug" I saw only information like below:</p>
  
  <pre><code>[libx264 @ 0x25d77a0] scene cut at 174 Icost:2049115 Pcost:2006553 
  ratio:0.0208 bias:0.1387 gop:54 (imb:3186 pmb:168)
  </code></pre>
  
  <p>ffmpeg in latest version</p>
  
  <p><code>ffmpeg version 3.3.3-1ubuntu1~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609</code></p>
  
  <p>any help will be appreciated</p>