deepfakes/faceswap · error · ValueError

No fps, input or reference video was supplied, hence it's no

Error message

No fps, input or reference video was supplied, hence it's not possible to '{self.args.action}'.

What it means

EFFmpeg fps resolution failure: the chosen action needs a frames-per-second value, --fps was left blank (defaulted to -1.0), and none of the automatic sources could supply it — the check __check_have_fps(["r","i"]) is true, meaning neither a usable reference video nor input video fps is available at this point.

Source

Thrown at tools/effmpeg/effmpeg.py:229

        if not self.__check_equals_time(self.args.end, "00:00:00"):
            self.duration = self.__get_duration(self.start, self.end)
        else:
            self.duration = self.parse_time(str(self.args.duration))

    def _set_fps(self) -> None:
        """Set :attr:`arguments.fps` based on input arguments"""
        # If fps was left blank in gui, set it to default -1.0 value
        if self.args.fps == "":
            self.args.fps = str(-1.0)

        # Try to set fps automatically if needed and not supplied by user
        if self.args.action in self._actions_req_fps \
                and self.__convert_fps(self.args.fps) <= 0:
            if self.__check_have_fps(["r", "i"]):
                _error_str = "No fps, input or reference video was supplied, "
                _error_str += "hence it's not possible to "
                _error_str += f"'{self.args.action}'."
                raise ValueError(_error_str)
            if self.output.fps is not None and self.__check_have_fps(["r", "i"]):
                self.args.fps = self.output.fps
            elif self.ref_vid.fps is not None and self.__check_have_fps(["i"]):
                self.args.fps = self.ref_vid.fps
            elif self.input.fps is not None and self.__check_have_fps(["r"]):
                self.args.fps = self.input.fps

    def process(self):
        """EFFMPEG Process"""
        logger.debug("Running Effmpeg")
        # Format action to match the method name
        self.args.action = self.args.action.replace("-", "_")
        logger.debug("action: '%s'", self.args.action)

        # Instantiate input DataItem object
        self.input = DataItem(path=self.args.input)

        # Instantiate output DataItem object

View on GitHub (pinned to f530cb7508)

Solutions

  1. Pass an explicit fps: `--fps 25` (or the source video's rate).
  2. Or supply the original source video as --ref-video so its fps can be auto-detected.
  3. Verify the input video's fps with ffprobe if unsure which value to use.

Example fix

# before
python tools.py effmpeg -a mux-mp4 -i frames/ -o out.mp4 --ref-video src.mp4   # src lacks fps -> ValueError

# after
python tools.py effmpeg -a mux-mp4 -i frames/ -o out.mp4 --fps 25
Defensive patterns

Strategy: validation

Validate before calling

def fps_supplied_or_detectable(fps: str, input_is_video: bool, ref_is_video: bool) -> bool:
    try:
        return float(fps) > 0 or input_is_video or ref_is_video
    except ValueError:
        return input_is_video or ref_is_video

Prevention

When it happens

Trigger: Running an fps-requiring action (e.g. mux-type jobs) with --fps blank, where the input is a frames directory and the reference video is absent or itself lacks fps metadata, so the fallback chain (output.fps / ref_vid.fps / input.fps) yields nothing.

Common situations: Muxing frames produced by convert/extract into a video without specifying the original video as reference; corrupted source video with missing fps metadata; GUI default of blank fps carried through.

Related errors


AI-assisted analysis of deepfakes/faceswap@f530cb7508 (2026-08-15). Data as JSON: /api/errors/7c7b2c5362f9f820. Report an issue: GitHub.