Load Video to Image
Pull a video apart frame by frame, audio and all
- image
- audio
- fps
- frame_count
- filename
Video models don't eat videos - they eat batches of frames. Load Video to Image is the bridge: it decodes a video file into an IMAGE batch you can feed to an image model, plus the audio, the FPS, and a frame count, all in one go. If you're doing frame-extraction for image-to-video conditioning, keyframe work, or just mining reference footage, this is the node that does the unpacking.
It's one of a pair: Load Video returns a VIDEO object for video-native chains, while this one gives you the raw frames (and the audio) as plain tensors - which is what you actually want when the next step is a batch processor, an upscaler, or a per-frame pass.
How it decodes
Under the hood it uses PyAV for the heavy lifting and falls back to ffmpeg/ffprobe for probing and audio when needed. It resolves ffmpeg from standard locations - the ComfyUI root, the bundled python_embeded folder on Windows installs, or your FFMPEG_PATH env var - then decodes frames, lifts the first audio stream (if any) into a {"waveform": ..., "sample_rate": ...} AUDIO dict, and applies your trimming settings in order: skip frames, resample FPS, constrain format, then cap the frame count. There's even a progress bar on long decodes.
The inputs that matter:
- file - a path or a folder. With a folder,
video_indexpicks which file andinclude_subdirdecides whether to dig into subdirectories. - start_skip / end_skip - cut N frames off the head and tail before anything else. Your "skip the 3-second title card" knobs.
- fps -
0keeps the source rate; anything else resamples. Note it resamples in time, not by dropping: it re-indexes frames to hit the target rate over the same duration. - frame_limit -
0means all frames; otherwise the output is capped at this many. - format -
n,2n+1,4n+1,6n+1,8n+1(default4n+1). This is the interesting one: it constrains the frame count to a pattern some video-model families want to see (the pack's own Wan-side tooling uses the4n+1convention). If you're feeding a specific model, match its documented format; if you're just extracting stills,n(no constraint) is fine.
Outputs: image (the frame batch), audio, fps, frame_count, and filename (the stem, handy for naming what you save later).
Installing it
Via ComfyUI Manager, search "ComfyUI 1hewNodes", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes
The catch with the video nodes specifically: decoding needs a working PyAV and a resolvable ffmpeg/ffprobe. ComfyUI's bundled environment usually has both; on a hand-rolled Python install, make sure pip install av succeeded and ffmpeg is on your PATH. The rest of the pack's heavy requirements (rembg, ultralytics, ...) aren't needed for this node but come along with the repo.
Gotchas
If you get an empty image output or a decode error, it's almost always the ffmpeg resolution, not the node logic - set FFMPEG_PATH explicitly and retry. And remember 4n+1 is on by default: if you expected "all frames" and got a strangely-even count, that's the format constraint doing its job. For plain still extraction, switch it to n and move on.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| file | STRING | — | |
| frame_limit | INT | 00–100000 | — |
| fps | FLOAT | 00–120 | — |
| start_skip | INT | 00–100000 | — |
| end_skip | INT | 00–100000 | — |
| format | COMBO | 4n+1 | 5 options: n, 2n+1, 4n+1, 6n+1, 8n+1 |
| video_index | INT | 0-8192–8192 | — |
| include_subdir | BOOLEAN | false | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| audio | AUDIO | — |
| fps | FLOAT | — |
| frame_count | INT | — |
| filename | STRING | — |