Nodes/CoachBate/CoachBate Load Videos With Audio
ComfyUI Node

CoachBate Load Videos With Audio

Every video in a folder — frames and audio — in one grab

By CoachBate·Created 2 months ago·Updated 6 days ago· 0
CoachBate Load Videos With Audio
    • IMAGE
    • AUDIO
    folderX://insert/path/
    force_rate0
    custom_width0
    custom_height0
    frame_load_cap0
    skip_first_frames0
    select_every_nth1

    You just rendered a batch of clips - say, a Shot Loader run that produced one MP4 per shot - and now you want them all loaded into ComfyUI so you can stitch them into a final video. Stock ComfyUI loads one video at a time and usually drops the audio track entirely. CoachBate Load Videos With Audio does what the name says: it loads every video in a folder, concatenates all their frames into a single image batch, and merges all their audio tracks into one combined audio output.

    It sits right in the middle of the pack's production flow - this is the node that turns a folder of rendered shots into something VHS Video Combine can re-encode as one finished movie with sound.

    How it works

    Under the hood it leans on ComfyUI-VideoHelperSuite's load_video (which is why VHS is a hard requirement), then does two passes over the results. Videos are processed in alphabetical order - so name your shots 001-..., 002-..., etc. to control the order. Audio gets merged to the highest sample rate found across all clips, with channels normalized (mono is upgraded to stereo, 5.1 stays as-is). Clips with no audio track are handled gracefully: the node fills their duration with silence rather than breaking the timeline. Its IS_CHANGED method hashes the folder listing, so adding or renaming a file makes it re-run instead of being skipped by ComfyUI's cache.

    Inputs that matter

    • folder - absolute path to the folder. Supported extensions: webm, mp4, mkv, gif, mov, avi.
    • force_rate - override every video's framerate. 0 (default) uses each source's own FPS.
    • custom_width / custom_height - resize frames. 0 = keep source resolution.
    • frame_load_cap, skip_first_frames, select_every_nth - trimming controls, straight from VHS. 0 cap = load everything; select_every_nth = 2 loads every other frame.

    The outputs

    • IMAGE - all frames concatenated in sequence as one batch, (N, H, W, 3).
    • AUDIO - the merged, time-aligned audio track.

    Wire the IMAGE into anything that eats an image batch, and the AUDIO into a VHS save/combine node. In the typical flow you'd pass both into VHS Video Combine (or the pack's CoachBate Video Combine wrapper) to get a single MP4 with its soundtrack intact.

    Common issues

    • "Folder not found" / "No video files found" - loud errors, and they mean exactly that. Check the path (and use forward slashes on Windows).
    • Downstream breaks on mixed resolutions - each video is loaded with its own source size unless you force one. An image batch with mismatched shapes will blow up later, so if your clips differ in size, set custom_width / custom_height to normalize them.
    • "Requires ComfyUI-VideoHelperSuite" - it's not optional here. Install VHS, restart, then this node appears.

    Installation

    Install the pack via ComfyUI Manager (search "CoachBate") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/CoachBate/ComfyUI-CoachBate.git
    

    Then install ComfyUI-VideoHelperSuite the same way (Manager search "VideoHelperSuite"), and restart ComfyUI. The pack itself has no Python deps - VHS is the only thing this node leans on. Everything's alpha-stage personal tooling, but this one's stable enough that it's a regular part of the author's own render pipeline.

    CategoryCoachBate

    Inputs (7)

    NameTypeDefaultDescription
    folderSTRINGX://insert/path/Absolute path to the folder containing video files (webm, mp4, mkv, gif, mov, avi).
    force_rateFLOAT00–60Override framerate for all loaded videos. Set to 0 to use each video's source FPS.
    custom_widthINT00–4096Resize each video frame to this width in pixels. Set to 0 to use source width.
    custom_heightINT00–4096Resize each video frame to this height in pixels. Set to 0 to use source height.
    frame_load_capINT00–10000Maximum number of frames to load per video. Set to 0 to load all frames.
    skip_first_framesINT00–10000Number of frames to skip at the start of each video.
    select_every_nthINT11–1000Load every Nth frame only. 1 loads all frames, 2 loads every other frame, etc.

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    AUDIOAUDIO