  from math import ceil
  
  import imageio
  import imageio_ffmpeg as im_ffm
  from ffmpy import FFmpeg
  
  from ._base import Output, logger
  
  
  class Writer(Output):
 
</s> remove from PIL import Image, ImageTk
 </s> add from PIL import Image, ImageDraw, ImageTk </s> remove         ffm.run()
 </s> add         # Sometimes ffmpy exits for no discernible reason, but then works on a later attempt,
        # so take 5 shots at this
        attempts = 5
        for attempt in range(attempts):
            logger.debug("Muxing attempt: %s", attempt + 1)
            try:
                ffm.run()
            except FFRuntimeError as err:
                logger.debug("ffmpy runtime error: %s", str(err))
                if attempt != attempts - 1:
                    continue
                logger.error("There was a problem muxing audio. The output video has been "
                             "created but you will need to mux audio yourself either with the "
                             "EFFMpeg tool or an external application.")
                os.rename(self.video_tmp_file, self.video_file)
            break </s> remove         print(right, left, bottom, top)
 </s> add  </s> remove         os.remove(self.video_tmp_file)
 </s> add         if os.path.isfile(self.video_tmp_file):
            os.remove(self.video_tmp_file)
from ffmpy import FFmpeg, FFRuntimeError
  from math import ceil
  
  import imageio
  import imageio_ffmpeg as im_ffm
from ffmpy import FFmpeg, FFRuntimeError
  
  from ._base import Output, logger
  
  
  class Writer(Output):
keep keep keep keep replace keep keep keep keep keep
 Fixups

GUI: Fix thumbnail calculation + add borders
cv2-dnn aligner: Remove debug code
Convert: FFMpeg plugin - retry muxing audio on failure and properly error handle 
plugins/convert/writer/ffmpeg.py