      -------
      >>> filename = "/path/to/video.mp4"
      >>> frame_count = count_frames(filename)
      """
      assert isinstance(filename, str), "Video path must be a string"
  
      cmd = [im_ffm.get_ffmpeg_exe(), "-i", filename, "-map", "0:v:0"]
      if fast:
          cmd.extend(["-c", "copy"])
      cmd.extend(["-f", "null", "-"])
 
</s> remove             retval = int(count_frames(self.args.input_dir))
 </s> add             retval = int(count_frames(self.args.input_dir, fast=True))
    logger.debug("filename: %s, fast: %s", filename, fast)
      -------
      >>> filename = "/path/to/video.mp4"
      >>> frame_count = count_frames(filename)
      """
    logger.debug("filename: %s, fast: %s", filename, fast)
      assert isinstance(filename, str), "Video path must be a string"
  
      cmd = [im_ffm.get_ffmpeg_exe(), "-i", filename, "-map", "0:v:0"]
      if fast:
          cmd.extend(["-c", "copy"])
      cmd.extend(["-f", "null", "-"])
keep keep keep add keep keep keep keep keep keep
 Reinstate fast frame count for convert and extract. Exit early if count is wrong. 
lib/image.py