                  raise
              if output == "" and self.process.poll() is not None:
                  break
              if output:
                  if (self.command == "train" and self.capture_loss(output)) or (
                          self.command != "train" and self.capture_tqdm(output)):
                      continue
                  if self.command == "train" and output.strip().endswith("saved models"):
                      logger.debug("Trigger update preview")
                      self.wrapper.tk_vars["updatepreview"].set(True)
                  print(output.strip())
 
</s> remove         _inputs = {input_.path: _input_opts, ref_vid.path: _ref_vid_opts}
 </s> add         _inputs = OrderedDict([(input_.path, _input_opts), (ref_vid.path, _ref_vid_opts)]) </s> remove         _output_opts = '-vf fps="' + str(fps) + '" '
 </s> add         _fps_arg = '-r ' + str(fps) + ' '
        _input_opts += _fps_arg + "-f image2 "
        _output_opts = _fps_arg </s> remove             _inputs = {_input_path: _input_opts, ref_vid.path: None}
 </s> add             _inputs = OrderedDict([(_input_path, _input_opts), (ref_vid.path, None)])
                if ((self.command == "train" and self.capture_loss(output)) or
                        (self.command == "effmpeg" and self.capture_ffmpeg(output)) or
                        (self.command not in ("train", "effmpeg") and self.capture_tqdm(output))):
                  raise
              if output == "" and self.process.poll() is not None:
                  break
              if output:
                if ((self.command == "train" and self.capture_loss(output)) or
                        (self.command == "effmpeg" and self.capture_ffmpeg(output)) or
                        (self.command not in ("train", "effmpeg") and self.capture_tqdm(output))):
                if ((self.command == "train" and self.capture_loss(output)) or
                        (self.command == "effmpeg" and self.capture_ffmpeg(output)) or
                        (self.command not in ("train", "effmpeg") and self.capture_tqdm(output))):
                      continue
                  if self.command == "train" and output.strip().endswith("saved models"):
                      logger.debug("Trigger update preview")
                      self.wrapper.tk_vars["updatepreview"].set(True)
                  print(output.strip())
keep keep keep keep replace replace keep keep keep keep keep
 Fix effmpeg fps detection and better GUI handling 
lib/gui/wrapper.py