Nodes/Comfyui-Lyrics/Video Overlay
ComfyUI Node

Video Overlay

Composite a clip onto your frames in-graph

By ahkimkoo·Created 8 months ago·Updated 7 months ago· 2
Video Overlay
  • bg_images
  • audio
  • video_path
video_path
scale_video_width0
scale_video_height0
pos_x0
pos_y0
skip0
fps25.00

The Video Overlay node is the in-graph compositor of this pack: it takes a batch of images as your background, a video file path as the foreground, and alpha-blends the two together frame by frame. Think of compositing a light leak, a glitch texture, a lower-third, or an atmospheric overlay clip on top of your generated frames without ever leaving the node graph. Your foreground is a real video file on disk; your background is the tensor in your workflow.

It's a hybrid, which is the part to get straight: the background stays in the graph as IMAGE tensors, while the foreground gets decoded from a file by the node (via ffmpeg) and aligned to your batch. That makes it handy when you've generated a shot and want to composite a hand-made overlay element over it before you save the final result.

How it works

The node decodes the overlay video, matches it to the length and resolution of your background batch, and composites with per-pixel alpha from the overlay's transparency plus the global opacity control. Because the foreground is a proper video file with its own alpha channel, you get smooth compositing - transparent PNG-based overlays and clips with alpha just work.

Inputs and output

  • images - your background frames (IMAGE batch).
  • overlay_video_path - the video file to composite on top.
  • opacity - global blend strength, 0 to 1, default 0.75. At 0.75 the overlay is clearly visible but the background still reads; at 1.0 it's fully opaque.

Output is a single images IMAGE tensor, same shape as the input, ready to feed a save/preview node.

There's no explicit position or scale input on this node - the overlay is decoded to match your background, so size your overlay file to your canvas or it'll be scaled to fit. That's a small trap if you were expecting an x/y offset widget; for positioning control you'd want the file-based overlay variant or to pre-compose the overlay with your own transform.

Installing it

One of ~25 nodes in the Simple Video Effects pack:

cd ComfyUI/custom_nodes
git clone https://github.com/scofano/ComfyUI-Simple-video-effects
cd ComfyUI-Simple-video-effects
pip install -r requirements.txt

Restart ComfyUI, or install via ComfyUI Manager (search "Simple Video Effects"). No models. The node does call ffmpeg to decode the overlay file, so keep the ffmpeg binaries on your PATH - the pack raises a clear "not found on PATH" error otherwise.

Common issues

The main gotcha is resolution and length mismatches. If your overlay file is a different resolution than your background, it gets resized to fit - fine for textures, ugly for text. If it's shorter than your frame batch, you'll run out of overlay frames before the background ends, so match durations or loop your overlay source first.

And the positioning limitation is real: no position/scale widgets here. If you need to place an overlay at a specific spot on a video file rather than a graph tensor, the same pack's Video Overlay (File Input) node (which composites PNG sequences onto a video file with ffmpeg) or Video Overlay (File Input)'s sibling may serve you better. For an in-graph full-frame blend, this is the one.

CategoryLyrics

Inputs (9)

NameTypeDefaultDescription
video_pathSTRING
bg_imagesIMAGE
scale_video_widthINT00–4096
scale_video_heightINT00–4096
pos_xINT0-4096–4096
pos_yINT0-4096–4096
skipINT00–100000
fpsFLOAT25.001–120
audiooptAUDIO

Outputs (1)

NameTypeDescription
video_pathSTRING