          logger.debug("Initialized %s", self.__class__.__name__)
  
      def output_filename(self, filename):
          """ Return the output filename with the correct folder and extension
              NB: The plugin must have a config item 'format' that contains the
                  file extension to use this method """
          filename = os.path.splitext(os.path.basename(filename))[0]
 
</s> remove         logger.trace("num_images: %s", num_images)
 </s> add         logger.debug("num_images: %s", num_images) </s> remove         filenames, samples = self.get_preview_samples(imagefiles, num_images, thumbnail_size)
        show_image = self.place_previews(samples, frame_dims)
        logger.trace("Displaying preview: '%s'", filenames)
 </s> add         self.load_images_to_cache(imagefiles, frame_dims, thumbnail_size)
        if imagefiles == [gui_preview]:
            # Delete the preview image so that the main scripts know to output another
            logger.debug("Deleting preview image")
            os.remove(imagefiles[0])
        show_image = self.place_previews(frame_dims)
        logger.debug("Displaying preview: '%s'", self.previewcache["filenames"]) </s> remove         for _ in tqdm(range(self.total_count), desc="Converting", file=sys.stdout):
 </s> add         write_preview = self.args.redirect_gui and self.writer.is_stream
        preview_image = os.path.join(self.writer.output_folder, ".gui_preview.jpg")
        logger.debug("Write preview for gui: %s", write_preview)
        for idx in tqdm(range(self.total_count), desc="Converting", file=sys.stdout): </s> remove         logger.trace("Getting size: '%s'", name)
 </s> add         logger.debug("Getting size: '%s'", name)
    @property
    def is_stream(self):
        """ Return whether the writer is a stream or images
            Writers that write to a stream have a frame_order paramater to dictate
            the order in which frames should be written out (eg. gif/ffmpeg) """
        retval = hasattr(self, "frame_order")
        return retval

          logger.debug("Initialized %s", self.__class__.__name__)
  
    @property
    def is_stream(self):
        """ Return whether the writer is a stream or images
            Writers that write to a stream have a frame_order paramater to dictate
            the order in which frames should be written out (eg. gif/ffmpeg) """
        retval = hasattr(self, "frame_order")
        return retval

      def output_filename(self, filename):
          """ Return the output filename with the correct folder and extension
              NB: The plugin must have a config item 'format' that contains the
                  file extension to use this method """
          filename = os.path.splitext(os.path.basename(filename))[0]
keep add keep keep keep keep keep
 GUI: Preview for convert

Display preview when outputting to a stream container (e.g. video, gif) 
plugins/convert/writer/_base.py