              logger.trace("Rendering from cache. Frame no: %s", save_no)
              self.writer.append_data(save_image[:, :, ::-1])
          logger.trace("Current cache size: %s", len(self.cache))
  
      def close(self):
          """ Close the ffmpeg writer and mux the audio """
          self.writer.close()
          self.mux_audio()
  
      def mux_audio(self):
 
</s> remove             self.writer.append_data(save_image[:, :, ::-1])
 </s> add             self._writer.append_data(save_image[:, :, ::-1]) </s> remove         self.writer.close()
        self.mux_audio()
 </s> add         self._writer.close()
        self._mux_audio()

    def _mux_audio(self) -> None:
        """ Mux audio the audio to the generated video temp file. </s> remove             save_no = self.frame_order.pop(0)
 </s> add             save_no = self._frame_order.pop(0) </s> remove     def mux_audio(self):
        """ Mux audio
 </s> add  </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
        """
    def close(self) -> None:
              logger.trace("Rendering from cache. Frame no: %s", save_no)
              self.writer.append_data(save_image[:, :, ::-1])
          logger.trace("Current cache size: %s", len(self.cache))
  
    def close(self) -> None:
          """ Close the ffmpeg writer and mux the audio """
          self.writer.close()
          self.mux_audio()
  
      def mux_audio(self):
keep keep keep keep replace keep keep keep keep keep
 ffmpeg writer: Create new filename if output pre-exists 
plugins/convert/writer/ffmpeg.py