Nodes/Boyonodes/Boyo Load Video Directory
ComfyUI Node

Boyo Load Video Directory

Load videos from a folder as frames, audio, and VHS video info

By DragonDiffusionbyBoyo·Created 2 years ago·Updated 26 days ago· 16
Boyo Load Video Directory
  • meta_batch
  • vae
  • frames
  • frame_count
  • audio
  • video_info
  • filename_text
mode
seed0
index0
skip_frames0
max_frames0
memory_limit_mb0
force_rate0
labelBoyo Video Batch 001
path
pattern*

If you do batch video work in ComfyUI, this is a useful loader to know. Boyo Load Video Directory scans a folder for video files, loads one (by index, incrementally, or at random), and hands you the whole package: decoded frames, frame count, audio, and a VHS-style video info dict. It's a port of DJZ's LoadVideoDirectoryV2 with the audio handling fixed and Boyonodes integration bolted on - the kind of node you'd otherwise rewire from three separate loaders.

It speaks VHS natively: the meta_batch optional input takes a VHS_BatchManager, so it slots into VideoHelperSuite batch pipelines, and video_info output is a VHS_VIDEOINFO for downstream VHS nodes. Frames stream through a generator rather than loading the entire file at once, which matters when a folder holds long clips and you're trying not to blow up RAM.

The inputs that matter

  • path - directory to scan. Supports glob patterns via pattern (default *).
  • mode - single_video (by index), incremental_video (advance each run), or random (seeded).
  • index / seed - file selection in single/random modes.
  • skip_frames / max_frames - trim the head and cap how many frames are read. max_frames 0 means "all of them."
  • memory_limit_mb - hard cap on memory for decoded frames; 0 auto-calculates from available RAM.
  • force_rate - override the source FPS (0 = keep the file's own).
  • vae - optional; when supplied it encodes frames to latent as part of the load.

Outputs: frames (IMAGE batch), frame_count (INT), audio (AUDIO, if the file has a stream), video_info (VHS_VIDEOINFO), and filename_text (STRING).

Install

Part of Boyonodes. ComfyUI Manager → search "Boyonodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/DragonDiffusionbyBoyo/Boyonodes

This one has real dependencies, unlike the pack's pure-Python nodes. It needs opencv-python (for cv2), psutil (for the memory guard), and for the audio output it shells out to ffmpeg-python plus a system FFmpeg binary - install FFmpeg with choco install ffmpeg (Windows), brew install ffmpeg (macOS), or sudo apt-get install ffmpeg (Linux), then pip install opencv-python psutil ffmpeg-python.

Gotchas

The path must exist or it throws loudly. If the video has no audio stream, audio comes back None - your audio-dependent downstream nodes need to tolerate that. And watch the memory math: 4K frames decoded as float32 are ~50 MB each, so memory_limit_mb isn't optional decoration on big files. Start with max_frames or skip_frames if a folder of long clips is making ComfyUI sweat.

CategoryBoyoNodes/video

Inputs (12)

NameTypeDefaultDescription
modeCOMBO3 options: single_video, incremental_video, random
seedINT00–18446744073709550000
indexINT00–150000
skip_framesINT00–999999
max_framesINT00–999999
memory_limit_mbINT00–128000
force_rateINT00–60
labelSTRINGBoyo Video Batch 001
pathSTRING
patternSTRING*
meta_batchoptVHS_BatchManager
vaeoptVAE

Outputs (5)

NameTypeDescription
framesIMAGE
frame_countINT
audioAUDIO
video_infoVHS_VIDEOINFO
filename_textSTRING