Nodes/ComfyUI-LoadByUrl/πŸŽ₯ Load Video by URL
ComfyUI Node

πŸŽ₯ Load Video by URL

The img2vid doorway for clips you didn't download

By romandev-codexΒ·Created 8 months agoΒ·Updated 7 months agoΒ· 0
πŸŽ₯ Load Video by URL
    • IMAGES
    • FPS
    • FIRST_FRAME
    • LAST_FRAME
    • WIDTH
    • HEIGHT
    • FRAMES
    • AUDIO
    β—„urlhttps://example.com/video.mp4β–Ί
    β—„max_seconds0.0β–Ί
    β—„select_every_nth1β–Ί
    β—„fps0.0β–Ί
    β—„skip_first_seconds0.0β–Ί
    β—„max_width0β–Ί
    β—„max_height0β–Ί
    β—„divisible_by16β–Ί

    Every image-to-video workflow starts the same way: you have a source clip, and some node needs to turn it into frames. Normally that means downloading the video, dropping it into ComfyUI's input folder, and wrestling with Load Video's file picker. LoadVideoByUrl cuts all of that out - paste a video URL, and it comes back as a ready-to-use frame batch, plus the first and last frames, the frame rate, and even the audio track, all without a single file on disk.

    It's part of the ComfyUI-LoadByUrl pack by romandev-codex, the same four-node family as the image URL loaders. No API key, no cloud - just requests.get() the file, decode it locally, and hand ComfyUI standard types. The whole pack is one file, and this is by far its most useful node: the img2vid workflow for Wan, LTX and friends hinges on feeding a model frames from an existing clip, and this is the shortest path from "URL I found" to "frames in the graph."

    The inputs that do the work

    The URL is required; the rest are all "0 means don't bother me" defaults. The four that actually matter:

    • max_seconds - cap the clip length. 0 = whole video. Set this before anything else; video models want a specific frame count, not "however long the source is."
    • skip_first_seconds - trim the opening of the clip. Useful when the URL starts with a logo sting or two seconds of nothing.
    • select_every_nth - keep one frame out of every N (default 1 = keep all). This is your cheap frame-count control: for a 60fps source and a model that wants ~25fps, select_every_nth: 2 gets you most of the way there.
    • fps - a decimation target. If it's 0, or equal to or above the source rate, you keep everything; otherwise the node picks frames to approximate that rate. Combine it with select_every_nth rather than assuming one does everything.

    max_width, max_height and divisible_by resize the frames the same way the image loaders do - scale down with LANCZOS, then center-crop to a multiple of 16 so the sampler doesn't fight your dimensions.

    What comes out

    Seven outputs, and they map cleanly onto what video workflows actually need:

    • IMAGES - the whole clip as one batched (frames, H, W, 3) tensor, ready for an I2V model's input.
    • FIRST_FRAME / LAST_FRAME - single images. First-frame conditioning is the backbone of Wan I2V (anchor a known image and animate forward), and last-frame lets you do the same from the tail.
    • FPS - the source frame rate as a float. Wire it to your video-combine node so the output clip plays at the right speed.
    • FRAMES, WIDTH, HEIGHT - ints, mostly for bookkeeping.
    • AUDIO - the clip's soundtrack, packaged as a ComfyUI AUDIO dict (waveform + sample rate). It's trimmed by the same skip_first_seconds/max_seconds you set for the video, which is a nice touch: you can grab the original audio in sync, either to recombine later or to feed an audio-reactive or lipsync stage.

    Installing and the gotchas

    ComfyUI Manager β†’ search "LoadByUrl" β†’ install ComfyUI-LoadByUrl, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/romandev-codex/ComfyUI-LoadByUrl
    

    Here's the catch this pack hides: it has no requirements.txt, and the video node needs PyAV (av), which doesn't ship with ComfyUI. Install the pack, restart, and if nothing appears under "Remhes/Remote", run pip install av into ComfyUI's Python environment and restart again. That's the single most common failure with this pack.

    A few behavior notes from the source. The whole file is buffered in RAM before decoding, so don't point it at a giant video on a small machine - that's the memory floor. There's no request timeout, so a dead URL can hang your queue. And the video node's cache key is url | max_seconds | skip_first_seconds - change only fps or select_every_nth and the node may serve the previous cached result instead of re-decoding. If tweaks don't seem to take effect, that's why: nudge one of the cache-key parameters to force a re-run.

    It won't beat a locally-stored file for reliability, but for "grab this clip from a URL and animate it," it's the whole import step in one node.

    CategoryRemhes/Remote

    Inputs (8)

    NameTypeDefaultDescription
    urlSTRINGhttps://example.com/video.mp4β€”
    max_secondsFLOAT0.00–3600β€”
    select_every_nthINT11–1000β€”
    fpsFLOAT0.00–120β€”
    skip_first_secondsFLOAT0.00–3600β€”
    max_widthINT00–10000β€”
    max_heightINT00–10000β€”
    divisible_byINT161–10000β€”

    Outputs (8)

    NameTypeDescription
    IMAGESIMAGEβ€”
    FPSFLOATβ€”
    FIRST_FRAMEIMAGEβ€”
    LAST_FRAMEIMAGEβ€”
    WIDTHINTβ€”
    HEIGHTINTβ€”
    FRAMESINTβ€”
    AUDIOAUDIOβ€”