PM Video Loader
Frames, audio, and the source file, all out of one node
- images
- audio
- frame_count
- video
Video loaders are where ComfyUI's video pipeline starts, and this one packs the whole start into a single node. PM Video Loader takes a video file and gives you four things at once: the frames as an IMAGE batch (ready for the sampler or an img2vid pipeline), the extracted audio as AUDIO, the frame count as an INT, and the source video as a VIDEO object you can hand to a save node. It's the PM Manager pack's take on the classic VHS-style video loader - a heavy-ish node with real controls, wrapped in the pack's nicer picker UI.
How it works
Under the hood it's a hybrid. Frames come from OpenCV's VideoCapture, which decodes the clip frame by frame - that's why the pack's requirements include opencv-python. Audio comes from ffmpeg, using either imageio-ffmpeg's bundled binary or a system ffmpeg if one is available. There's a memory guard built in (via psutil) that estimates how many frames fit in RAM and stops rather than OOM-ing your machine on a 20-minute clip, which is a real kindness.
The controls map to the actual generation problems you'll hit: video models want a fixed frame rate and a resolution that's a multiple of 8, so the loader will resample to force_rate and round your custom_width/custom_height down to a multiple of 8 using lanczos resizing. frame_load_cap bounds how many frames you pull, skip_first_frames trims the intro, and select_every_nth thins the clip - feed it 2 and you keep every other frame, halving your batch for quick tests.
Inputs and outputs
video- the file dropdown.force_rate- 0 keeps the source fps; set e.g. 8 or 16 to resample for a video model.custom_width/custom_height- 0 keeps native size; otherwise the target, rounded to a multiple of 8.frame_load_cap- max frames to load; 0 is unlimited.skip_first_frames,select_every_nth- trim the head and thin the clip.images- the frame batch, into your sampler/video-conditioning chain.audio- extracted audio, into audio conditioning or a save node.frame_count- an INT, handy for driving math nodes.video- the source as a VIDEO object; pass it to a save node to keep the original rather than re-encoding. Note this one can be None on some ComfyUI versions if the underlyingVideoFromFilesupport isn't there - the node logs a warning and moves on.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/pixel-magician/ComfyUI-PM-Manager.git
# restart ComfyUI
Or ComfyUI Manager, searching for ComfyUI-PM-Manager. The two dependencies (opencv-python, imageio-ffmpeg) install with it. For audio extraction it can fall back to a bundled binary, but a system ffmpeg on your PATH makes both paths happy.
Common issues
The two you'll actually meet: a "Memory limit hit after loading N frames" runtime error, which means your clip is too long for the loader's RAM guard - raise frame_load_cap, use select_every_nth, or lower resolution, rather than fighting it. And the pack-wide one: if the node is missing entirely, update ComfyUI, because this pack runs on the newer extension API. Frame decode failures will usually surface as cv2 errors and mean the file is damaged or a codec OpenCV can't read.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| video | COMBO | 0 options: | |
| force_rate | FLOAT | 00–60 | — |
| custom_width | INT | 00–8192 | — |
| custom_height | INT | 00–8192 | — |
| frame_load_cap | INT | 00–9007199254740991 | — |
| skip_first_frames | INT | 00–9007199254740991 | — |
| select_every_nth | INT | 11–9007199254740991 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| audio | AUDIO | — |
| frame_count | INT | — |
| video | VIDEO | — |