Nodes/ComfyUI-FFMPEGA/Load Video Path (FFMPEGA)
ComfyUI Node

Load Video Path (FFMPEGA)

The zero-memory video loader that won't OOM your rig

By AEmotionStudio·Created 8 months ago·Updated 2 days ago· 16
Load Video Path (FFMPEGA)
  • images
  • audio
  • mask
  • images
  • audio
  • video_path
  • mask_overlay_path
  • mask_points
  • crop_data
  • mask
  • frame_count
  • fps
video
force_rate0.00
skip_first_frames0
frame_load_cap0
select_every_nth1
video_path
mask_points
enable_maskfalse
mask_modenone
mask_output_typenone
sam_versionsam3.1
show_mask_previewfalse
custom_width0
custom_height0

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 the frame_count/duration metadata, 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.

CategoryFFMPEGA

Inputs (17)

NameTypeDefaultDescription
videoCOMBOSelect 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_rateFLOAT0.000–60Override the video's FPS. 0 = use source FPS.
skip_first_framesINT00–2147483647Number of frames to skip from the start.
frame_load_capINT00–2147483647Maximum number of frames to use. 0 = all frames.
select_every_nthINT11–2147483647Select every Nth frame (1 = every frame).
imagesoptIMAGEOptional upstream IMAGE pass-through (e.g. from Save Video or VHS).
audiooptAUDIOOptional upstream AUDIO pass-through. If connected, this audio is forwarded instead of silence.
video_pathoptSTRINGOptional upstream video path string (e.g. from Save Video). Overrides the file-picker selector when connected.
mask_pointsoptSTRINGOptional upstream mask_points pass-through. When connected, overrides the locally drawn mask points.
maskoptMASKOptional upstream MASK pass-through. When connected, bypasses SAM3 mask generation and forwards this mask directly.
enable_maskoptBOOLEANfalseEnable 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_modeoptCOMBOnoneControls 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_typeoptCOMBOnoneMask 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_versionoptCOMBOsam3.1Which 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_previewoptBOOLEANfalseShow 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_widthoptINT00–8192Custom output width in pixels. 0 = use source video width. Useful for standardizing resolution across multiple inputs.
custom_heightoptINT00–8192Custom output height in pixels. 0 = use source video height. Useful for standardizing resolution across multiple inputs.

Outputs (9)

NameTypeDescription
imagesIMAGEUpstream IMAGE pass-through (or empty tensor if not connected).
audioAUDIOUpstream AUDIO pass-through (or silence if not connected).
video_pathSTRINGValidated video file path — connect to FFMPEGA Agent's video_a / video_b / video_c input slots.
mask_overlay_pathSTRINGPath 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_pointsSTRINGJSON-encoded point selection data from the Point Selector. Connect to FFMPEGA Agent's mask_points input for guided masking.
crop_dataSTRINGJSON-encoded crop rectangle from the Crop Selector. Format: {"x":N, "y":N, "w":N, "h":N}.
maskMASKSAM3 segmentation mask from Point Selector clicks. Connect to any node accepting MASK input (MatAnyone2, compositing, etc.). Empty mask when no points are set.
frame_countINTEffective frame count after applying trim parameters (skip, cap, select every Nth).
fpsFLOATEffective frame rate (fps) of the video, honoring the force_rate override. Connect to nodes accepting a FLOAT fps input (e.g. Frame Picker).