Nodes/WAS Node Suite v3/Load Video (Advanced)
ComfyUI Node Runs on cloud

Load Video (Advanced)

A clip becomes frames, audio, and metadata in one pull

By WASasquatch·Created 3 years ago·Updated 4 days ago· 1,844
Load Video (Advanced)
    • video
    • images
    • audio
    • metadata
    file
    num_frames16
    strategyuniform
    nth1
    seed0
    target_fps0.00
    resize_modefit and pad
    width0
    height0
    start0
    end-1
    max_size1024
    interpolationlanczos
    alignmiddle center
    pad_color#000000
    channelsRGB

    Load Video (Advanced) is the one video-input node that hands you the whole clip in a single pull: the frames as an image batch, the video itself with its audio, and a metadata object describing the read. No decoding steps, no ffmpeg incantation, no "extract every frame to a folder first". You pick a file, you get a batch. The "(Advanced)" is there because it sits in a suite with a Load Video (Upload) sibling for remote files and a Video Info node for reading clips without the batch overhead - this one is the full-fat version.

    It's part of WAS Node Suite (menu WAS Suite/IO), whose v3 rewrite builds video I/O on ComfyUI's own media stack - no packages for you to install, which is rarer in video land than it should be.

    How it works

    The file menu lists videos across ComfyUI's input, output, and temp folders - each entry tagged (clip.mp4 [input]) so you never guess where a file lives. There's an upload button that drops a file into input and selects it, and an in-node player shows what's selected, so you can check the clip before it ever reaches the sampler.

    The frame selection is the part worth understanding, because a clip can hold thousands of frames and a batch is one tensor in memory. num_frames defaults to 16 and strategy decides which 16 you get:

    • uniform - evenly spaced, a contact sheet of the whole clip
    • head / center / tail - the start, middle, or end, which actually play as a run
    • random - a seeded pick
    • every_nth - every nth frame

    nth thins the pool first (2 means "every other frame") and applies to every strategy. start/end limit the range the strategy may choose from, with negatives counting back from the end (-60 starts sixty frames before the last). Set num_frames to 0 to take every frame in range up to a 4096 ceiling - useful, memory-expensive.

    target_fps is the subtle one: 0 keeps the file's own rate; a lower rate drops frames and a higher one repeats them so the clip runs for the same duration either way. Set it to 8 or 16 to match what a video model expects to see. Sizing works like the suite's image loaders - width/height at 0 keep the encoded size, and max_size (default 1024) caps the longest edge so a 4K clip doesn't try to fill VRAM in one batch.

    What comes out

    Four wires, and they're all useful at once:

    • video (VIDEO) - the kept frames with their sound, at the output rate. Wire into the suite's Save Video (Advanced).
    • images (IMAGE) - the same frames as one batch, in playback order. This is the wire for anything that samples per-frame, or for an image-to-video pipeline that wants a first/last frame pair.
    • audio (AUDIO) - the sound for the kept span. Empty when the file is silent - check has_audio in the metadata before wiring it into a save.
    • metadata (WAS_VIDEO_METADATA) - rate, frame count, size, duration, bit depth, whether there's sound. Video Metadata unpacks any of them to a number you can act on.

    Installing it

    Standard WAS Node Suite install: ComfyUI Manager → "WAS Node Suite v3", or

    cd ComfyUI/custom_nodes
    git clone https://github.com/WASasquatch/was-node-suite-comfyui.git
    

    restart, done. ComfyUI 0.14.0+ and Python 3.10+ are the requirements; the pack ships no pip dependencies, and video decoding rides ComfyUI's own media stack.

    Where people get burned

    Two things trip people up. First, defaulting to 16 frames: if you expect the whole clip on the images wire, you get a 16-frame sample instead - raise num_frames or set 0, and mind VRAM. Second, target_fps and strategy are easy to confuse: uniform spreads across the whole clip (great for picking diverse stills), while head/tail are what you want when you need consecutive frames that actually animate. And if the audio output comes back empty on a video you know has sound, it's usually that the kept frame range doesn't include the audio track - check the metadata before assuming the file is silent.

    CategoryWAS Suite/IO

    Inputs (16)

    NameTypeDefaultDescription
    fileCOMBOWhich video to read. Each entry carries the folder it sits in: `clip.mp4 [input]`, `render.mp4 [output]`, `scratch.mp4 [temp]`. The button below uploads one into input and selects it, and the player shows what is selected.
    num_framesINT160–4096How many frames to keep, chosen by the strategy below. 16 by default, because a clip can hold thousands and a batch is one tensor in memory. 0 takes every frame in the range, up to the 4096 ceiling.
    strategyCOMBOuniformHow num_frames are chosen. uniform = evenly spaced; head = first; center = middle; tail = last; random = a seeded pick; every_nth = every nth. uniform gives a contact sheet of a whole clip, head gives a run that plays.
    nthINT11–16384Step between the frames the strategy may choose from. 1 uses every frame; 2 thins to every other one first, so `head` takes the opening of the clip on alternate frames. It applies to every strategy.
    seedINT00–18446744073709550000Seed for random, so a re-run keeps the same frames. Ignored by the other strategies. Any whole number; `0` is as good a seed as any.
    target_fpsFLOAT0.000–240Rate the frames come out at. 0 keeps the file's own. A lower rate drops frames and a higher one repeats them, so the clip runs for the same time either way. Set it to match a model that wants 8 or 16 fps.
    resize_modeCOMBOfit and padHow each frame meets the size below. `fit and pad` keeps the whole frame and pads the rest, `fill and crop` fills the size and trims the overhang, `stretch` distorts to fit, `crop or pad` never resamples.
    widthINT00–16384Width every frame is brought to. 0 takes the width the file was encoded at, which is what loads a clip at its own size.
    heightINT00–16384Height every frame is brought to. 0 takes the height the file was encoded at.
    startoptINT0-16384–16384First frame to consider, counting from 0 through the file's own frames. Negative counts back from the end, so -60 starts sixty frames before it.
    endoptINT-1-16384–16384Last frame to consider, inclusive. -1 is the final frame, which is the whole clip together with a start of 0.
    max_sizeoptINT10240–16384Longest edge the derived size is held to, keeping the aspect. Only read when width and height are 0, which is where a 4K clip would otherwise fill memory. 0 lifts the cap.
    interpolationoptCOMBOlanczosResampling filter. `lanczos` is the sharpest for a downscale.
    alignoptCOMBOmiddle centerWhich part of a frame survives a crop, and which side carries the wider bar of a pad.
    pad_coloroptSTRING#000000Fill for space a frame does not cover. Any Pillow colour.
    channelsoptCOMBORGBChannels the image batch carries. `RGBA` keeps the pad transparent. The video output is always colour, since a video carries no transparency.

    Outputs (4)

    NameTypeDescription
    videoVIDEOThe frames that were kept, with their sound, as a video at the rate below. Wire it into Save Video, or into any node taking a VIDEO.
    imagesIMAGEThe same frames as one image batch, in playback order, every one at the same size.
    audioAUDIOThe sound playing under the frames that were kept, from where they start and for as long as they run. Empty when the file is silent, so read has_audio before wiring this into a save node.
    metadataWAS_VIDEO_METADATAWhat this read measured: the rate, the frame count, the size, the duration, the bit depth and whether there is sound, beside the same figures for the file itself. Wire it into Video Metadata to read any of them as a number.