                                    quality=None,
                                    macro_block_size=8,
                                    output_params=self.output_params)
  
      def write(self, filename, image):
          """ Frames come from the pool in arbitrary order, so cache frames
              for writing out in correct order """
          logger.trace("Received frame: (filename: '%s', shape: %s", filename, image.shape)
          if not self.output_dimensions:
              logger.info("Outputting to: '%s'", self.video_file)
              self.set_dimensions(image.shape[:2])
              self.writer = self.get_writer()
 
</s> remove                                   output_params=self.output_params)
 </s> add                                   output_params=self._output_params) </s> remove         if not self.output_dimensions:
            logger.info("Outputting to: '%s'", self.video_file)
            self.set_dimensions(image.shape[:2])
            self.writer = self.get_writer()
 </s> add         if not self._output_dimensions:
            self._set_dimensions(image.shape[:2])
            self._writer = self._get_writer() </s> remove         self.save_from_cache()
 </s> add         self._save_from_cache() </s> remove     def cache_frame(self, filename, image):
        """ Add the incoming frame to the cache """
 </s> add     def cache_frame(self, filename, image) -> None:
        """ Add the incoming converted frame to the cache ready for writing out.

        Used for ffmpeg and gif writers to ensure that the frames are written out in the correct
        order.

        Parameters
        ----------
        filename: str
            The filename of the incoming frame, where the frame index can be extracted from
        image: class:`numpy.ndarray`
            The converted frame corresponding to the given filename
        """ </s> remove         out_filename = "{}.{}".format(filename, self.config["format"])
 </s> add         out_filename = f"{filename}.{self.config['format']}"
    def write(self, filename: str, image) -> None:
        """ Frames come from the pool in arbitrary order, so frames are cached for writing out
        in the correct order.

        Parameters
        ----------
        filename: str
            The incoming frame filename.
        image: :class:`numpy.ndarray`
            The converted image to be written
        """
                                    quality=None,
                                    macro_block_size=8,
                                    output_params=self.output_params)
  
    def write(self, filename: str, image) -> None:
        """ Frames come from the pool in arbitrary order, so frames are cached for writing out
        in the correct order.

        Parameters
        ----------
        filename: str
            The incoming frame filename.
        image: :class:`numpy.ndarray`
            The converted image to be written
        """
    def write(self, filename: str, image) -> None:
        """ Frames come from the pool in arbitrary order, so frames are cached for writing out
        in the correct order.

        Parameters
        ----------
        filename: str
            The incoming frame filename.
        image: :class:`numpy.ndarray`
            The converted image to be written
        """
    def write(self, filename: str, image) -> None:
        """ Frames come from the pool in arbitrary order, so frames are cached for writing out
        in the correct order.

        Parameters
        ----------
        filename: str
            The incoming frame filename.
        image: :class:`numpy.ndarray`
            The converted image to be written
        """
          logger.trace("Received frame: (filename: '%s', shape: %s", filename, image.shape)
          if not self.output_dimensions:
              logger.info("Outputting to: '%s'", self.video_file)
              self.set_dimensions(image.shape[:2])
              self.writer = self.get_writer()
keep keep keep keep replace replace replace keep keep keep keep keep
 ffmpeg writer: Create new filename if output pre-exists 
plugins/convert/writer/ffmpeg.py