          self.pathpreview = os.path.join(pathcache, "preview")
          self.pathoutput = None
          self.previewoutput = None
          self.previewtrain = dict()
          self.errcount = 0
          self.icons = dict()
          self.icons["folder"] = ImageTk.PhotoImage(file=os.path.join(
              self.pathicons, "open_folder.png"))
 
</s> remove         logger.trace("Loading Training preview images")
 </s> add         logger.debug("Loading Training preview images") </s> remove                 logger.trace("Displaying preview: '%s'", img)
 </s> add                 logger.debug("Displaying preview: '%s'", img) </s> remove         logger.trace("Image Files: %s", len(imagefiles))
        num_images = (frame_dims[0] // thumbnail_size) * (frame_dims[1] // thumbnail_size)
        if num_images > len(imagefiles):
            logger.debug("Not enough images to generate display. (to display: %s, available "
                         "images: %s)", num_images, len(imagefiles))
            self.previewoutput = None
 </s> add         # Filter to just the gui_preview if it exists in folder output
        imagefiles = [gui_preview] if gui_preview in imagefiles else imagefiles
        logger.debug("Image Files: %s", len(imagefiles))

        imagefiles = self.get_newest_filenames(imagefiles)
        if not imagefiles: </s> remove             self.previewoutput = None
 </s> add #            self.previewoutput = None
        self.previewcache = dict(modified=None,  # cache for extract and convert
                                 images=None,
                                 filenames=list(),
                                 placeholder=None)
          self.pathpreview = os.path.join(pathcache, "preview")
          self.pathoutput = None
          self.previewoutput = None
          self.previewtrain = dict()
        self.previewcache = dict(modified=None,  # cache for extract and convert
                                 images=None,
                                 filenames=list(),
                                 placeholder=None)
          self.errcount = 0
          self.icons = dict()
          self.icons["folder"] = ImageTk.PhotoImage(file=os.path.join(
              self.pathicons, "open_folder.png"))
keep keep keep add keep keep keep keep
 GUI: Preview for convert

Display preview when outputting to a stream container (e.g. video, gif) 
lib/gui/utils.py