                       global_options="-hide_banner -nostats -v 0 -y",
                       inputs=inputs,
                       outputs=outputs)
          logger.debug("Executing: %s", ffm.cmd)
          ffm.run()
          logger.debug("Removing temp file")
          os.remove(self.video_tmp_file)
 
</s> remove         os.remove(self.video_tmp_file)
 </s> add         if os.path.isfile(self.video_tmp_file):
            os.remove(self.video_tmp_file) </s> remove             img.thumbnail((thumbnail_size, thumbnail_size))
 </s> add             width, height = img.size
            scaling = thumbnail_size / max(width, height)
            logger.debug("image width: %s, height: %s, scaling: %s", width, height, scaling)
            img = img.resize((int(width * scaling), int(height * scaling))) </s> remove         print(right, left, bottom, top)
 </s> add  </s> remove from ffmpy import FFmpeg
 </s> add from ffmpy import FFmpeg, FFRuntimeError
        # 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
                       global_options="-hide_banner -nostats -v 0 -y",
                       inputs=inputs,
                       outputs=outputs)
          logger.debug("Executing: %s", ffm.cmd)
        # 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
          logger.debug("Removing temp file")
          os.remove(self.video_tmp_file)
keep keep keep keep replace 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