π₯ Load Video Frames
Decode any video into ComfyUI's IMAGE + AUDIO tensors, AV1 and ProRes included
- frames
- audio
- fps
- width
- height
- frame_count
- metadata_json
MF_LoadVideoFrames decodes a video into ComfyUI's canonical tensor shapes: an IMAGE batch ([B, H, W, C] float32), an AUDIO dict, and a pile of metadata. It's the front door of the pack's tensor side, and its superpower over the usual suspects is that it decodes with FFmpeg rather than OpenCV - so codecs that break other loaders (AV1, HEVC 10-bit, ProRes, VP9) just work here.
It's the natural replacement for VideoHelperSuite's load node when the format is exotic, and the readme's honest framing is worth repeating: install both, use VHS for fast image-batch workflows and MediaForge for hard-to-decode formats and file-level operations. The author also makes the roundtrip claim: feed its output into MF_SaveVideoFrames with the fps wired through and you get a lossy-but-clean rawvideo roundtrip at PSNR > 38 dB.
How it works
FFmpeg decodes the source to raw video and audio, and the pack converts to float32 tensors. It's rotation-aware - portrait phone video comes out with correct display dimensions, not sideways. When the source has no audio stream, audio is None rather than a fake silent track, which is a deliberate design choice: a fake track would mislead MF_SaveVideoFrames's muxing.
The inputs that matter
video_path- the source.target_fps-0keeps the original rate;>0runs anfpsfilter to resample (handy for aligning everything to 24/30 for a batch pipeline).max_frames-0= unbounded. This is your memory cap; long 4K sources will eat VRAM, and previewing a 5-minute clip at full res is how people OOM. Set it when you just need a look.load_audio- skip audio decode entirely withFalseif you only need frames.audio_sr-0keeps the original sample rate; override if you want a consistent rate downstream.
Outputs: frames (IMAGE), audio (AUDIO), fps, width, height (display, rotation-aware), frame_count, and metadata_json (full ffprobe metadata as a string - great for feeding a filename or a size check).
Install
Part of MediaForge:
cd ComfyUI/custom_nodes
git clone https://github.com/leon80148/comfyui_MediaForge.git
# restart ComfyUI
Or ComfyUI Manager β "MediaForge". No Python deps beyond the pack's requirements.txt; the FFmpeg fallback binaries are auto-installed if you lack system ffmpeg.
Common issues
OOM on big files is the top complaint - set max_frames or lower target_fps; the node bounds memory by frame count. If audio comes back as None and you expected sound, the source genuinely has no audio stream (or load_audio is off) - check the source with MF_ProbeMedia. And when roundtripping, wire the node's fps output into MF_SaveVideoFrames's fps widget; guessing the fps is how you get a video that plays at the wrong speed.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| video_path | STRING | input/sample.mp4 | β |
| target_fps | FLOAT | 0.00β240 | β |
| max_frames | INT | 00β100000 | β |
| load_audio | BOOLEAN | true | β |
| audio_sr | INT | 00β192000 | β |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| frames | IMAGE | β |
| audio | AUDIO | β |
| fps | FLOAT | β |
| width | INT | β |
| height | INT | β |
| frame_count | INT | β |
| metadata_json | STRING | β |