          if err:
              logger.error(err)
              exit(0)
  
          logger.verbose("Folder exists at '%s'", self.folder)
  
      @staticmethod
      def valid_extension(filename):
          """ Check whether passed in file has a valid extension """
          extension = os.path.splitext(filename)[1]
 
</s> remove     def get_input_images(self):
        """ Return the list of images that are to be processed """
 </s> add     @property
    def images_found(self):
        """ Number of images or frames """
        if self.is_video:
            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()
        else:
            retval = len(self.input_images)
        return retval

    def check_input_folder(self):
        """ Check whether the input is a folder or video """ </s> remove         elif not os.path.isdir(self.folder):
            err = ("ERROR: The {} folder {} could not be "
 </s> add         elif not os.path.exists(self.folder):
            err = ("ERROR: The {} location {} could not be " </s> remove         sysbrowser = "folder"
 </s> add         sysbrowser = ["folder"] </s> remove     def check_folder_exists(self):
        """ makes sure that the faces folder exists """
 </s> add     @property
    def count(self):
        """ Number of faces or frames """
        if self.vid_cap:
            retval = int(self.vid_cap.get(cv2.CAP_PROP_FRAME_COUNT))  # pylint: disable=no-member
        else:
            retval = len(self.file_list_sorted)
        return retval

    def check_input_folder(self):
        """ makes sure that the frames or faces folder exists
            If frames folder contains a video file return video capture object """
        if (loadtype == "Frames" and
                os.path.isfile(self.folder) and
                os.path.splitext(self.folder)[1] in _video_extensions):
            logger.verbose("Video exists at : '%s'", self.folder)
            retval = cv2.VideoCapture(self.folder)  # pylint: disable=no-member
        else:
            logger.verbose("Folder exists at '%s'", self.folder)
            retval = None
        return retval
          if err:
              logger.error(err)
              exit(0)
  
        if (loadtype == "Frames" and
                os.path.isfile(self.folder) and
                os.path.splitext(self.folder)[1] in _video_extensions):
            logger.verbose("Video exists at : '%s'", self.folder)
            retval = cv2.VideoCapture(self.folder)  # pylint: disable=no-member
        else:
            logger.verbose("Folder exists at '%s'", self.folder)
            retval = None
        return retval
  
      @staticmethod
      def valid_extension(filename):
          """ Check whether passed in file has a valid extension """
          extension = os.path.splitext(filename)[1]
keep keep keep keep replace keep keep keep keep keep
 Add ability to extract from and convert from a video file (#559)

* Add ability to extract from and convert from a video file

* Update cli helptext. Add filebrowser button for GUI input

* Add video support to Alignments Tool 
tools/lib_alignments/media.py