      # Note that other than with the subprocess calls below, ffmpeg wont hang here.
      # Worst case Python will stop/crash and ffmpeg will continue running until done.
  
      nframes = nsecs = None
      for line in out.splitlines():
          if not line.startswith(b"frame="):
              continue
          line = line.decode(errors="ignore")
          logger.debug("frame line: '%s'", line)
          idx = line.find("frame=")
 
</s> remove             proc = subprocess.Popen(cmd,
                                    stdout=subprocess.PIPE,
                                    stderr=subprocess.STDOUT,
                                    shell=iswin)
            out, _ = proc.communicate(timeout=timeout)
 </s> add             out = subprocess.check_output(cmd,
                                          stderr=subprocess.STDOUT,
                                          shell=iswin,
                                          timeout=timeout) </s> remove             proc.kill()
 </s> add 
    for line in reversed(out.splitlines()):
      # Note that other than with the subprocess calls below, ffmpeg wont hang here.
      # Worst case Python will stop/crash and ffmpeg will continue running until done.
  
      nframes = nsecs = None
    for line in reversed(out.splitlines()):
          if not line.startswith(b"frame="):
              continue
          line = line.decode(errors="ignore")
          logger.debug("frame line: '%s'", line)
          idx = line.find("frame=")
keep keep keep keep replace keep keep keep keep keep
 bugfix: Get correct frame count from videos 
lib/utils.py