          except subprocess.CalledProcessError as err:
              out = err.output.decode(errors="ignore")
              raise RuntimeError("FFMEG call failed with {}:\n{}".format(err.returncode, out))
          except subprocess.TimeoutExpired as err:
              proc.kill()
              this_attempt = attempt + 1
              if this_attempt == attempts:
                  msg = ("FFMPEG hung while attempting to obtain the frame count. "
                         "Sometimes this issue resolves itself, so you can try running again. "
                         "Otherwise use the Effmpeg Tool to extract the frames from your video into "
 
</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     for line in out.splitlines():
 </s> add     for line in reversed(out.splitlines()):
          except subprocess.CalledProcessError as err:
              out = err.output.decode(errors="ignore")
              raise RuntimeError("FFMEG call failed with {}:\n{}".format(err.returncode, out))
          except subprocess.TimeoutExpired as err:

              this_attempt = attempt + 1
              if this_attempt == attempts:
                  msg = ("FFMPEG hung while attempting to obtain the frame count. "
                         "Sometimes this issue resolves itself, so you can try running again. "
                         "Otherwise use the Effmpeg Tool to extract the frames from your video into "
keep keep keep keep replace keep keep keep keep keep
 bugfix: Get correct frame count from videos 
lib/utils.py