Frame Extract (FFMPEGA)
Pull frames out of a video without melting your VRAM
- images
- audio
- mask
- frames
- audio
- video_path
- mask_points
- crop_data
- mask
You generated a video, and now you want to do something with the frames - feed them to an upscaler, an img2img pass, a detailer, or run some analysis on them. Loading a whole clip into ComfyUI's tensor format is the blunt instrument: a few minutes of 1080p video can be gigabytes of VRAM. Frame Extract (FFMPEGA) is the scalpel. It uses ffmpeg to grab individual frames at a rate you choose and hands you a batched IMAGE tensor, plus the audio from the same segment, without dragging the entire file into memory.
The inputs that matter
video_path- absolute path to the source video. Or skip it and wire an upstream path (from Load Video Path or Save Video) intoinput_video_path, which overrides the text field when connected.fps- extraction rate, not the source's frame rate.1.0= one frame per second,0.5= one every two seconds,30= a frame per source frame. This is the main dial for how many frames you get back.start_time/duration- slice a segment instead of the whole video.start_time0 starts at the beginning;duration0 means "from start_time to the end."max_frames- the safety cap (default 100, max 1000). This is your OOM guard. Long video at high fps without a cap is how you find out what your GPU's actual memory ceiling is.
The output worth caring about is frames (a batched IMAGE tensor), but there's real metadata hiding in the rest: frame_count, fps (the source frame rate, which is not the extraction rate - a trap worth knowing), duration, and the resolved video_path. It also passes through mask_points and crop_data from the point/crop selectors, which you can feed to the FFMPEG Agent to guide SAM3 masking. audio gives you the sound from the same segment unless you've wired in an audio input, in which case yours wins.
Where it fits
The README's own suggestion is the cleanest use: connect frames to the FFMPEG Agent's images_a input so the agent "analyzes frames before editing." That's how you get click-to-guide masking - the frames give SAM3 something to look at and the point data tells it where. It's equally natural as the front end of any frame-by-frame pipeline: extract, process each frame with image nodes, reassemble with Media Bridge.
Installing it
Part of the ComfyUI-FFMPEGA pack, so the install is the pack install: 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, and make sure ffmpeg -version runs in your terminal - the whole pack is built on a system ffmpeg being on PATH.
Where people get burned
The two most common surprises: forgetting that fps is extraction rate while the fps output is the source rate, so don't use the two interchangeably; and setting a huge max_frames because "I want everything," which is exactly the memory blowup the cap exists to prevent. If you're pulling frames for an img2img loop, start at 1 fps and max_frames 100 - you can always raise it once you confirm it fits.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| video_path | STRING | Absolute path to the video file to extract frames from. | |
| fps | FLOAT | 1.00.1–60 | Frames per second to extract. 1.0 = one frame every second, higher values extract more frames. |
| start_timeopt | FLOAT | 0.000–3600 | Start time in seconds for frame extraction. |
| durationopt | FLOAT | 0.000–3600 | Duration in seconds to extract frames from. 0 = full video from start_time. |
| max_framesopt | INT | 1001–1000 | Maximum number of frames to return. Limits output to prevent memory issues with long videos. |
| imagesopt | IMAGE | Optional upstream IMAGE input (e.g. from VHS or Save Video). Accepted for wiring but frames are always extracted from the video. | |
| audioopt | AUDIO | Optional upstream AUDIO. If connected, this audio is output instead of extracting from the video. | |
| input_video_pathopt | STRING | Optional upstream video path (e.g. from Save Video or Load Video Path). Overrides the video_path text field 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. Forwarded as-is to the mask output. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| frames | IMAGE | Extracted video frames as a batched image tensor. |
| audio | AUDIO | Audio from the extracted segment in ComfyUI AUDIO format. |
| video_path | STRING | Resolved absolute path to the video file. |
| 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 | Upstream MASK pass-through (or empty mask if not connected). |