π Batch Video Loader
It's a video 'loader' that never decodes a frame β and that's the point
- video_path
- filename
- video_number
- position
- total_videos
You've got a folder of 40 short clips named 1.mp4 through 40.mp4 and you want to run each one through an upscaler, an interpolator, or any model that only handles one video at a time. ComfyUI has no built-in "next file" button, which is exactly the gap this node fills. Batch Video Loader turns the number you type into the path of the video that number refers to, so a batch job can march through a folder one clip at a time.
The first thing to unlearn is the name. It doesn't decode anything, touch a frame, or call an API. Under the hood it's a os.listdir() call: it scans the folder, keeps only files whose names are exactly a number plus a supported extension (.mp4, .mov, .avi, .mkv, .webm), sorts them numerically, and hands back a path string. You then feed that path to whatever actually reads video - another pack's load-video node, an ffmpeg wrapper, or SageVR 2 for upscaling, which is the author's stated use case. It's a path resolver wearing a loader's name. Once you know that, nothing it does will surprise you.
That naming rule matters more than any other detail: files must be pure digits. 1.mp4, 2.mp4 - not clip_001.mp4, not sceneA.mp4. Anything with a letter in the stem is invisible to the node. Extensions are read case-insensitively, so 3.MOV still counts.
The three inputs
- folder_path - absolute path to the folder. Plain text field, no browse button, so slashes and typos are on you. A wrong path raises a
FileNotFoundErrorthat names the folder it couldn't find. - video_number - an INT from 1 to 9999, default 1. What it means depends on mode.
- mode - the one real decision:
skip_missing(default) orexact_number.
skip_missing treats the number as a position in whatever files actually exist. Folder has 1.mp4, 3.mp4, 5.mp4? Position 1 loads 1.mp4, position 2 loads 3.mp4 (skipping the hole), position 3 loads 5.mp4. No crash when your sequence has gaps - which is precisely the case you're in during a batch run where one render failed and left a hole. exact_number does what it sounds like: video_number = 3 loads 3.mp4 and throws if it isn't there, listing what is available in the error so you can see your own folder.
Five outputs, but you'll mostly touch one
video_path (STRING) is the workhorse - wire it into whatever actually consumes the file. The rest are metadata: filename (3.mp4), video_number (the real file number, 3), position (its 1-based slot in the sorted list), and total_videos (how many numbered files exist). total_videos earns its keep: feed it to your batch logic so you know how many runs you're committing to before you start.
Install
Zero dependencies. This is pure Python stdlib - no torch, no ffmpeg, no model downloads, nothing to configure. Via ComfyUI Manager, search "Batch Video Loader" and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/skakjskj189212-tech/comfyui-batch-video-loader
Restart ComfyUI and it shows up under Video β Batch.
Where people get burned
The biggest trap is expecting video frames out of it. It outputs a path, full stop. Connect video_path to a display node and you'll see a string, not a clip.
The second is driving a batch. There's no auto-increment knob: you set video_number per run. That's fine for a handful of clips you queue by hand, but for a real 40-clip batch you'll want to feed video_number from a loop or batch-iteration mechanism that supplies one value per run, rather than retyping it 40 times. And when a run fails partway, remember skip_missing exists precisely so one missing file doesn't torch the rest of the queue.
If a run seems to do nothing, watch the ComfyUI console - the node logs [BatchVideoLoader] Mode=... | Requested=... and then a line naming exactly which file it loaded. That one log line has saved me more than once.
The pack is tiny and the author (skakjskj189212-tech) has no real footprint, so set expectations accordingly: no hidden dependencies, nothing to maintain, and it either does this one job for you or it's useless to you. For its narrow job - resolving numbered clips for a batch pass - it's the simplest thing that works.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | β | |
| video_number | INT | 11β9999 | β |
| mode | COMBO | skip_missing | 2 options: skip_missing, exact_number |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| video_path | STRING | β |
| filename | STRING | β |
| video_number | INT | β |
| position | INT | β |
| total_videos | INT | β |