{"record":{"id":"06023f173af7717c","repo":"Comfy-Org/ComfyUI","slug":"video-width-must-be-at-least-min-width-px-got-w","errorCode":null,"errorMessage":"Video width must be at least {min_width}px, got {width}px","messagePattern":"Video width must be at least (.+?)px, got (.+?)px","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/util/validation_utils.py","lineNumber":110,"sourceCode":"    _assert_ratio_bounds(ar, min_ratio=min_ratio, max_ratio=max_ratio, strict=strict)\n    return ar\n\n\ndef validate_video_dimensions(\n    video: Input.Video,\n    min_width: int | None = None,\n    max_width: int | None = None,\n    min_height: int | None = None,\n    max_height: int | None = None,\n):\n    try:\n        width, height = video.get_dimensions()\n    except Exception as e:\n        logging.error(\"Error getting dimensions of video: %s\", e)\n        return\n\n    if min_width is not None and width < min_width:\n        raise ValueError(f\"Video width must be at least {min_width}px, got {width}px\")\n    if max_width is not None and width > max_width:\n        raise ValueError(f\"Video width must be at most {max_width}px, got {width}px\")\n    if min_height is not None and height < min_height:\n        raise ValueError(f\"Video height must be at least {min_height}px, got {height}px\")\n    if max_height is not None and height > max_height:\n        raise ValueError(f\"Video height must be at most {max_height}px, got {height}px\")\n\n\ndef validate_video_duration(\n    video: Input.Video,\n    min_duration: float | None = None,\n    max_duration: float | None = None,\n):\n    try:\n        duration = video.get_duration()\n    except Exception as e:\n        logging.error(\"Error getting duration of video: %s\", e)\n        return","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/util/validation_utils.py#L92-L128","documentation":"ValueError from validate_video_dimensions when the video's width is below the node/API minimum. Width/height come from video.get_dimensions() on an Input.Video object; if that call itself throws, the validator logs and silently returns (no error), so this raise only happens with a successfully-read but undersized video.","triggerScenarios":"validate_video_dimensions(video, min_width=N) with width < N — e.g., a 480px-wide clip passed to a video API node requiring min_width=768.","commonSituations":"Low-resolution source footage; mobile-landscape clips fed to providers with HD minimums; downscaling in the workflow before the API node.","solutions":["Upscale or re-export the video so width >= min_width.","Use higher-resolution source footage.","Pick a node/provider with lower minimum width requirements."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"width, height = video.get_dimensions()\nif width < MIN_W:\n    raise ValueError(f\"video too narrow: {width}px < {MIN_W}px\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check provider minimum resolution before exporting footage","Prefer HD-or-wider source clips for video API nodes"],"tags":["validation","video","dimensions"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}