  from lib.convert import Converter
  from lib.faces_detect import DetectedFace
  from lib.gpu_stats import GPUStats
  from lib.multithreading import MultiThread, PoolProcess, total_cpus
  from lib.queue_manager import queue_manager
  from lib.utils import get_folder, get_image_paths, hash_image_file
  from plugins.extract.pipeline import Extractor
  from plugins.plugin_loader import PluginLoader
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
 
</s> remove from time import sleep
 </s> add  </s> remove             cap = cv2.VideoCapture(self.args.input_dir)  # pylint: disable=no-member
            retval = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))  # pylint: disable=no-member
            cap.release()
 </s> add             retval = int(im_ffm.count_frames_and_secs(self.args.input_dir)[0]) </s> remove             retval = int(self.vid_cap.get(cv2.CAP_PROP_FRAME_COUNT))  # pylint: disable=no-member
 </s> add             retval = int(im_ffm.count_frames_and_secs(self.folder)[0])
from lib.queue_manager import queue_manager, QueueEmpty
  from lib.convert import Converter
  from lib.faces_detect import DetectedFace
  from lib.gpu_stats import GPUStats
  from lib.multithreading import MultiThread, PoolProcess, total_cpus
from lib.queue_manager import queue_manager, QueueEmpty
  from lib.utils import get_folder, get_image_paths, hash_image_file
  from plugins.extract.pipeline import Extractor
  from plugins.plugin_loader import PluginLoader
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
keep keep keep keep replace keep keep keep keep keep
 bugfix: Stop convert hanging at the last few frames on some input videos 
scripts/convert.py