{"record":{"id":"85f8622bde03fd21","repo":"Comfy-Org/ComfyUI","slug":"video-height-must-be-at-least-min-height-px-got","errorCode":null,"errorMessage":"Video height must be at least {min_height}px, got {height}px","messagePattern":"Video height must be at least (.+?)px, got (.+?)px","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/util/validation_utils.py","lineNumber":114,"sourceCode":"def 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\n\n    epsilon = 0.0001\n    if min_duration is not None and min_duration - epsilon > duration:\n        raise ValueError(f\"Video duration must be at least {min_duration}s, got {duration}s\")","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/util/validation_utils.py#L96-L132","documentation":"ValueError from validate_video_dimensions when the video's height is below the required minimum. Height comes from video.get_dimensions(); a failure to read dimensions is logged and swallowed (returns None), so this error means the video was read fine but is genuinely too short vertically.","triggerScenarios":"validate_video_dimensions(video, min_height=N) with height < N — e.g., a 480p clip into a node requiring min_height=720.","commonSituations":"SD-resolution sources; wide cinematic crops with short height; workflows that downscale video before an API node.","solutions":["Upscale or re-export at height >= min_height.","Use HD-or-taller source footage.","Switch to a node/model with lower minimum height."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"_, height = video.get_dimensions()\nif height < MIN_H:\n    raise ValueError(f\"video too short: {height}px < {MIN_H}px\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use HD-or-taller sources for video API nodes","Avoid over-downscaling video in the workflow"],"tags":["validation","video","dimensions"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}