deepfakes/faceswap · error · ValueError
You have not supplied a valid transpose or degrees value:\nt
Error message
You have not supplied a valid transpose or degrees value:\ntranspose: {transpose}\ndegrees: {degrees} What it means
EFFmpeg rotate action argument error: both --transpose and --degrees were None (or otherwise not supplied), so the method has no rotation instruction to build the ffmpeg -vf filter from. Raised as ValueError before ffmpeg is invoked.
Source
Thrown at tools/effmpeg/effmpeg.py:415
logger.info(" %s: %s", key, val)
# return out
@staticmethod
def rescale(input_=None, output=None, scale=None, # pylint:disable=unused-argument
exe=None, **kwargs):
"""Rescale Video"""
_input_opts = Effmpeg._common_ffmpeg_args[:]
_output_opts = '-y -vf scale="' + str(scale) + '"'
_inputs = {input_.path: _input_opts}
_outputs = {output.path: _output_opts}
Effmpeg.__run_ffmpeg(exe=exe, inputs=_inputs, outputs=_outputs)
@staticmethod
def rotate(input_=None, output=None, degrees=None, # pylint:disable=unused-argument
transpose=None, exe=None, **kwargs):
"""Rotate Video"""
if transpose is None and degrees is None:
raise ValueError("You have not supplied a valid transpose or degrees value:\n"
f"transpose: {transpose}\ndegrees: {degrees}")
_input_opts = Effmpeg._common_ffmpeg_args[:]
_output_opts = "-y -c:a copy -vf "
_bilinear = ""
if transpose is not None:
_output_opts += 'transpose="' + str(transpose) + '"'
elif int(degrees) != 0:
if int(degrees) % 90 == 0 and int(degrees) != 0:
_bilinear = ":bilinear=0"
_output_opts += 'rotate="' + str(degrees) + '*(PI/180)'
_output_opts += _bilinear + '" '
_inputs = {input_.path: _input_opts}
_outputs = {output.path: _output_opts}
Effmpeg.__run_ffmpeg(exe=exe, inputs=_inputs, outputs=_outputs)
@staticmethodView on GitHub (pinned to f530cb7508)
Solutions
- Add --transpose N (0=90CCW+flip, 1=90CW, 2=90CCW, 3=90CW+flip) for quarter turns.
- Or add --degrees D (e.g. 180, or arbitrary like 45) for a rotate filter with PI/180 math.
- Supply exactly one of the two; if both are given, transpose wins per the code.
Example fix
# before python tools.py effmpeg -a rotate -i in.mp4 -o out.mp4 # after python tools.py effmpeg -a rotate -i in.mp4 -o out.mp4 --degrees 180
Defensive patterns
Strategy: type-guard
Validate before calling
def rotate_args_valid(transpose, degrees) -> bool:
return transpose is not None or degrees is not None Type guard
def is_rotate_spec(transpose, degrees) -> bool:
"""Exactly one of transpose/degrees must be provided for effmpeg rotate."""
return transpose is not None or degrees is not None Prevention
- Make rotate wrappers require one of --transpose/--degrees at arg-parse time.
- Document the 0-3 transpose codes next to the wrapper for future reference.
When it happens
Trigger: Calling `python tools.py effmpeg -a rotate -i in.mp4 -o out.mp4` with neither --transpose (0–3 quarter-turn codes) nor --degrees (e.g. 90/180) provided, or both explicitly empty from the GUI.
Common situations: GUI users assuming a default rotation; CLI users unaware rotate needs exactly one of the two flags; older command syntax carried over where the argument names differed.
Related errors
- The chosen action requires a directory as its input, but you
- The chosen action requires a video as its input, but you ent
- The chosen action requires a directory as its output, but yo
- The chosen action requires a video as its output, but you en
- The file chosen as the reference video is not a video, eithe
AI-assisted analysis of deepfakes/faceswap@f530cb7508 (2026-08-15).
Data as JSON: /api/errors/b7014cc675959106.
Report an issue: GitHub.