ComfyUI Node

Load Video

Load a video as a VIDEO object, not a frame explosion

By 1hew·Created about a year ago·Updated 7 days ago· 33
Load Video
    • video
    • filename
    file
    frame_limit0
    fps0
    start_skip0
    end_skip0
    format4n+1
    video_index0
    include_subdirfalse

    Sometimes you don't want the frames, you want the video. Load Video is the pack's io node that reads a video file and hands you a VIDEO object - the native video representation that video-aware nodes understand - instead of dumping every frame into an IMAGE batch. It's the direct companion to Load Video to Image: that one is for frame extraction, this one is for when the next node wants the clip itself.

    Both nodes share the same decoding engine, so the input panel will feel familiar: file, frame_limit, fps, start_skip, end_skip, format (the n/2n+1/4n+1/6n+1/8n+1 frame-count constraint, default 4n+1), video_index for folder picking, and include_subdir. The trimming semantics carry over too - skip head and tail frames, resample FPS, cap the count. All the settings you'd expect from a video loader are here, applied during decode.

    The difference is the outputs: video (a VIDEO object) and filename (a STRING with the stem). Wire the VIDEO into anything that consumes video objects - a video save node, a frame-count inspector, a video-conditioning chain. The filename string is the quiet gem: it means the rest of your graph can know what it loaded without a separate path node.

    When you'd reach for it

    Video-native workflows - editing chains, video-conditional models that want a proper VIDEO tensor, pipelines that re-encode a source clip - are the natural home. If the graph downstream keeps rejecting an IMAGE batch but lighting up when it sees a VIDEO object, this is the loader to use. It also handles folders, so a whole directory of clips can be picked by video_index and processed in one graph.

    The decode engine's requirements

    Under the hood it uses PyAV for decoding with ffmpeg/ffprobe fallbacks for probing and audio, resolving the binaries from the ComfyUI root, the bundled python_embeded folder on Windows, or FFMPEG_PATH/FFPROBE_PATH. The practical upshot: this node needs a working av install and a resolvable ffmpeg. ComfyUI's bundled environment usually has both; a custom Python environment may not.

    Installing it

    ComfyUI Manager, search "ComfyUI 1hewNodes", install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/1hew/ComfyUI-1hewNodes
    

    If you installed ComfyUI manually, verify av is present and ffmpeg is findable before blaming this node for empty outputs.

    Gotchas

    Empty video output after a decode error almost always traces back to ffmpeg resolution, not the node - set FFMPEG_PATH explicitly and retry. And that 4n+1 default applies the frame-count constraint even here, so if you expected "all frames, untouched," switch format to n. Keep this node and Load Video to Image straight: one returns a VIDEO object, the other returns frames, and mixing them up wires a type mismatch into your graph.

    Category1hewNodes/io

    Inputs (8)

    NameTypeDefaultDescription
    fileSTRING
    frame_limitINT00–100000
    fpsFLOAT00–120
    start_skipINT00–100000
    end_skipINT00–100000
    formatCOMBO4n+15 options: n, 2n+1, 4n+1, 6n+1, 8n+1
    video_indexINT0-8192–8192
    include_subdirBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    videoVIDEO
    filenameSTRING