                  continue
  
              frame = os.path.basename(filename)
              if self.extract_faces:
                  convert_item = self.detect_faces(filename)
              else:
                  convert_item = self.alignments_faces(filename, frame)
  
              if not convert_item:
                  continue
 
</s> remove                 convert_item = self.alignments_faces(filename, frame)
 </s> add                 detected_faces = self.alignments_faces(frame, image) </s> remove             if not convert_item:
 </s> add             if not detected_faces: </s> remove             image, detected_faces = convert_item
 </s> add  </s> remove         src = os.path.join(self.folder, filename)
        logger.trace("Loading image: '%s'", src)
        image = cv2.imread(src)  # pylint: disable=no-member
 </s> add         if self.vid_cap:
            image = self.load_video_frame(filename)
        else:
            src = os.path.join(self.folder, filename)
            logger.trace("Loading image: '%s'", src)
            image = cv2.imread(src)  # pylint: disable=no-member
        return image

    def load_video_frame(self, filename):
        """ Load a requested frame from video """
        frame = os.path.splitext(filename)[0]
        logger.trace("Loading video frame: '%s'", frame)
        frame_no = int(frame[frame.rfind("_") + 1:])
        self.vid_cap.set(cv2.CAP_PROP_POS_FRAMES, frame_no)  # pylint: disable=no-member
        _, image = self.vid_cap.read()
                detected_faces = self.detect_faces(filename, image)
                  continue
  
              frame = os.path.basename(filename)
              if self.extract_faces:
                detected_faces = self.detect_faces(filename, image)
              else:
                  convert_item = self.alignments_faces(filename, frame)
  
              if not convert_item:
                  continue
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 
scripts/convert.py