ComfyUI-FFMPEGA

March 10, 2026 · View on GitHub

ComfyUI-FFMPEGA

The ultimate video editing suite for ComfyUI — edit with natural language or hands-on manual controls.

ComfyUI Version License Dependencies Downloads Visitors Clones Last Commit Activity

FFMPEGA Showcase

Use AI to describe edits in plain English, or take full manual control with the Effects Builder and text presets — no LLM required.

FeaturesExamplesInstallationQuick StartPrompt GuideSkillsLLM SetupTroubleshootingContributingChangelog


🚀 What's New in v2.15.0

  • 🎭 MiniMax-Remover — new AI video object removal with 81-frame DiT inpainting, sliding-window batching for long videos, and automatic tiered fallback (MiniMax → FLUX Klein → LaMa → FFmpeg)
  • 🎛️ 5 New No-LLM Modes — run ai_upscale, video_depth, flux_klein, minimax_remover, and animate_portrait directly from the dropdown without any LLM
  • 🧠 Auto-VRAM Tile Sizing — AI upscaler auto-calculates optimal tile dimensions from available GPU memory; new tile_size parameter for manual VRAM control
  • VRAM Management Overhaul — pipelines transfer to CPU before cleanup, only loaded modules are processed, consolidated FFmpeg binary paths across all synthesizers
  • 🎬 NLE Editor & Upscaler Improvements — video dimension padding, framerate compatibility fixes, 1-based frame indexing, dynamic mask fallback resolution
📋 Previous Releases
VersionHighlights
v2.14.0Video Editor NLE node with timeline, razor, crop, transitions, text overlays, keyboard shortcuts
v2.13.0AI Background Removal (BRIA RMBG), FLUX Klein toggle, Edit FFmpeg fallback, smarter defaults
v2.12.0AI Face Animation (LivePortrait), MMAudio in-process inference, MCP progressive disclosure, LaMa safetensors conversion
v2.11.0MMAudio in-process migration, generate_audio no-LLM mode, MCP tools, CLI binary caching
v2.10.0FLUX Klein in-process migration, interactive mask drawing UI, model output caching
v2.9.1AI object removal & editing (FLUX Klein 4B), AI audio generation (MMAudio), AI lip sync (MuseTalk), modular architecture refactor
v2.8.0Effects Builder node, manual no-LLM mode, text node presets, SAM3 subprocess isolation, 15+ bug fixes
v2.7.0SAM3 auto-mask & greenscreen, LaMa inpainting, programmatic tool calling (PTC)
v2.6.5Whisper auto-transcription, karaoke subtitles, whisper model/device controls
v2.6.0HandlerResult contract, compose decomposition, TextInput node, PiP audio mixing, CLI retry
v2.5.0PiP borders, Ollama VL auto-embedding, overlay animation delegation
v2.4.0Zero-memory image paths, pipeline chaining fixes, handler module extraction
v2.3.0Token usage tracking, LUT color grading, vision system, audio analysis
v2.2.0200 skills, dynamic input slots, 48 new skills across all categories
v2.0.0Dynamic input slots, concat, xfade, split screen, animated overlays, text overlays
v1.9.0Claude CLI, Cursor Agent CLI, Qwen CLI connectors, 50+ context menu presets

📄 See CHANGELOG.md for the complete version history.


NotebookLM Overview: Exploring the features and capabilities of ComfyUI-FFMPEGA. (Click to watch on YouTube)

✨ Features

🗣️ Natural Language Editing

Describe edits in plain text: "Make it cinematic with a fade in", "Speed up 2x", "VHS look with grain". The AI agent interprets your prompt and builds the FFMPEG pipeline automatically.

🏗️ Manual Mode — No AI Required

Use the Effects Builder to visually compose up to 5 effects with parameters. Add text overlays and subtitles via preset-powered Text nodes. Full editing control with zero LLM dependency.

🤖 Multi-LLM Support

Works with Ollama (local, free), OpenAI, Anthropic, Google Gemini, and CLI tools (Gemini CLI, Claude Code, Cursor Agent, Qwen Code). Use any local model — Llama 3.1, Qwen3, Mistral, and more. Or skip the LLM entirely.

🎨 200+ Skills

200+ video editing skills across visual effects, audio processing, spatial transforms, temporal edits, encoding, cinematic presets, vintage looks, social media, creative effects, text animations, editing & composition, audio visualization, multi-input operations, transitions, concat, split screen, and AI-powered skills (Whisper transcription, SAM3 masking, MiniMax-Remover object removal, MMAudio generation, MuseTalk lip sync, LivePortrait face animation, Video Depth estimation, AI Upscaling, Marigold dense vision).

🎨 Right-Click Presets

26 built-in Effects Builder presets and 10 Text node presets with example content. Save/load/delete your own custom presets. One-click clear to reset.

⚡ Batch & Preview

Process multiple videos with the same instruction. Generate quick low-res previews before committing to full renders. Quality presets from draft to lossless.


🎬 Examples

See what FFMPEGA can do — each example shows the prompt or preset used, the input clip, and the result.


4×4 Video Grid

Prompt: Concatenate these clips in a 4x4 grid

Before After

Before - 4x4 Grid

After - 4x4 Grid


Prompt: Concatenate these clips with a crossfade transition between each, add a fade in at the start and fade out at the end and a bouncing image_path_a at 10% size and 30% opacity

Before After

Before - Crossfade

After - Crossfade


Color Grade + Text Overlay + Compression

Prompt: Color grade with the cinematic teal orange LUT, normalize audio, add a text "water" in the bottom right corner, compress for web at 720p

Before After

Before - Color Grade

After - Color Grade


Picture-in-Picture with Audio Mix

Prompt: Place video_b in the bottom-right corner at 25% size with a white border over video_a and mix the audio

Before After

Before - PiP

After - PiP


Vintage Film Look + Subtitles

Prompt: Normalize audio to -14 LUFS, add a warm vintage film look with grain overlay, and burn in these subtitles

Before After

Before - Vintage

After - Vintage


Datamosh Glitch Effects

Prompt: Apply datamosh glitch effect, add chromatic aberration with strong RGB split, pixelate slightly, add ghost trails

Before After

Before - Datamosh

After - Datamosh


Cinematic Teal & Orange

Prompt: Add a cinematic teal and orange color grade, apply a subtle vignette, and fade in from black

Before After

Before - Cinematic

After - Cinematic


Neon Glow Edge Detection

Prompt: Apply a neon glow edge detection effect, add chromatic aberration, and slow the video to 0.5x speed with smooth motion

Before After

Before - Neon Glow

After - Neon Glow


Colorhold Noir

Prompt: Use colorhold to keep only the red, desaturate everything else, boost contrast to 1.5, add a strong vignette, apply noir style

Before After

Before - Colorhold

After - Colorhold


Green Screen Removal

Prompt: Remove the green screen with chroma key, despill the green edges, sharpen slightly

Before After

Before - Green Screen

After - Green Screen


📦 Installation

Requirements

  • ComfyUI (latest)
  • Python 3.10+
  • FFMPEG installed and in PATH (install guide)
  • Node.js 18+ (required for CLI tools: Gemini CLI, Claude CLI, Qwen CLI — download)
  • Ollama (optional, for local LLM inference — download)
  1. Open ComfyUI Manager
  2. Search for ComfyUI-FFMPEGA
  3. Click Install

Option 2: Manual Install

Linux / macOS
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/AEmotionStudio/ComfyUI-FFMPEGA.git
cd ComfyUI-FFMPEGA
pip install -r requirements.txt
Windows (PowerShell)
cd C:\path\to\ComfyUI\custom_nodes
git clone https://github.com/AEmotionStudio/ComfyUI-FFMPEGA.git
cd ComfyUI-FFMPEGA
pip install -r requirements.txt

Note: Use whichever Python package manager your ComfyUI venv uses (pip, uv pip, etc.). The above commands assume pip is available in your ComfyUI virtual environment.

Restart ComfyUI after installation.


🚀 Quick Start

  1. Add an FFMPEG Agent node to your workflow
  2. Connect a video path or use the input field
  3. Enter a natural language prompt
  4. Select your LLM model
  5. Run the workflow

💡 Tip: Right-click the FFMPEG Agent node to open the FFMPEGA Presets context menu — 200+ categorized effects you can apply with a single click, no prompt typing needed. Great for quick edits or discovering what's available.

Example Prompts

PromptWhat It Does
"Make it cinematic with a vignette"Adds letterbox, color grade, and edge darkening
"Speed up 2x, keep the audio pitch"Doubles speed with pitch-corrected audio
"Make it look like old VHS footage"Adds noise, color shift, scan lines
"Trim first 5 seconds, resize to 720p"Cuts intro and scales down
"Underwater look with echo on audio"Blue tint, blur, and audio echo
"Pixelate it like an 8-bit game"Mosaic/pixel art effect
"Add 'Subscribe!' text at the bottom"Text overlay with positioning
"Cyberpunk style with neon glow"High-contrast neon aesthetic
"Normalize audio, compress for web"Loudness normalization + web optimization
"Spin the video clockwise"Continuous animated rotation
"Add camera shake"Random shake/earthquake effect
"Fade in from black and out at the end"Smooth intro/outro transitions
"Wipe reveal from the left"Directional wipe reveal animation
"Make it pulse like a heartbeat"Rhythmic zoom breathing effect
"Show audio waveform at the bottom"Audio visualization overlay
"Arrange these images in a grid"Multi-image grid collage
"Create a slideshow with fades"Image slideshow with transitions
"Overlay the logo in the corner"Picture-in-picture / watermark
"Create a side-by-side comparison"Video next to image in 2-column grid
"Create a slideshow starting with the video"Video first, then image slides
"Overlay images in the corners"Multiple images auto-placed in corners
"Split screen, use audio from audio_b"Side-by-side video with specific audio track
"Split screen, mix both audio tracks"Side-by-side with both audio tracks blended

💬 Prompt Guide

When using an LLM, the AI agent interprets your natural language and maps it to skills with specific parameters. Here's how to get the best results. (For manual editing without an LLM, see the Effects Builder and Text Input sections.)

Specifying Exact Values

You can request specific parameter values and the agent will use them directly:

PromptWhat the Agent Does
"Set brightness to 0.3"brightness:value=0.3
"Blur with strength 20"blur:radius=20
"Speed up to 3x"speed:factor=3.0
"Crop to 1280x720"crop:width=1280,height=720
"Deband with threshold 0.3 and range 32"deband:threshold=0.3,range=32
"CRF 18, slow preset"quality:crf=18,preset=slow
"Fade in for 3 seconds"fade:type=in,duration=3

What Works Well ✅

  • Explicit numbers: "brightness 0.2", "speed 1.5x", "CRF 20" — the agent maps these directly
  • Named presets: "VHS look", "cinematic style", "noir" — triggers multi-step preset pipelines
  • Chaining operations: "Trim first 5 seconds, resize to 720p, add vignette" — executes in order
  • Descriptive goals: "Make it look warmer", "Remove the green screen" — the agent picks the right skills
  • Technical terms: "denoise", "deband", "normalize audio" — maps to exact FFmpeg filters

What Might Not Work as Expected ⚠️

  • Vague intensity words: "Make it very blurry" or "a little brighter" — the agent has to guess what number "very" or "a little" means. Tip: use a specific value instead: "blur with radius 15"
  • Out-of-range values: Parameters are auto-clamped to their valid range. If you ask for "brightness 5.0" it caps at the max (1.0)
  • Complex compositing: Multi-layer effects with precise timing may need to be broken into separate passes
  • Format-dependent features: Some effects (like transparency) require specific output formats. H.264/MP4 doesn't support alpha channels

🧠 AI Models (Auto-Downloaded)

Some skills use AI models that auto-download on first use. You can disable automatic downloads with the allow_model_downloads toggle on the FFMPEG Agent node — runs requiring a missing model will fail with a clear message and a manual download link.

All models are mirrored to first-party AEmotionStudio HuggingFace repos for supply chain resilience. Downloads try the AEmotionStudio mirror first, then fall back to upstream sources.

ModelSizeStored InTriggered ByManual Download
SAM3 (Segment Anything 3)~300 MBComfyUI/models/SAM3/auto_mask skill, sam3_masking no-LLM mode, Effects Builder SAM3 targetAEmotionStudio/sam3 — download sam3.safetensors
Whisper large-v3~3 GBComfyUI/models/whisper/auto_transcribe, karaoke_subtitles skills, transcribe / karaoke_subtitles no-LLM modesAEmotionStudio/whisper-models
Whisper medium~1.5 GBComfyUI/models/whisper/Same as above (set whisper_model to medium)Same as above
Whisper small~500 MBComfyUI/models/whisper/Same as above (set whisper_model to small)Same as above
Whisper base~150 MBComfyUI/models/whisper/Same as above (set whisper_model to base)Same as above
Whisper tiny~75 MBComfyUI/models/whisper/Same as above (set whisper_model to tiny)Same as above
LaMa (Large Mask Inpainting)~195 MB~/.cache/torch/hub/checkpoints/auto_mask:effect=remove (legacy fallback)AEmotionStudio/lama-inpainting — download big-lama.safetensors
FLUX Klein 4B (Editing/Removal)~15 GB (bf16)ComfyUI/models/flux_klein/auto_mask:effect=remove, auto_mask:effect=editAEmotionStudio/flux-klein
MiniMax-Remover (Object Removal)~2.5 GBComfyUI/models/minimax_remover/auto_mask:effect=remove (when use_minimax_remover is On)AEmotionStudio/minimax-remover
MMAudio (Video-to-Audio)~5.5 GBComfyUI/models/mmaudio/generate_audio skillAEmotionStudio/mmaudio-models
MuseTalk (Lip Sync)~1.6 GB (fp16)ComfyUI/models/musetalk/lip_sync skillAEmotionStudio/musetalk-models
LivePortrait (Face Animation)~497 MBComfyUI/models/liveportrait/animate_portrait skill, animate_portrait no-LLM modeAEmotionStudio/liveportrait-models
Video Depth Anything (Temporal Depth)~102–670 MBComfyUI/models/video_depth/video_depth no-LLM modeAEmotionStudio/video-depth-anything
Marigold (Dense Vision)~2.5 GB per modeAuto-downloaded by diffusersmarigold no-LLM mode (depth/normals/appearance/lighting)AEmotionStudio/marigold-depth-v1-1
AI Upscaler (Real-ESRGAN / HAT / DAT / SwinIR)~17–170 MB per modelComfyUI/models/upscale_models/ai_upscale skill, ai_upscale no-LLM modeAEmotionStudio/ai-upscale-models
BRIA RMBG (rembg)~270 MB~/.u2net/remove_background skillInstall with pip install 'comfyui-ffmpega[masking]' — model auto-fetched by rembg

Note

Models are only downloaded when you use the corresponding skill for the first time. Core FFmpeg editing skills (200+ of them) require zero model downloads.


🎛️ Nodes

FFMPEGA provides 11 nodes that work together:

Tip

One task per run. Instead of cramming multiple edits into a single prompt, focus each run on one editing task — then feed the output back into FFMPEGA for the next. This keeps context low and model focus high, leading to significantly better results. Chain FFMPEGA Agent → Save Video → Load Video Path → FFMPEGA Agent for multi-step workflows.

Warning

Low VRAM? Skills that load AI models (SAM3 masking, Whisper transcription, LaMa inpainting) each consume significant VRAM. On GPUs with limited memory, limit each run to one model-loading task — e.g. do your SAM3 removal pass first, save the result, then run Whisper subtitles as a separate pass.

FFMPEG Agent — The main node. Translates natural language into FFMPEG commands.
Required Inputs
InputTypeDescription
video_pathSTRINGAbsolute path to source video. Used as ffmpeg input unless images_a is connected.
promptSTRINGNatural language editing instruction (e.g. "Add cinematic letterbox", "Speed up 2x"). Not required in manual mode.
llm_modelDROPDOWNAI model selection — local Ollama models, CLI tools, or cloud APIs. Select none for no-LLM mode.
no_llm_modeDROPDOWNMode when llm_model is none: manual (Effects Builder, default), sam3_masking, transcribe, karaoke_subtitles, generate_audio, lip_sync, animate_portrait, marigold, video_depth, flux_klein, minimax_remover, ai_upscale.
quality_presetDROPDOWNOutput quality: draft, standard, high, lossless.
seedINTChange to force re-execution with the same prompt. Supports randomize control.
Optional Inputs
InputTypeDescription
images_aIMAGEVideo frames from upstream (e.g. Load Video). Auto-expands: images_b, images_c...
image_aIMAGEExtra image input for multi-input skills (grid, slideshow, overlay). Auto-expands: image_b, image_c...
audio_aAUDIOAudio input for muxing or multi-audio workflows. Auto-expands: audio_b, audio_c...
video_aSTRINGFile path to extra video for concat, split screen, grid, xfade. Zero memory. Auto-expands: video_b, video_c...
image_path_aSTRINGFile path to image for overlay, grid, slideshow. Zero memory. Auto-expands: image_path_b...
text_aSTRINGText input from FFMPEGA Text node for subtitles, overlays, watermarks. Auto-expands: text_b...
pipeline_jsonSTRINGConnect from FFMPEGA Effects Builder. In manual mode the pipeline is executed directly; with an LLM it provides skill hints.
subtitle_pathSTRINGDirect path to a .srt or .ass subtitle file.
advanced_optionsBOOLEANSimple/Advanced toggle — shows preview mode, CRF, encoding preset, batch processing when enabled.
preview_modeBOOLEANQuick low-res preview (480p, 10s) instead of full render.
save_outputBOOLEANSave video + workflow PNG to output folder.
output_pathSTRINGCustom output file/folder path. Empty = ComfyUI default.
ollama_urlSTRINGOllama server URL (default: http://localhost:11434).
api_keySTRINGAPI key for cloud models (GPT, Claude, Gemini). Auto-redacted from outputs.
custom_modelSTRINGExact model name when llm_model is set to custom.
crfINTOverride CRF (0 = lossless, 23 = default, 51 = worst). -1 uses quality_preset.
encoding_presetDROPDOWNOverride x264/x265 speed preset (ultrafastveryslow). auto follows quality_preset.
use_visionBOOLEANEmbed video frames as images for vision-capable LLMs. Off = numeric color analysis only.
verify_outputBOOLEANAgent inspects output after rendering and auto-corrects if it doesn't match intent.
Whisper / SAM3 Inputs
InputTypeDescription
whisper_deviceDROPDOWNDevice for Whisper model: cpu (default, avoids VRAM pressure) or gpu (faster, ~3 GB VRAM).
whisper_modelDROPDOWNWhisper model size: large-v3 (default, most accurate), medium, small, base, tiny.
sam3_max_objectsINTMax objects SAM3 tracks per frame (1–20, default 5). Lower = less VRAM.
sam3_det_thresholdFLOATMinimum detection confidence for SAM3 (0.0–1.0, default 0.70). Higher = fewer objects.
mask_output_typeDROPDOWNblack_white (raw mask for compositing) or colored_overlay (SAM3-style preview).
mask_pointsSTRINGJSON point selection data from Load Video Path's Point Selector. Guides SAM3 with click-to-select.
Batch Processing Inputs
InputTypeDescription
batch_modeBOOLEANProcess all matching videos in video_folder with the same prompt. Single LLM call.
video_folderSTRINGFolder containing videos to batch process.
file_patternDROPDOWNFile pattern to match (*.mp4, *.mov, *.*, etc.).
max_concurrentINTMaximum simultaneous encodes in batch mode (1–16, default 4).
OutputDescription
imagesAll frames from the output video as a batched image tensor
audioAudio extracted from output video (or passed through from audio_a)
video_pathAbsolute path to the rendered output video file
command_logThe ffmpeg command(s) that were executed
analysisLLM interpretation, pipeline steps, and warnings
FFMPEGA Effects Builder — Compose video effects visually without an LLM.

Select up to 5 skills with parameters, add raw FFmpeg filters, and use presets. Outputs a pipeline JSON that connects to the FFMPEG Agent's pipeline_json input.

26 built-in presets: 🎬 Cinematic Look, 📼 Vintage / Retro, 🔍 Privacy Blur (face), ⚡ Speed Ramp (2x), 🖤 B&W + Vignette, 📱 Social (9:16 + Quality), 🎵 Clean Audio, ✨ Glow + Saturation, 🎙️ Auto Subtitles, 🎤 Karaoke Subtitles, 🔗 Concat Videos, 🔗 Concat + Crossfade, 📺 Split Screen, 🖼️ Grid Layout, 🎞️ Slideshow, 🐢 Slow Motion (0.5x), ✂️ Trim (first 10s), 🌑 Fade In + Out, 🪞 Mirror Horizontal, 🎬 Ken Burns Zoom, 🎭 Remove Background, 🔍 AI Upscale (2x), 📹 Stabilize + Denoise, 🎬 Cinematic B&W, 📱 TikTok Ready, 🐢 Slow Motion + Fades.

InputTypeDescription
presetDROPDOWNQuick-start preset. Auto-fills effect slots and params. Set to none to build your own.
effect_1DROPDOWNFirst effect. Categorized by type (🎨 Visual, ⏱️ Temporal, 📐 Spatial, 🔊 Audio, 📦 Encoding, ✨ Outcome).
effect_1_paramsSTRINGJSON parameters for effect 1 (e.g. {"strength": 5}). Auto-filled from defaults.
effect_2DROPDOWNSecond effect (chained after effect 1).
effect_2_paramsSTRINGJSON parameters for effect 2.
effect_3DROPDOWNThird effect (chained after effect 2).
effect_3_paramsSTRINGJSON parameters for effect 3.
effect_4DROPDOWNFourth effect (chained after effect 3).
effect_4_paramsSTRINGJSON parameters for effect 4.
effect_5DROPDOWNFifth effect (chained after effect 4).
effect_5_paramsSTRINGJSON parameters for effect 5.
raw_ffmpegSTRINGRaw FFmpeg -vf filter string applied after skill effects.
sam3_targetSTRINGSAM3 text target — apply effects only to the masked region. Leave empty for full-frame.
sam3_effectDROPDOWNEffect for SAM3-detected region: blur, pixelate, remove, grayscale, highlight.
OutputDescription
pipeline_jsonJSON pipeline — connect to FFMPEG Agent's pipeline_json input
Frame Extract (FFMPEGA) — Extract individual frames from a video as image tensors.
InputTypeDescription
video_pathSTRINGAbsolute path to the video to extract frames from.
fpsFLOATExtraction rate (0.1–60.0). 1.0 = one frame per second.
start_timeFLOAT(optional) Start time in seconds (default: 0).
durationFLOAT(optional) Duration to extract from, in seconds (default: 10).
max_framesINT(optional) Max frames to return (default: 100, max: 1000).
OutputDescription
framesExtracted video frames as a batched image tensor

Tip: Connect frames output to the FFMPEG Agent's images_a input to build pipelines that analyze frames before editing.

Load Image Path (FFMPEGA) — Zero-memory image loader, outputs a file path instead of a tensor.

Outputs the image file path as a STRING instead of decoding into a ~6 MB IMAGE tensor. Connect to FFMPEGA Agent's image_path_a / image_path_b / … slots so ffmpeg reads the file directly.

InputTypeDescription
imageFILE PICKERSelect an image from ComfyUI's input directory or upload a new one.
OutputDescription
image_pathAbsolute file path to the selected image
Load Video Path (FFMPEGA) — Zero-memory video input with inline preview and metadata.

Validates the video file exists and outputs the path as a STRING — loads ZERO frames into memory. Features inline video preview, metadata display (fps, duration, resolution), and VHS-style trim parameters.

InputTypeDescription
videoFILE PICKERSelect or upload a video file.
force_rateFLOATOverride FPS (0 = use source).
skip_first_framesINTFrames to skip from start.
frame_load_capINTMax frames to use (0 = all).
select_every_nthINTSelect every Nth frame (1 = every frame).
OutputDescription
video_pathValidated video file path
frame_countTotal usable frames after trim
fpsEffective FPS
durationEffective duration in seconds
Save Video (FFMPEGA) — Zero-memory video output with inline preview.

Takes a video path (from FFMPEGA Agent or Load Video Path), copies the file to ComfyUI's output directory, and shows a preview. No re-encoding — just a file copy.

InputTypeDescription
video_pathSTRINGPath to video file (typically from FFMPEGA Agent's output).
filename_prefixSTRINGPrefix for saved filename. Supports %date:yyyy-MM-dd%.
overwriteBOOLEAN(optional) Overwrite existing file vs auto-increment counter.
Text Input (FFMPEGA) — Flexible text input for subtitles, overlays, and watermarks.

Auto-detects whether text is SRT subtitles, a short watermark, or overlay text. Outputs JSON-encoded metadata that the FFMPEGA Agent node parses for burn_subtitles, text_overlay, or watermark skills.

Right-click Presets: 10 built-in presets with example text (SRT Subtitle Example, Cinematic Subtitles, Bold Watermark, Title Card, Social Caption, Meme Text, Lower Third, Copyright Notice, Credits Roll, Chapter Marker). Save/load/delete custom presets. "Clear Text" resets all fields to defaults.

No-LLM Text Mode: Connect a Text node to the Agent's text_a input in no-LLM manual mode (without an Effects Builder). The Agent auto-generates a text overlay or subtitle pipeline from the Text node's mode, position, font size, and color settings.

InputTypeDescription
textSTRINGText content — plain text, multi-line subtitles, or full SRT format with timestamps.
auto_modeBOOLEAN(optional) Auto-detect mode from content (default: on).
modeDROPDOWN(optional) Override mode: subtitle, overlay, watermark, title_card, raw.
positionDROPDOWN(optional) Text placement: center, top, bottom, bottom_right, etc. auto = mode default.
font_sizeINT(optional) Font size in px (0 = auto: 24 subtitle, 48 overlay, 20 watermark).
font_colorSTRING(optional) Text color as hex (#RRGGBB, default: white).
start_timeFLOAT(optional) Start time in seconds (default: 0).
end_timeFLOAT(optional) End time in seconds (-1 = full duration).
OutputDescription
text_outputJSON-encoded text with metadata — connect to text_a, text_b, etc. on the FFMPEGA Agent node
Media Bridge (FFMPEGA) — Bidirectional IMAGE ↔ video-path converter.

Switch between tensor-based and path-based video representations. In images_to_path mode, encodes an IMAGE tensor to a temp video file and releases the tensor. In path_to_images mode, decodes a video file path into IMAGE tensor + audio.

InputTypeDescription
modeDROPDOWNConversion direction: images_to_path or path_to_images.
imagesIMAGE(optional) Video frames — required for images_to_path mode.
video_pathSTRING(optional) Path to video file — required for path_to_images mode.
fpsINT(optional) FPS for encoding (default: 24). Used in images_to_path only.
audioAUDIO(optional) Audio to mux into encoded video (images_to_path only).
OutputDescription
video_pathFile path to the temp video (images_to_path) or empty string
imagesDecoded video frames (path_to_images) or empty tensor
audioExtracted audio (path_to_images) or silent fallback
fpsFrames per second — always populated
frame_countTotal frame count — always populated
Video Editor (FFMPEGA) — Interactive NLE video editor with timeline, crop, transitions, and more.

A full-featured non-linear editor built into ComfyUI. Open the editor modal from any Video Editor node to trim, split, crop, adjust speed/volume, add text overlays, and apply transitions — all rendered through FFmpeg on export. No LLM required.

Editing Tools: Select, Razor (split), Delete, Crop, Speed, Volume, Text Overlay, Transitions.

Keyboard Shortcuts: Space (play/pause), J/K/L (shuttle), I/O (in/out), R (razor), V (select), Left/Right (frame step), ? (shortcut overlay).

InputTypeDescription
video_pathSTRINGPath to source video, or connect from upstream.
imagesIMAGE(optional) Video frames from upstream — auto-converted to a temp video for editing.
OutputDescription
imagesAll frames from the edited output video
audioAudio extracted from the edited output
video_pathPath to the rendered output video

Passthrough mode: When no edits are made, the node passes the input video through unchanged — zero re-encoding overhead.

Load Last Image (FFMPEGA) — Auto-discover and load the most recently generated image(s).

Scans ComfyUI's output/temp directories for the newest image by mtime. Supports batch loading, deduplication, grid/side-by-side outputs, diff overlays, captions, ring buffer mode for AnimateDiff, and PNG metadata passthrough.

InputTypeDescription
refresh_modeDROPDOWNauto (reload every queue) or manual (only on trigger).
batch_sizeINTNumber of recent images to load as a batch (default: 1).
grid_columnsINTColumns in grid output layout (default: 2).
grid_paddingINTPixel gap between grid cells (default: 4).
skip_duplicatesBOOLEANSkip consecutive identical images (default: on).
pin_indexINTPin a specific iteration as output. 0 = disabled.
diff_modeDROPDOWNDiff visualization: heatmap, overlay, side_by_side_diff.
diff_sensitivityFLOATDiff brightness multiplier (0.1–5.0, default: 1.0).
show_captionsBOOLEANBurn caption text onto grid/side-by-side outputs.
caption_formatSTRINGCaption template with tokens: {iteration}, {timestamp}, {seed}, {index}, {filename}.
ring_buffer_sizeINTFixed-size circular batch for AnimateDiff. 0 = disabled.
source_folderSTRING(optional) Custom folder to scan. Empty = defaults.
filename_filterSTRING(optional) Prefix filter (e.g. ComfyUI_).
OutputDescription
IMAGEBatched image tensor of recent images
MASKSolid white mask
GRID_IMAGEAll batch images composed in a grid
SIDE_BY_SIDEMost recent vs previous image
DIFF_IMAGEDiff visualization between latest and previous
width / heightImage dimensions
batch_countNumber of images loaded
iterationExecution counter
metadata_prompt / metadata_seed / metadata_workflowPNG metadata from the most recent image
RING_BUFFER_FULLBoolean — true when ring buffer is at capacity
Load Last Video (FFMPEGA) — Auto-discover and load the most recently saved video with inline preview.

Scans ComfyUI's output/temp directories for the newest video. Decodes frames (with configurable cap), extracts audio, and shows an inline preview that loads immediately without queuing. Supports manual frame selection, auto-select strategies, inline edits (trim/crop/speed), and input overrides.

InputTypeDescription
refresh_modeDROPDOWNauto (reload when latest video changes) or manual.
source_folderSTRING(optional) Custom folder to scan. Empty = defaults.
filename_filterSTRING(optional) Prefix filter for filenames.
max_framesINT(optional) Max frames to decode into IMAGE tensor (0 = all). Caps memory.
imagesIMAGE(optional) Override: provide frames directly instead of auto-discovery.
audioAUDIO(optional) Override: provide audio directly.
video_pathSTRING(optional) Override: path to a specific video file.
frame_select_modeDROPDOWNFrame selection strategy: manual, uniform_5, uniform_10, first_last, every_2nd, every_5th, timestamps.
auto_timestampsSTRING(optional) Comma-separated timestamps for timestamps mode.
pause_for_selectionBOOLEAN(optional) Block execution until frames are selected (manual mode).
OutputDescription
IMAGEAll decoded video frames as a batched tensor
SELECTED_FRAMESFrames at selected/auto-selected timestamps
AUDIOExtracted audio from the video
video_pathAbsolute path to the loaded video
image_pathsComma-separated paths to selected frame PNGs
frame_countTotal frame count
fpsVideo frame rate
durationVideo duration in seconds

🎯 Skill System

FFMPEGA includes a comprehensive skill system with 218 operations organized into categories. Use them in two ways: let the AI agent select skills from your prompt, or pick them yourself with the Effects Builder — no LLM needed.

📄 See SKILLS_REFERENCE.md for the complete skill reference with all parameters and example prompts.

🧪 See SKILL_TEST_PROMPTS.md for ready-to-use copy-and-paste test prompts for every skill.

🎨 Visual Effects (31 skills)
SkillDescription
brightnessAdjust brightness (-1.0 to 1.0)
contrastAdjust contrast (0.0 to 3.0)
saturationAdjust color saturation (0.0 to 3.0)
hueShift color hue (-180 to 180)
sharpenIncrease sharpness
blurApply blur effect
denoiseReduce noise/grain (light, medium, strong)
vignetteDarken edges for cinematic focus
fadeFade in/out to black
colorbalanceAdjust shadows/midtones/highlights
noiseAdd film grain
curvesApply color curve presets (vintage, cross_process, etc.)
text_overlayAdd text with position, color, size, font
invertInvert colors (photo negative)
edge_detectEdge detection / sketch look
pixelateMosaic / 8-bit pixel effect
gammaGamma correction
exposureExposure adjustment
chromakeyGreen screen removal
colorkeyKey out any arbitrary color and replace with a background
colorholdKeep only a selected color, desaturate everything else (spot color)
lumakeyKey out regions based on brightness (luma)
despillRemove green/blue color spill from chroma-keyed edges
debandRemove color banding artifacts
white_balanceAdjust color temperature (2000K–12000K)
shadows_highlightsSeparately adjust shadows and highlights
split_toneWarm highlights, cool shadows
deflickerRemove fluorescent/timelapse flicker
unsharp_maskFine-grained luma/chroma sharpening
remove_backgroundRemove backgrounds using AI (rembg)
selective_colorIsolate and adjust specific color ranges
⏱️ Temporal (9 skills)
SkillDescription
trimCut a segment by time
speedChange playback speed (0.1x to 10x)
reversePlay backwards
loopRepeat video
fpsChange frame rate (1 to 120)
scene_detectAuto-detect scene changes
silence_removeRemove silent segments
time_remapGradual speed ramp
freeze_frameFreeze a frame at a timestamp
📐 Spatial (8 skills)
SkillDescription
resizeScale to specific dimensions
cropCrop video region
rotateRotate by degrees
flipMirror horizontal/vertical
padAdd padding / letterbox
aspectChange aspect ratio (16:9, 4:3, 1:1, 9:16, 21:9)
auto_cropDetect and remove black borders
scale_2xQuick upscale with algo choice (2x, 4x)
🔊 Audio (27 skills)
SkillDescription
volumeAdjust audio level
normalizeNormalize loudness
fade_audioAudio fade in/out
remove_audioStrip all audio
extract_audioExtract audio only
bass / trebleBoost/cut frequencies
pitchShift pitch by semitones
echoAdd echo / reverb
equalizerAdjust specific frequency band
stereo_swapSwap L/R channels
monoConvert to mono
audio_speedChange audio speed only
chorusChorus thickening effect
flangerSweeping jet flanger
lowpass / highpassFrequency filters
audio_reverseReverse audio track
compress_audioDynamic range compression
noise_reductionRemove background noise
audio_crossfadeSmooth audio crossfade
audio_delayAdd delay/offset to audio
duckingAudio dynamic compression
dereverbRemove room echo/reverb
split_audioExtract left/right channel
audio_normalize_loudnessEBU R128 loudness normalization
replace_audioReplace original audio track
mix_audioMix/blend audio tracks from two inputs (both audible)
audio_bitrateSet audio encoding bitrate
📦 Encoding (12 skills)
SkillDescription
compressReduce file size (light, medium, heavy)
convertChange codec (h264, h265, vp9, av1)
qualitySet CRF and encoding preset
bitrateSet video/audio bitrate
web_optimizeFast-start for web streaming
containerChange format (mp4, mkv, avi, mov, webm)
pixel_formatSet pixel format (yuv420p, yuv444p, etc.)
hwaccelHardware acceleration (cuda, vaapi, qsv)
audio_codecSet audio codec (aac, mp3, opus, flac)
frame_rate_interpolationMotion-interpolated FPS conversion
two_passTwo-pass encoding for better quality
hls_packageHLS adaptive streaming packaging
🎬 Cinematic Presets (14 skills)
SkillDescription
cinematicHollywood film look — teal-orange grading
blockbusterMichael Bay style — high contrast, dramatic
documentaryClean, natural documentary look
indie_filmIndie art-house — faded, low contrast
commercialBright, clean corporate video
dream_sequenceDreamy, soft, ethereal atmosphere
actionFast-paced action movie grading
romanticSoft, warm romantic mood
sci_fiCool blue sci-fi atmosphere
dark_moodyDark, atmospheric, moody feel
color_gradeCinematic color grading (teal_orange, warm, cool)
color_temperatureAdjust color temperature (warm/cool)
letterboxCinematic widescreen letterbox bars
film_grainFilm grain texture (light, medium, heavy)
📼 Vintage & Retro (9 skills)
SkillDescription
vintageClassic old film look (50s–90s)
vhsVHS tape aesthetic
sepiaClassic sepia/brown tone
super8Super 8mm film look
polaroidPolaroid instant photo
fadedWashed-out, faded look
old_tvCRT television aesthetic
damaged_filmAged/weathered film
noirFilm noir — B&W, high contrast
📱 Social Media (8 skills)
SkillDescription
social_verticalTikTok / Reels / Shorts (9:16)
social_squareInstagram feed (1:1)
youtubeYouTube optimized
twitterTwitter/X optimized
gifConvert to animated GIF
thumbnailExtract thumbnail frame
caption_spaceAdd space for captions
watermarkOverlay logo/watermark
✨ Creative Effects (14 skills)
SkillDescription
neonNeon glow — vibrant edges and colors
horrorDark, desaturated, grainy horror atmosphere
underwaterBlue tint, blur, darker underwater look
sunsetGolden hour warm glow
cyberpunkNeon tones, high contrast cyberpunk
comic_bookBold colors, comic/pop art style
miniatureTilt-shift toy model effect
surveillanceSecurity camera / CCTV look
music_videoPunchy colors, contrast, vignette
animeAnime / cel-shaded cartoon
lofiLo-fi chill aesthetic
thermalThermal / heat vision camera
posterizeReduce color palette / screen-print
embossEmboss / relief surface effect
🧪 Special Effects (36 skills)
SkillDescription
memeDeep-fried meme aesthetic
glitchDigital glitch / databend
mirrorMirror / kaleidoscope effect
slow_zoomSlow push-in zoom
black_and_whiteB&W with style options
day_for_nightSimulate nighttime from daytime
dreamySoft, ethereal dream look
hdr_lookSimulated HDR dynamic range
datamoshGlitch art / motion vector visualization
radial_blurRadial / zoom blur effect
grain_overlayCinematic film grain with intensity control
burn_subtitlesHardcode subtitles
selective_colorIsolate specific colors
perspectivePerspective transform
lut_applyApply LUT color grading
lens_correctionFix lens distortion
fill_bordersFill black borders
deshakeQuick stabilization
deinterlaceRemove interlacing
halftoneNewspaper dot pattern
false_colorPseudocolor heat map
frame_blendTemporal frame blending
tilt_shiftTilt-shift miniature effect
color_channel_swapColor channel remapping
ghost_trailTemporal motion trails
glowBloom / soft glow effect
sketchPencil drawing / ink line art
chromatic_aberrationRGB channel offset / color fringing
boomerangLooping boomerang effect
ken_burnsSlow zoom pan for photos
slowmoSmooth slow motion
stabilizeRemove camera shake
timelapseDramatic speed-up for timelapse
zoomZoom in/out effect
scrollScroll video vertically/horizontally
monochromeMonochrome with optional tint
🎬 Transitions (3 skills)
SkillDescription
fade_to_blackFade in from + fade out to black
fade_to_whiteFade in from + fade out to white
flashCamera flash at a specific timestamp
🌀 Motion (5 skills)
SkillDescription
spinContinuous animated rotation
shakeCamera shake / earthquake (light, medium, heavy)
pulseRhythmic breathing zoom effect
bounceVertical bouncing animation
driftSlow cinematic pan (left, right, up, down)
🔮 Reveal Effects (3 skills)
SkillDescription
iris_revealCircle expanding from center
wipeDirectional wipe from black
slide_inSlide video in from edge
🎵 Audio Visualization (1 skill)
SkillDescription
waveformAudio waveform overlay (line, point, cline modes)
🔗 Multi-Input & Composition (7 skills)
SkillDescription
gridArrange video + images in a grid layout (xstack). Auto-includes video as first cell.
slideshowCreate slideshow from images with fade transitions. Optionally starts with the main video.
overlay_imagePicture-in-picture / watermark overlay. Supports multiple overlays auto-placed in corners. Accepts animation=bounce for motion.
concatConcatenate video segments sequentially. Connect multiple videos/images to join them.
xfadeSmooth transitions between segments — 18 types: fade, dissolve, wipe, pixelize, radial, etc.
split_screenSide-by-side (horizontal) or top-bottom (vertical) multi-video layout.
animated_overlayMoving image overlay with motion presets: scroll, float, bounce, slide.
✏️ Text & Graphics (9 skills)
SkillDescription
animated_textAnimated text overlay
scrolling_textScrolling credits-style text
tickerNews-style scrolling ticker bar
lower_thirdProfessional broadcast lower third
countdownCountdown timer overlay
typewriter_textTypewriter reveal effect
bounce_textBouncing animated text
fade_textText that fades in and out
karaoke_textKaraoke-style fill text
✂️ Editing & Delivery (12 skills)
SkillDescription
picture_in_picturePiP overlay window with optional border
blendBlend two video inputs
delogoRemove logo from a region
remove_dup_framesStrip duplicate/stuttered frames
mask_blurBlur a rectangular region for privacy
extract_framesExport frames as image sequence
jump_cutAuto-cut to high-energy moments
beat_syncSync cuts to a beat interval
color_matchAuto histogram equalization
extract_subtitlesExtract subtitle track
preview_stripFilmstrip preview of key frames
sprite_sheetContact sheet of frames
🤖 AI-Powered (10 skills)
SkillDescription
auto_transcribeTranscribe audio with Whisper AI and burn SRT subtitles
karaoke_subtitlesWord-by-word karaoke subtitles with progressive color fill (Whisper)
auto_maskSAM3-powered object segmentation from text prompts
generate_audioAI-generate synchronized audio/foley from video + text (MMAudio)
lip_syncAI lip sync with MuseTalk — synchronize lip movements to audio
animate_portraitAI face animation with LivePortrait — transfer expressions from driving video
remove_backgroundAI background removal with BRIA RMBG — 6 model choices
ai_upscaleAI super-resolution upscaling with Real-ESRGAN, HAT, DAT, or SwinIR — auto-VRAM tile sizing
video_depthTemporal depth estimation with Video Depth Anything — consistent depth maps across frames
marigoldDense vision analysis with Marigold — depth, normals, appearance, and lighting estimation

⚠️ License Notice: The generate_audio skill uses MMAudio model weights which are licensed under CC-BY-NC 4.0 (non-commercial use only). Model weights are downloaded on first use — by downloading them you accept the CC-BY-NC 4.0 license. The FFMPEGA code itself remains GPL-3.0.

⚠️ License Notice: The auto_mask:effect=remove skill (when use_minimax_remover=On) uses MiniMax-Remover model weights which are licensed under CC-BY-NC 4.0 (non-commercial use only). Model weights are downloaded on first use — by downloading them you accept the CC-BY-NC 4.0 license. The vendored code is Apache 2.0.

🧠 Agentic Tools

Beyond the 200+ editing skills, the agent has built-in tools for analyzing media and making better decisions. In LLM mode, the agent calls these autonomously based on your prompt. Some (like analyze_video and search_skills) are also invoked directly by internal skills, the Effects Builder, and no-LLM modes.

🔍 Analysis & Discovery
ToolWhat It Does
analyze_videoProbes resolution, duration, codec, FPS, bitrate — the agent calls this to understand your source
extract_framesExtracts PNG frames for vision models to "see" the video content
analyze_colorsNumeric color metrics (luminance, saturation, color balance) via ffprobe signalstats — guides color grading decisions without vision
analyze_audioNumeric audio metrics (volume dB, EBU R128 loudness LUFS, silence detection) — guides audio effect decisions
search_skillsSearches skills by keyword — the agent always calls this to find the right skills
list_lutsLists available LUT files for color grading — called before lut_apply to discover available looks
🎨 LUT Color Grading System

8 bundled LUT files for cinematic color grading. The agent discovers these via list_luts and applies them with the lut_apply skill.

LUTStyle
cinematic_teal_orangeHollywood teal-orange grade
warm_vintageWarm retro film look
cool_scifiCool blue sci-fi tone
film_noirClassic noir — desaturated, crushed
golden_hourWarm golden sunlight
cross_processCross-processed film chemistry
bleach_bypassBleach bypass — low saturation, high contrast
neutral_cleanSubtle clarity enhancement

Adding your own LUTs: Drop .cube or .3dl files into the luts/ folder. The agent will discover them via list_luts automatically. Short names auto-resolve to full paths (e.g., cinematic_teal_orangeluts/cinematic_teal_orange.cube).

✅ Output Verification Loop

When verify_output is enabled (default: On), the agent inspects its own output after execution:

  1. Extracts frames from the output video
  2. Runs color and/or audio analysis on the result
  3. Sends analysis to the LLM with the original prompt for quality assessment
  4. If the LLM detects issues, it auto-corrects the pipeline and re-executes once

This closes the feedback loop — the agent can catch and fix mistakes like wrong color grades, failed effects, or audio issues without re-queuing.

🧩 Custom Skills

Create your own skills via YAML — no Python required. Drop a .yaml file in custom_skills/, restart ComfyUI, and the agent can use it immediately.

# custom_skills/dreamy_blur.yaml
name: dreamy_blur
description: "Soft dreamy blur with glow"
category: visual
tags: [dream, blur, soft, glow]

parameters:
  radius:
    type: int
    default: 5
    min: 1
    max: 30

ffmpeg_template: "gblur=sigma={radius},eq=brightness=0.06"

Skill packs — installable collections of related skills, optionally with Python handlers for complex logic:

# Linux / macOS / Windows (Git Bash or PowerShell)
cd custom_skills/
git clone https://github.com/someone/ffmpega-retro-pack retro-pack

Two example skills ship in custom_skills/examples/warm_glow.yaml (template) and film_burn.yaml (pipeline composite).

📄 See CUSTOM_SKILLS.md for the full schema reference, skill pack structure, Python handlers, and advanced examples.


🤖 LLM Configuration

Tested with: FFMPEGA has been primarily tested using Gemini CLI and Qwen3 8B (via Ollama). Results may vary with other models.

Author's pick: The CLI connectors (especially Gemini CLI) have been the most reliable option in my experience — they handle tool-calling, structured output, and long context exceptionally well. Highly recommended if you have access.

Choosing a Model

FFMPEGA works best with models that have strong JSON output and instruction-following abilities. The agent sends a structured prompt and expects a valid JSON pipeline back — models with tool-calling or function-calling capabilities tend to perform best.

Things to keep in mind:

  • Some models work better than others — larger models and those trained for structured output (JSON/tool-calling) produce more reliable results
  • Some models may need more retries — if the agent fails to parse the response, try running the same prompt again. Smaller models occasionally return malformed JSON on the first try
  • Find what works best for you — experiment with different models to find the right balance of speed, quality, and reliability for your hardware

Ollama (Local — Free)

The default option. Runs locally, no API key needed.

Install Ollama: Download from ollama.com/download (available for Linux, macOS, and Windows).

# Start Ollama (all platforms)
ollama serve

# Pull a model
ollama pull qwen3:8b

Windows users: After installing Ollama, the ollama command is available in both PowerShell and Command Prompt. Ollama also runs as a system tray app.

Recommended local models (≤30B, consumer GPU friendly):

ModelSizeSpeedNotes
qwen3:8b8B⚡ FastTested — excellent structured output, native tool-calling
qwen3-vl8B⚡ FastTested — multimodal vision-language model, sees video frames
qwen3:14b14B⚡ FastSweet spot of speed and quality, tools + thinking tags
qwen3:30b30B🔄 MediumBest Qwen under 30B, needs 16GB+ VRAM
qwen2.5:14b14B⚡ FastTop IFEval scores, strong instruction following
deepseek-r1:14b14B⚡ FastReasoning model — verifies its own tool calls, very reliable
mistral-nemo12B⚡ FastNVIDIA + Mistral collab, 128k context, great reasoning
mistral-small3.224B🔄 MediumNative function calling, 128k context
phi414B⚡ FastMicrosoft reasoning SLM, rivals larger models in logic
gemma3:12b12B⚡ FastHigh reasoning scores, 128k context
llama3.3:8b8B⚡ FastReliable tool-calling, large ecosystem

Tip: On the Ollama library, look for models with a tools tag — this indicates native tool/function-calling support, which produces the best results with FFMPEGA.

OpenAI

llm_model: gpt-5.2
api_key: your-openai-key

Gemini (Google API)

llm_model: gemini-3-flash
api_key: your-google-ai-key

Gemini CLI (Free with any Google Account)

Use the Gemini CLI to run Gemini models without an API key. Works with any Google account.

Install:

PlatformCommand
Linux / macOSnpm install -g @google/gemini-cli
Windows (PowerShell)npm install -g @google/gemini-cli

Tip: You can also use pnpm add -g or yarn global add if you prefer.

Authenticate (first time only):

gemini

This opens a browser to sign in with your Google account.

Use in FFMPEGA:

llm_model: gemini-cli

No API key is needed — authentication is handled by the CLI. Select gemini-cli from the model dropdown in the node.

Note: The Gemini CLI runs as a subprocess and is sandboxed to the custom node directory for security. On Windows, gemini.cmd is also detected automatically.

Plans & Usage Limits

PlanRate LimitDaily LimitModelsCost
Free (Google login)60 req/min1,000 req/dayGemini model family (Pro + Flash)Free
Free (API key only)10 req/min250 req/dayFlash onlyFree
Code Assist Standard120 req/min1,500 req/dayGemini model familyPaid
Code Assist Enterprise120 req/min2,000 req/dayGemini model familyPaid
Google AI ProHigherHigherFull Gemini family$19.99/mo

Tip: Sign in with a Google account (free) for the best experience — 1,000 requests/day with access to Pro and Flash models. An unpaid API key limits you to 250/day on Flash only.

Available Models

The Gemini CLI auto-selects the best model, but the following are available:

ModelBest For
Gemini 2.5 ProComplex reasoning, creative tasks
Gemini 2.5 FlashFast responses, high throughput
Gemini 2.5 Flash-LiteMaximum speed, lowest cost
Gemini 3 ProMost capable, advanced reasoning
Gemini 3 FlashFast + capable, good balance

Free tier may auto-switch to Flash models when Pro quota is exhausted.

Anthropic

llm_model: claude-sonnet-4-6
api_key: your-anthropic-key

Claude Code CLI (Free with Anthropic Account)

Use the Claude Code CLI as a local LLM backend. Uses its own authentication — no API key needed in FFMPEGA.

Install:

PlatformCommand
Linux / macOSnpm install -g @anthropic-ai/claude-code
Windows (PowerShell)npm install -g @anthropic-ai/claude-code

Tip: You can also use pnpm add -g or yarn global add if you prefer.

Authenticate (first time only):

claude

This opens a browser to sign in with your Anthropic account.

Use in FFMPEGA:

llm_model: claude-cli

Auto-detected on PATH. Select claude-cli from the model dropdown.

Cursor Agent CLI

Use Cursor's CLI in agent mode as an LLM backend.

Install (all platforms): Open Cursor IDE → Command Palette (Ctrl+Shift+P / Cmd+Shift+P) → "Install 'cursor' command"

Start the agent:

agent

Use in FFMPEGA:

llm_model: cursor-agent

Auto-detected on PATH. Select cursor-agent from the model dropdown.

Qwen Code CLI (Free — 2,000 requests/day)

Use Qwen Code as a free LLM backend. Powered by Qwen3-Coder with 2,000 free requests/day via OAuth — no credit card required.

Install:

PlatformCommand
Linux / macOSnpm install -g @qwen-code/qwen-code@latest
Windows (PowerShell)npm install -g @qwen-code/qwen-code@latest

Tip: You can also use pnpm add -g or yarn global add if you prefer.

Authenticate (first time only):

qwen

Select "Qwen OAuth (Free)" and follow the browser prompts to sign in.

Use in FFMPEGA:

llm_model: qwen-cli

Auto-detected on PATH. Select qwen-cli from the model dropdown.

👁️ CLI Agent Vision Support

When Frame Extraction is used, FFMPEGA saves extracted frames to a _vision_frames/ directory and passes the frame paths to the CLI agent. Agents with vision support can see and analyze the actual frame images to make better editing decisions.

CLI AgentVision SupportNotes
Gemini CLI✅ Yesread_file converts images to base64 for multimodal analysis
Claude Code CLI✅ YesNative image reading and description
Cursor Agent CLI✅ YesNative image reading and description
Qwen Code CLI❌ Not yetKnown issueread_file returns raw binary instead of interpreting images. Vision is listed as a planned feature.

Note: Agents without vision support still receive the frame file paths and can use video metadata (duration, resolution, FPS) from analyze_video to make editing decisions. When Qwen fixes their vision support upstream, it will work automatically since the frame paths are already passed correctly.

⚠️ Important: The _vision_frames/ directory must not be listed in .gitignore or .git/info/exclude — CLI agents respect these ignore patterns and will be unable to read the frames. FFMPEGA's cleanup_vision_frames() automatically deletes the directory after each pipeline run.

Custom Model

Select custom from the model dropdown and type any model name in the custom_model field. The provider is auto-detected from the name:

PrefixProvider
gpt-*OpenAI
claude-*Anthropic
gemini-*Google
Anything elseOllama (local)

This lets you use any new model immediately without waiting for a code update.

🔒 API Key Security

Your API keys are automatically scrubbed and never stored in output files:

  • Error messages — keys are redacted before being shown in the UI (e.g. ****abcd)
  • Workflow metadata — ComfyUI embeds workflow data in output images/videos; FFMPEGA strips the api_key field from this metadata before saving
  • HTTP errors — keys are removed from network error messages that might include auth headers
  • Debug logsLLMConfig redacts keys in all string representations

No configuration needed — this protection is always active when an API key is provided.

⚠️ Safety precaution: As with any software, always inspect your output files before sharing them publicly — in the unlikely event of a bug or edge case that bypasses the automatic scrubbing.

📊 Token Usage Tracking

Monitor your LLM token consumption with opt-in usage tracking. Enable via two toggles on the node:

ToggleDefaultWhat It Does
track_tokensOffPrints a formatted usage summary to the console after each run
log_usageOffAppends a JSON entry to usage_log.jsonl for cumulative tracking

Token data sources by connector:

ConnectorSourceEstimated?
OllamaNative API (prompt_eval_count / eval_count)No
OpenAI / Gemini APINative API (usage field)No
Anthropic APINative API (usage.input_tokens)No
Gemini CLIJSON output via -o jsonNo
Claude CLIJSON output via --output-format jsonNo
Other CLIsCharacter-based estimation (~4 chars/token)Yes

When enabled, the analysis output includes a usage breakdown:

Token Usage:
  Prompt tokens:     4,200
  Completion tokens: 1,800
  Total tokens:      6,000
  LLM calls:         5
  Tool calls:        3
  Elapsed:           12.4s

The usage_log.jsonl file stores one JSON object per run for historical analysis. It is gitignored by default.


🐛 Troubleshooting

FFMPEG Not Found

Ensure FFMPEG is installed and in your system PATH:

ffmpeg -version

Install FFMPEG:

PlatformCommand / Method
Ubuntu / Debiansudo apt install ffmpeg
Arch / CachyOSsudo pacman -S ffmpeg
Fedorasudo dnf install ffmpeg
macOSbrew install ffmpeg
Windows (winget)winget install Gyan.FFmpeg
Windows (choco)choco install ffmpeg
Windows (scoop)scoop install ffmpeg
Windows (manual)Download from ffmpeg.org/download, extract, and add the bin/ folder to your system PATH

Windows PATH tip: After installing, open a new terminal and run ffmpeg -version to verify. If not found, you may need to add ffmpeg's bin/ directory to your system PATH manually: Settings → System → About → Advanced system settings → Environment Variables → Edit Path.

Ollama Connection Failed

Make sure Ollama is running:

ollama serve

If using a custom URL, set it in the node's ollama_url field.

Model Not Found

Pull the required model first:

ollama pull qwen2.5:8b
LLM Returns Empty Response

This usually means:

  • The model is still loading (first request after start)
  • The prompt is too long for the model's context window
  • Try running the same prompt again
  • Try a different model
Parameter Validation Errors

FFMPEGA auto-coerces types (float→int) and clamps out-of-range values. If you still see errors, try simplifying your prompt or using a more capable model.

Cancelling a Running Request

If the LLM is taking too long or you want to abort mid-request, close the ComfyUI terminal or restart ComfyUI instead of using the interrupt button. The interrupt button waits for the current LLM response to complete, which can take a while — closing/restarting ComfyUI kills it immediately.


🤝 Contributing

Contributions are welcome! Whether it's bug reports, new skills, or improvements — your help is appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the GPL-3.0 License — see the LICENSE file for details.


Developed by Æmotion Studio

YouTube Discord Ko-fi