{"record":{"id":"bd7447d5455daa10","repo":"deepfakes/faceswap","slug":"the-file-chosen-as-the-reference-video-is-not-a-vi","errorCode":null,"errorMessage":"The file chosen as the reference video is not a video, either leave the field blank or type 'None': {self.ref_vid.path}","messagePattern":"The file chosen as the reference video is not a video, either leave the field blank or type 'None': (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/effmpeg/effmpeg.py","lineNumber":199,"sourceCode":"            If provided arguments are not valid\n        \"\"\"\n        if self.args.action in self._actions_have_dir_input and not self.input.is_type(\"dir\"):\n            raise ValueError(\"The chosen action requires a directory as its input, but you \"\n                             f\"entered: {self.input.path}\")\n        if self.args.action in self._actions_have_vid_input and not self.input.is_type(\"vid\"):\n            raise ValueError(\"The chosen action requires a video as its input, but you entered: \"\n                             f\"{self.input.path}\")\n        if self.args.action in self._actions_have_dir_output and not self.output.is_type(\"dir\"):\n            raise ValueError(\"The chosen action requires a directory as its output, but you \"\n                             f\"entered: {self.output.path}\")\n        if self.args.action in self._actions_have_vid_output and not self.output.is_type(\"vid\"):\n            raise ValueError(\"The chosen action requires a video as its output, but you entered: \"\n                             f\"{self.output.path}\")\n\n        # Check that ref_vid is a video when it needs to be\n        if self.args.action in self._actions_req_ref_video:\n            if self.ref_vid.is_type(\"none\"):\n                raise ValueError(\"The file chosen as the reference video is not a video, either \"\n                                 f\"leave the field blank or type 'None': {self.ref_vid.path}\")\n        elif self.args.action in self._actions_can_use_ref_video:\n            if self.ref_vid.is_type(\"none\"):\n                logger.warning(\"Warning: no reference video was supplied, even though \"\n                               \"one may be used with the chosen action. If this is \"\n                               \"intentional then ignore this warning.\")\n\n    def _set_times(self) -> None:\n        \"\"\"Set start, end and duration attributes\"\"\"\n        self.start = self.parse_time(self.args.start)\n        self.end = self.parse_time(self.args.end)\n        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\"\"\"","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/deepfakes/faceswap/blob/f530cb7508ae670f6474f8a7d9c4df94705cf96b/tools/effmpeg/effmpeg.py#L181-L217","documentation":"EFFmpeg tool validation: the chosen action requires a reference video (--ref-video), but the given path is typed 'none' (missing, or literally 'None'), so the action cannot proceed. The message tells you to blank the field or type 'None' only when no reference is intended — here one is mandatory.","triggerScenarios":"Running an action in _actions_req_ref_video (e.g. mux-h264/h265 style jobs that need stream parameters from the reference) with --ref-video omitted, empty, misspelled so it resolves to none, or set to the literal string 'None'.","commonSituations":"GUI users leaving the reference field blank; CLI users omitting the flag; path typos or a non-video reference file making DataItem classify it as 'none'.","solutions":["Supply a valid reference video: `--ref-video /path/to/ref.mp4`.","Verify the reference file exists and is a real video container.","If you intended to run without a reference, choose an action that does not require one (see effmpeg -h)."],"exampleFix":"# before\npython tools.py effmpeg -a mux-mp4 -i frames/ -o out.mp4   # ref-video omitted\n\n# after\npython tools.py effmpeg -a mux-mp4 -i frames/ -o out.mp4 --ref-video original.mp4","handlingStrategy":"validation","validationCode":"import os\n\ndef ref_video_ok(path: str | None) -> bool:\n    return bool(path) and path != \"None\" and os.path.isfile(path)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["For mux-style actions, always pass the original source video as --ref-video.","In GUI configs, template the reference field with the source video path."],"tags":["faceswap","effmpeg","ffmpeg","reference-video","cli-arguments"],"backgroundTag":null,"analyzedSha":"f530cb7508ae670f6474f8a7d9c4df94705cf96b","analyzedAt":"2026-08-15T02:59:26.626Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}