Boyo Load Video Directory
Load videos from a folder as frames, audio, and VHS video info
- meta_batch
- vae
- frames
- frame_count
- audio
- video_info
- filename_text
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), orrandom(seeded). - index / seed - file selection in single/random modes.
- skip_frames / max_frames - trim the head and cap how many frames are read.
max_frames0 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.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | 3 options: single_video, incremental_video, random | |
| seed | INT | 00–18446744073709550000 | — |
| index | INT | 00–150000 | — |
| skip_frames | INT | 00–999999 | — |
| max_frames | INT | 00–999999 | — |
| memory_limit_mb | INT | 00–128000 | — |
| force_rate | INT | 00–60 | — |
| label | STRING | Boyo Video Batch 001 | — |
| path | STRING | — | |
| pattern | STRING | * | — |
| meta_batchopt | VHS_BatchManager | — | |
| vaeopt | VAE | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| frames | IMAGE | — |
| frame_count | INT | — |
| audio | AUDIO | — |
| video_info | VHS_VIDEOINFO | — |
| filename_text | STRING | — |