Nodes/ComfyUI-AI-CustomURL/Load Video (AI CustomURL)
ComfyUI Node

Load Video (AI CustomURL)

Pull a remote video and turn it into frame-by-frame IMAGE batches

By bowtiedbluefin·Created 10 months ago·Updated 10 months ago· 3
Load Video (AI CustomURL)
    • frames
    • info
    url
    start_frame0
    frame_count0
    skip_frames1
    resize_modenone
    target_width512
    target_height512

    Video-to-video work in ComfyUI starts the same way every time: get the video into individual frames. If the video is on disk, the built-in loaders handle it. If it's a URL - a hosted generation result, a clip on the web - this node does the whole job: download, decode, resample, and hand you an IMAGE batch where each frame is a tensor. Combined with the video generation node in this pack, it closes the loop on "generate a hosted video, then process the frames locally."

    How it works

    Three steps, and it's worth knowing the order because it explains the dependencies. First it streams the file down with requests (8KB chunks, 60-second timeout) into a temp file. Then OpenCV's cv2.VideoCapture decodes it - this is the node that actually justifies opencv-python in the pack's requirements. Finally each frame is converted BGR→RGB, normalized to 0–1, and stacked into a (N, H, W, C) tensor, which is your frames output.

    The resampling controls are where this node earns its keep:

    • start_frame - skip ahead N frames before you start grabbing.
    • frame_count - how many frames to pull; 0 means "until the end."
    • skip_frames - grab every Nth frame. 1 takes everything, 2 takes every other, etc. This is the cheap way to get a stable 10-fps frame set out of a 60-fps clip.
    • resize_mode - none, fit, or fill, combined with target_width/target_height. fit scales to fit inside the target box, preserving aspect ratio; fill stretches to exactly fill it.

    The info output is a plain string describing what you got - frame count, source resolution, and fps - which is handy for feeding a workflow that needs to know the timing.

    Installing it

    Part of the ComfyUI-AI-CustomURL pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bowtiedbluefin/ComfyUI-AI-CustomURL
    cd ComfyUI-AI-CustomURL
    pip install -r requirements.txt
    

    Or ComfyUI Manager → search "AI CustomURL", restart. This is one of the two nodes in the pack (with Save Video) that pull real weight on the opencv-python dependency - if you manually install and skip requirements, this node will be the first thing that breaks.

    Common issues

    • Black frames on failure. Same pack behavior as the image loader: on any error it returns a blank tensor plus the error message in info. Watch the console for the real cause.
    • Large files, long waits. Everything downloads fully to a temp file before a single frame is decoded, so a 100MB clip means 100MB over your connection first.
    • Auth-gated URLs won't load. No headers, no cookies - public URLs only.

    Small, single-author pack, thin community footprint - but for the specific job of "remote video → local frames," this node is straightforward and does it in one shot.

    Categoryai_customurl

    Inputs (7)

    NameTypeDefaultDescription
    urlSTRING
    start_frameINT00–10000
    frame_countINT00–10000
    skip_framesINT11–100
    resize_modeCOMBOnone3 options: none, fit, fill
    target_widthINT51264–4096
    target_heightINT51264–4096

    Outputs (2)

    NameTypeDescription
    framesIMAGE
    infoSTRING