Media Bridge (FFMPEGA)
The translator between ComfyUI's tensor world and ffmpeg's file world
- images
- audio
- mask
- video_path
- images
- audio
- mask
ComfyUI thinks in IMAGE tensors - big batched arrays of frames living in GPU memory. FFMPEGA's Agent thinks in file paths - strings that ffmpeg reads from disk. Those two worlds don't talk, and that's the entire reason Media Bridge (FFMPEGA) exists. It's a bidirectional adapter: encode a tensor batch into a temp video file, or decode a video file back into a tensor batch plus audio. One node, a mode dropdown, both directions.
This is the node you reach for when a workflow has one foot in each world. Say you generated frames with a video model, want to run them through FFMPEGA's editor or agent, then come back to ComfyUI's tensor-based nodes with the result. Bridge handles the seams so you don't have to hand-assemble temp files and remember where you put them.
The inputs that matter
mode- the direction.images_to_pathencodes an IMAGE tensor into a temp video file;path_to_imagesdecodes a video path back into IMAGE + AUDIO. That's the whole node, really.images- used inimages_to_pathmode: the frames to encode. Any IMAGE source works.video_path- used inpath_to_imagesmode: the file to decode.fps- encoding frame rate (default 24),images_to_pathonly. Ignored in the other direction, where FPS is read from the file.audio- optional,images_to_pathonly: mux this AUDIO into the encoded video. Leave it out and you get a silent temp file.
Outputs are populated in both modes for predictable wiring: video_path (temp file in one direction, empty string in the other), images, audio, plus fps and frame_count, which are always filled regardless of mode - handy metadata if you're using this as a pass-through measurement point.
Installing it
It ships in ComfyUI-FFMPEGA, so it comes with the pack: 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 required (the encode/decode is real ffmpeg work, so ffmpeg -version should respond).
Where people get burned
Two things to keep straight. First, this writes a temp video - it's a bridge, not a save node. If you want a permanent file, run the result through Save Video (FFMPEGA), which copies it into ComfyUI's output directory without re-encoding. Second, images_to_path gives you a silent video unless you connect audio; if the downstream node is supposed to have sound and it doesn't, that's why. And don't confuse the bridge's 24 fps default with your actual content - if your frames were generated at 30 or 16, set fps explicitly or your "video" plays at the wrong speed and the decoded duration lies to you.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | images_to_path | images_to_path: encode IMAGE tensor → temp video file path. path_to_images: decode video file path → IMAGE tensor + AUDIO. |
| imagesopt | IMAGE | Video frames from a Load Video node or any IMAGE source. Used in images_to_path mode. | |
| video_pathopt | STRING | Path to a video file. Used in path_to_images mode. | |
| fpsopt | INT | 241–120 | Frames per second for encoding (images_to_path mode). Ignored in path_to_images mode — FPS is read from the file. |
| audioopt | AUDIO | Optional audio to mux into the encoded video (images_to_path mode only). | |
| maskopt | MASK | Optional upstream MASK pass-through. Forwarded as-is to the mask output. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| video_path | STRING | File path to the temp video (images_to_path) or empty string (path_to_images). |
| images | IMAGE | Decoded video frames (path_to_images) or empty tensor (images_to_path). |
| audio | AUDIO | Extracted audio (path_to_images) or silent fallback (images_to_path). |
| mask | MASK | Upstream MASK pass-through (or empty mask if not connected). |