Nodes/ComfyUI-MediaUtilities/MediaUtilities_VideoURLLoader
ComfyUI Node

MediaUtilities_VideoURLLoader

Turn any direct video URL into frames, without leaving ComfyUI

By ThanaritKanjanametawatAU·Created about a year ago·Updated about a year ago· 3
MediaUtilities_VideoURLLoader
    • FRAMES
    • frame_count
    • audio
    • video_info
    urlhttps://example.com/video.mp4
    force_rate0
    force_size
    custom_width512
    custom_height512
    frame_load_cap0
    skip_first_frames0
    select_every_nth1

    This is the flagship node of the ComfyUI-MediaUtilities pack, and the one that justifies installing it. MediaUtilities_VideoURLLoader takes a direct URL to a video file, downloads it, and hands you back frames, the audio track, and metadata - all inside the graph. No manual download, no local file juggling, no ffmpeg command line. Paste a link, get a tensor.

    Why you'd reach for it

    The standard workflow looks like this: you found a clip online that you want to use as reference or conditioning input for a video generation pass (the Wan/LTX/SVD-style img2vid loop), and you want it in the graph, resized and frame-limited to exactly what the model needs. This node is that on-ramp. It's also genuinely useful for pulling reference frames from a hosted video and dropping them straight into an IMAGE pipeline.

    What it outputs and how the pipeline flows

    Four outputs, each with a distinct job:

    • FRAMES (IMAGE) - the extracted frames as a tensor. This is the one that feeds samplers, conditioning, or a preview node.
    • frame_count (INT) - how many frames you actually got after all the filtering. Handy for display or for wiring into batch logic.
    • audio (AUDIO) - the video's audio track, best-effort. Runs into Save Audio or into the pack's Save Video.
    • video_info (VHS_VIDEOINFO) - a metadata dict in VideoHelperSuite's format (source and loaded fps, resolution, duration). Feed it to VideoPreview or any VHS node.

    The outputs plug together cleanly with the rest of the pack: FRAMESVideoPreview to eyeball, audioSaveAudio to archive the soundtrack, and everything → SaveVideo for a final export with audio mixed back in.

    The inputs that actually matter

    Seven inputs, and you'll realistically touch three of them:

    • url - the direct link to the video (.mp4, .webm, .mkv, .mov, .avi). Must be a direct media URL, not a webpage.
    • frame_load_cap - max frames to extract. Set it to 0 (the default) for the whole video, or cap it for a shorter, faster run.
    • select_every_nth - extract every Nth frame, a cheap way to thin out a long clip.
    • skip_first_frames - drop this many frames from the start, handy for skipping intros.
    • force_rate - 0 keeps the source rate; anything else resamples the extraction to that fps.
    • force_size - Disabled keeps original dimensions; the presets (like 512x768) force exact sizes; Custom Height/Custom Width resize while preserving aspect ratio; Custom uses custom_width × custom_height exactly.

    How it works

    The mechanism is straightforward but worth understanding for its limits. It streams the URL to a temporary file on disk (via requests), opens it with OpenCV, reads metadata, and walks through the frames applying your rate/size/filter settings. Audio is a separate, more fragile step: it tries to decode the track with torchaudio from the same temp file, and if that fails it silently returns empty audio. The downloaded file is deleted afterward.

    Where people get burned

    It re-downloads the whole file every single run. There's no caching. Big videos make for slow graphs, and a 100 MB clip re-fetched each execution adds up fast.

    Failures are silent. If the URL is dead, the site blocks bots, or the video can't be opened, the node returns a black 512×512 frame, empty audio, and zeroed metadata instead of erroring. Your graph "succeeds" and you get black output that looks like a model problem when it's actually a download problem. Check the console for Error loading video from URL before debugging your sampler.

    It needs a direct link. Hotlink-protected hosts and pages-with-a-video-in-it will fail - you want the raw file URL (or a signed one).

    Audio is best-effort. It relies on torchaudio being able to decode the container; MP4/AAC usually works, some WebM/VP9/Opus combos won't, and you'll get silence plus a log line.

    Install

    ComfyUI Manager (search "ComfyUI-MediaUtilities") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ThanaritKanjanametawatAU/ComfyUI-MediaURLLoader
    cd ComfyUI-MediaURLLoader
    pip install -r requirements.txt
    

    Restart to pick it up. No model files. The real dependencies are opencv-python (frame decoding) and torchaudio (audio), plus requests for the download.

    One more README trap: the pack's own manual-install instructions contain a placeholder URL (github.com/your-username/...) and the wrong repo name. Use the one above. This is a small single-author pack (v1.1.1, mid-2025) with essentially no community footprint yet - for a load node that's acceptable, but if you're building something critical around it, be ready to own the troubleshooting.

    CategoryMediaUtilities

    Inputs (8)

    NameTypeDefaultDescription
    urlSTRINGhttps://example.com/video.mp4
    force_rateINT00–60
    force_sizeCOMBO7 options: Disabled, Custom Height, Custom Width, Custom, 512x512, 512x768, +1
    custom_widthINT51264–2048
    custom_heightINT51264–2048
    frame_load_capINT00–1000
    skip_first_framesINT00–1000
    select_every_nthINT11–100

    Outputs (4)

    NameTypeDescription
    FRAMESIMAGE
    frame_countINT
    audioAUDIO
    video_infoVHS_VIDEOINFO