          logger.debug("Converting images")
          save_queue = queue_manager.get_queue("convert_out")
          patch_queue = queue_manager.get_queue("patch")
          pool = PoolProcess(self.converter.process, patch_queue, save_queue,
                             completion_queue=completion_queue,
                             processes=self.pool_processes)
          pool.start()
 
</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])
        completion_queue = queue_manager.get_queue("patch_completed")
          logger.debug("Converting images")
          save_queue = queue_manager.get_queue("convert_out")
          patch_queue = queue_manager.get_queue("patch")
        completion_queue = queue_manager.get_queue("patch_completed")
          pool = PoolProcess(self.converter.process, patch_queue, save_queue,
                             completion_queue=completion_queue,
                             processes=self.pool_processes)
          pool.start()
keep keep add keep keep keep keep
 bugfix: Stop convert hanging at the last few frames on some input videos 
scripts/convert.py