Load Video Path (FFMPEGA)
The zero-memory video loader that won't OOM your rig
- images
- audio
- mask
- images
- audio
- video_path
- mask_overlay_path
- mask_points
- crop_data
- mask
- frame_count
- fps
Most video loaders in ComfyUI decode every frame into GPU memory the moment they run. That's fine for a 30-frame test clip and a quiet way to kill a machine when you point it at a 4K travel video. Load Video Path (FFMPEGA) takes the opposite approach: it validates the file exists, shows you an inline preview and the metadata, and then hands the path downstream as a string. Zero frames loaded, zero VRAM spent. ffmpeg reads the file directly later, when the actual work happens.
That's the entire design philosophy of this pack, and it matters most here. The outputs tell the story: video_path (a validated string you connect to the FFMPEG Agent's video_a/video_b/video_c slots), frame_count, fps, and duration - the metadata you need for decisions, without the payload.
The inputs that matter
video- a file picker. Select from ComfyUI's input directory or upload a new one. The file is not loaded into memory; only the path is forwarded.force_rate- override the source FPS (0 = keep source). Use it to normalize mismatched clips before you concat them - a classic source of "the output is all over the place" failures.skip_first_frames/frame_load_cap/select_every_nth- VHS-style trim parameters: skip the intro, cap how many frames count as usable, or sample every Nth frame. These affect theframe_count/durationmetadata, so they're useful for making downstream nodes behave on a cropped or subsampled input.
There are pass-throughs if you need them - images, audio, and video_path inputs so you can chain from Save Video or another loader (a connected video_path overrides the picker). And like the rest of the pack, it carries mask_points and crop_data from its point/crop selectors, which feed SAM3-guided masking downstream.
Installing it
It ships in ComfyUI-FFMPEGA, so the whole pack installs at once: ComfyUI Manager → search ComfyUI-FFMPEGA → Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/AEmotionStudio/ComfyUI-FFMPEGA.git
cd ComfyUI-FFMPEGA
pip install -r requirements.txt
Restart ComfyUI. FFMPEG on PATH is the one hard dependency (ffmpeg -version should print a version, not "command not found").
Where people get burned
The trap is assuming it works like the standard VHS loaders. Because it emits a path, it only connects to nodes that speak path - in this pack, that's the FFMPEG Agent's video_a/video_b/video_c inputs, not an images slot. Wire it into something expecting a tensor and nothing connects. And remember the trim knobs exist: if you're stacking several clips for a grid or concat, set force_rate on all of them to the same value first, or your mixed-frame-rate output will look like a flipbook. For single-clip work with an LLM in the loop, frame_load_cap is also your "don't let the agent analyze the whole 20-minute video" lever.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| video | COMBO | Select or upload a video file. The file is NOT loaded into memory — only the path is forwarded to the FFMPEGA Agent so ffmpeg reads it directly. | |
| force_rate | FLOAT | 0.000–60 | Override the video's FPS. 0 = use source FPS. |
| skip_first_frames | INT | 00–2147483647 | Number of frames to skip from the start. |
| frame_load_cap | INT | 00–2147483647 | Maximum number of frames to use. 0 = all frames. |
| select_every_nth | INT | 11–2147483647 | Select every Nth frame (1 = every frame). |
| imagesopt | IMAGE | Optional upstream IMAGE pass-through (e.g. from Save Video or VHS). | |
| audioopt | AUDIO | Optional upstream AUDIO pass-through. If connected, this audio is forwarded instead of silence. | |
| video_pathopt | STRING | Optional upstream video path string (e.g. from Save Video). Overrides the file-picker selector when connected. | |
| mask_pointsopt | STRING | Optional upstream mask_points pass-through. When connected, overrides the locally drawn mask points. | |
| maskopt | MASK | Optional upstream MASK pass-through. When connected, bypasses SAM3 mask generation and forwards this mask directly. | |
| enable_maskopt | BOOLEAN | false | Enable SAM3 masking. When off, the mask options are hidden and no mask is generated from mask points. An upstream MASK connection still passes through. |
| mask_modeopt | COMBO | none | Controls mask output shape. 'none' disables mask generation. 'single_frame' outputs a single mask (1,H,W) from the first frame. 'all_frames' runs SAM3 video tracking across all frames for per-frame masks (N,H,W). |
| mask_output_typeopt | COMBO | none | Mask preview output format for 'mask_overlay_path'. 'none' disables mask output. 'black_white' outputs a raw B&W mask (white = detected object) for VFX compositing. 'colored_overlay' composites SAM3-style colored regions + contours onto the video. |
| sam_versionopt | COMBO | sam3.1 | Which SAM tracker to use. sam3.1 is the newer multiplex tracker — ~7× faster on multi-object video and ~½ VRAM. Used for video tracking. Single-image point prompts still fall back to sam3 (image-model interactive head not yet wired for sam3.1). |
| show_mask_previewopt | BOOLEAN | false | Show a visual mask overlay on the node's video preview. Darkens unmasked areas so the masked region stands out. Visible on first frame when paused, hides during playback. |
| custom_widthopt | INT | 00–8192 | Custom output width in pixels. 0 = use source video width. Useful for standardizing resolution across multiple inputs. |
| custom_heightopt | INT | 00–8192 | Custom output height in pixels. 0 = use source video height. Useful for standardizing resolution across multiple inputs. |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | Upstream IMAGE pass-through (or empty tensor if not connected). |
| audio | AUDIO | Upstream AUDIO pass-through (or silence if not connected). |
| video_path | STRING | Validated video file path — connect to FFMPEGA Agent's video_a / video_b / video_c input slots. |
| mask_overlay_path | STRING | Path to a mask overlay preview image with SAM3-style colored contours. Connect to Save Video (FFMPEGA) video_path input to view/save the mask visualization. Empty string when no mask is generated. |
| mask_points | STRING | JSON-encoded point selection data from the Point Selector. Connect to FFMPEGA Agent's mask_points input for guided masking. |
| crop_data | STRING | JSON-encoded crop rectangle from the Crop Selector. Format: {"x":N, "y":N, "w":N, "h":N}. |
| mask | MASK | SAM3 segmentation mask from Point Selector clicks. Connect to any node accepting MASK input (MatAnyone2, compositing, etc.). Empty mask when no points are set. |
| frame_count | INT | Effective frame count after applying trim parameters (skip, cap, select every Nth). |
| fps | FLOAT | Effective frame rate (fps) of the video, honoring the force_rate override. Connect to nodes accepting a FLOAT fps input (e.g. Frame Picker). |