{"record":{"id":"7c7b2c5362f9f820","repo":"deepfakes/faceswap","slug":"no-fps-input-or-reference-video-was-supplied-hen","errorCode":null,"errorMessage":"No fps, input or reference video was supplied, hence it's not possible to '{self.args.action}'.","messagePattern":"No fps, input or reference video was supplied, hence it's not possible to '(.+?)'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/effmpeg/effmpeg.py","lineNumber":229,"sourceCode":"        if not self.__check_equals_time(self.args.end, \"00:00:00\"):\n            self.duration = self.__get_duration(self.start, self.end)\n        else:\n            self.duration = self.parse_time(str(self.args.duration))\n\n    def _set_fps(self) -> None:\n        \"\"\"Set :attr:`arguments.fps` based on input arguments\"\"\"\n        # If fps was left blank in gui, set it to default -1.0 value\n        if self.args.fps == \"\":\n            self.args.fps = str(-1.0)\n\n        # Try to set fps automatically if needed and not supplied by user\n        if self.args.action in self._actions_req_fps \\\n                and self.__convert_fps(self.args.fps) <= 0:\n            if self.__check_have_fps([\"r\", \"i\"]):\n                _error_str = \"No fps, input or reference video was supplied, \"\n                _error_str += \"hence it's not possible to \"\n                _error_str += f\"'{self.args.action}'.\"\n                raise ValueError(_error_str)\n            if self.output.fps is not None and self.__check_have_fps([\"r\", \"i\"]):\n                self.args.fps = self.output.fps\n            elif self.ref_vid.fps is not None and self.__check_have_fps([\"i\"]):\n                self.args.fps = self.ref_vid.fps\n            elif self.input.fps is not None and self.__check_have_fps([\"r\"]):\n                self.args.fps = self.input.fps\n\n    def process(self):\n        \"\"\"EFFMPEG Process\"\"\"\n        logger.debug(\"Running Effmpeg\")\n        # Format action to match the method name\n        self.args.action = self.args.action.replace(\"-\", \"_\")\n        logger.debug(\"action: '%s'\", self.args.action)\n\n        # Instantiate input DataItem object\n        self.input = DataItem(path=self.args.input)\n\n        # Instantiate output DataItem object","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/deepfakes/faceswap/blob/f530cb7508ae670f6474f8a7d9c4df94705cf96b/tools/effmpeg/effmpeg.py#L211-L247","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Pass an explicit fps: `--fps 25` (or the source video's rate).","Or supply the original source video as --ref-video so its fps can be auto-detected.","Verify the input video's fps with ffprobe if unsure which value to use."],"exampleFix":"# before\npython tools.py effmpeg -a mux-mp4 -i frames/ -o out.mp4 --ref-video src.mp4   # src lacks fps -> ValueError\n\n# after\npython tools.py effmpeg -a mux-mp4 -i frames/ -o out.mp4 --fps 25","handlingStrategy":"validation","validationCode":"def fps_supplied_or_detectable(fps: str, input_is_video: bool, ref_is_video: bool) -> bool:\n    try:\n        return float(fps) > 0 or input_is_video or ref_is_video\n    except ValueError:\n        return input_is_video or ref_is_video","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass --fps explicitly when muxing frames that came from a video you know the rate of.","Keep the source video alongside extracted frames so it can serve as --ref-video for fps detection."],"tags":["faceswap","effmpeg","ffmpeg","fps","metadata"],"backgroundTag":null,"analyzedSha":"f530cb7508ae670f6474f8a7d9c4df94705cf96b","analyzedAt":"2026-08-15T02:59:26.626Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}