Nodes/ComfyUI Silver Nodes/Silver Folder Video Loader
ComfyUI Node

Silver Folder Video Loader

Extract Frames — and the Audio Track — From a Video in Your Folder

By SilverAndJade·Created about a year ago·Updated 24 days ago· 0
Silver Folder Video Loader
    • images
    • filenames
    • current_index
    • frame_rate
    • audio
    folder_path
    frame_cap0
    frame_rate_force0
    start_frame0
    current_index0
    action
    sort_by
    sort_orderascending

    Most video loaders give you frames and stop there. Silver Folder Video Loader gives you the frames and the audio track, which is a genuinely rare combination in the ComfyUI ecosystem - it's the node to reach for when you want both sides of a clip, like sampling a video's visuals while also feeding its audio into an audio-reactive pipeline. It reads one video from a folder per run, decodes its frames into an IMAGE batch, and hands you the native frame rate and the soundtrack as an AUDIO tensor.

    How it works

    OpenCV (cv2.VideoCapture) opens the file and reads frames. Three inputs shape that read: start_frame skips ahead, frame_cap limits how many frames you get back, and frame_rate_force downsamples - if the source runs at 30 fps and you ask for 10, it grabs every third frame instead of decoding everything. The native fps is returned alongside. The audio side is where this node is unusual: instead of decoding audio eagerly, it builds a lazy map that only shells out to ffmpeg when something actually reads the audio output - cutting the audio segment to match your frame range. That's a good design, but it means ffmpeg has to be on your system PATH or the audio output silently comes back empty.

    Inputs that matter

    • folder_path - absolute path to a directory containing video files (.mp4, .avi, .mkv, .mov, .wmv, .flv, .webm).
    • frame_cap - the one you must not forget. 0 means no cap, i.e. every frame in the video. For a long clip that's thousands of frames and an instant OOM.
    • frame_rate_force - 0 keeps the native rate; anything above 0 downsamples to that many fps.
    • start_frame - skip the first N frames.
    • action / sort_by / sort_order - the same stepping-and-sorting trio as the other folder nodes.

    Outputs

    • images - the frame batch, wired straight into your video-to-video chain.
    • filenames - the video path.
    • current_index - the running index, so you know which file you processed.
    • frame_rate - the video's native fps as a FLOAT.
    • audio - an AUDIO dict with waveform and sample_rate, if ffmpeg cooperated.

    Gotchas

    frame_cap = 0 is a trap. The node loads one video per run (the one at current_index - there's no batching here), and an uncapped long clip can blow through VRAM before you notice. Cap your frames or force a low frame rate for anything longer than a few seconds. And the dependency story is worth knowing: the requirements.txt lists moviepy, but the audio path that actually ships shells out to ffmpeg - so install ffmpeg on your system (most ComfyUI setups already have it, but a bare Docker image may not) or accept silent missing audio. This is also the heaviest node in the pack, dependency-wise; if it's the only reason you installed the pack, the OpenCV + ffmpeg stack is still a fair price for frames-plus-audio.

    Install

    ComfyUI Manager → search "ComfyUI Silver Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SilverAndJade/comfyui-silver-nodes
    

    Restart ComfyUI after cloning. If the node complains on import, run pip install -r requirements.txt in your ComfyUI venv.

    Categoryvideo

    Inputs (8)

    NameTypeDefaultDescription
    folder_pathSTRING
    frame_capINT00–1000
    frame_rate_forceFLOAT00–60
    start_frameINT0
    current_indexINT00–1000000
    actionCOMBO5 options: fixed, increment, decrement, increment_wrap, reset
    sort_byCOMBO4 options: name, created, modified, size
    sort_orderCOMBOascending2 options: ascending, descending

    Outputs (5)

    NameTypeDescription
    imagesIMAGE
    filenamesSTRING
    current_indexINT
    frame_rateFLOAT
    audioAUDIO