Nodes/ComfyUI-FFmpeg/🔥AddImgWatermark
ComfyUI Node

🔥AddImgWatermark

Burn a logo onto a video, position and size included

By MoonHugo·Created 2 years ago·Updated 4 months ago· 146
🔥AddImgWatermark
    • video_complete_path
    video_pathC:/Users/Desktop/video.mp4
    output_pathC:/Users/Desktop/output/
    watermark_imageC:/Users/Desktop/logo.png
    watermark_img_width100
    position_x10
    position_y10

    AddImgWatermark pastes a PNG logo onto a video - the "I made this, don't rip it" stamp, or just a channel badge in the corner. It's the image variant of the pack's AddTextWatermark: same idea, but for a graphic file instead of a text string. You give it the video, the watermark PNG, a width, and an x/y position, and it burns the logo into every frame using FFmpeg's overlay filter.

    How it works

    The watermark is scaled to your watermark_img_width (height follows proportionally, so a square-ish logo stays square-ish) and composited over the video at the pixel coordinates you choose via overlay=x=...:y=.... Since a filter is involved, the video gets re-encoded - this is not the stream-copy speed of AddAudio. The output filename is auto-generated from the current timestamp, so you won't clobber your source or your last render.

    The inputs that matter

    • video_path - the video to stamp. Must exist and be a video file.
    • watermark_image - path to the logo. PNG with transparency is the right choice; a JPEG logo will show as a solid rectangle. The node doesn't validate the file type, so garbage in, garbage out.
    • watermark_img_width - the logo's final width in pixels, default 100. This is the only size knob - no separate height, no "scale to 10% of the frame."
    • position_x / position_y - pixel coordinates of the logo's top-left corner, default 10, 10. Both are plain integers; there's no "bottom-right" preset, so if you want it anchored in a corner you'll be doing a bit of math against your video's dimensions. For a 1920-wide video, bottom-right is roughly x=1920−logo_width−margin.
    • output_path - existing directory for the result.

    Outputs

    One video_complete_path string. That's it - no preview, no metadata. Go check the file on disk.

    Install

    Same as every node in this pack: the Python dependency is a single line (pathlib), the real requirement is an FFmpeg binary on your PATH. ComfyUI Manager → search "ComfyUI-FFmpeg", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MoonHugo/ComfyUI-FFmpeg
    cd ComfyUI-FFmpeg
    pip install -r requirements.txt
    

    Restart ComfyUI.

    Gotchas

    • No alpha awareness: if your watermark is bigger than the video, ffmpeg will just clip it or error depending on the build - size it down first.
    • Coordinates are top-left origin, so position_y=0 puts the logo flush at the very top edge, not "in the top area."
    • Because this re-encodes, output quality is at FFmpeg's default for the output container - fine for most uses, but don't use this node as your final high-bitrate export step if you're a stickler for quality; do the watermark before your last encode.
    Category🔥FFmpeg

    Inputs (6)

    NameTypeDefaultDescription
    video_pathSTRINGC:/Users/Desktop/video.mp4
    output_pathSTRINGC:/Users/Desktop/output/
    watermark_imageSTRINGC:/Users/Desktop/logo.png
    watermark_img_widthINT100
    position_xINT10
    position_yINT10

    Outputs (1)

    NameTypeDescription
    video_complete_pathSTRING