Nodes/ComfyUI-FFmpeg/🔥AddTextWatermark
ComfyUI Node

🔥AddTextWatermark

Draw text on video — Chinese fonts included

By MoonHugo·Created 2 years ago·Updated 4 months ago· 146
🔥AddTextWatermark
    • video_path
    • output_path
    video_pathC:/Users/Desktop/video.mp4
    output_pathC:/Users/Desktop/output/
    font_file
    font_size15
    font_color#FFFFFF
    textWatermark
    position_x10
    position_y10

    AddTextWatermark is the pack's video titling node - it renders a text string onto the video at a chosen position, size, and color. Think lower-thirds, "unedited footage" stamps, or just burning a channel name into the corner. The standout feature here is that it handles Chinese fonts without complaint: the README explicitly shows dropping a .ttf like Alibaba-PuHuiTi-Heavy.ttf into the pack's fonts folder, and the node will happily render CJK text. That's a surprisingly rare thing to find working out of the box in this ecosystem, and it's clearly one of the author's own use cases (the pack's docs are Chinese-first).

    How it works

    It's FFmpeg's drawtext filter under the hood. The node registers the pack's fonts directory as a ComfyUI search path, so your font choices appear as a dropdown - default, or any .ttf you drop into custom_nodes/ComfyUI-FFmpeg/fonts/. The text is drawn at position_x/position_y (top-left origin) at the given font_size and font_color, then the video is re-encoded. Output is timestamp-named so you never overwrite a previous pass.

    The inputs that matter

    • video_path / output_path - the usual pair: source video, existing output directory.
    • text - what gets drawn. Default Watermark.
    • font_file - the dropdown of available .ttf files. This is the one that trips people up: if the list is empty, you haven't put any font in the fonts folder. It's not a bug - the pack ships the folder empty (it contains only a put_fontfile_here placeholder file).
    • font_size - pixels, default 15, up to 1000.
    • font_color - #FFFFFF style hex or a named color (white, red, …). Default white.
    • position_x / position_y - pixel coordinates, default 10, 10.

    Outputs

    Two strings: video_path and output_path, both pointing at the rendered file. Slightly redundant, but harmless.

    Install

    Pack-wide standard: ComfyUI Manager → search "ComfyUI-FFmpeg", or manually:

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

    Then restart ComfyUI. Remember the real prerequisite is FFmpeg on PATH - the requirements.txt is a single-line affair.

    Gotchas

    • The empty fonts folder is the number one failure here. Drop a .ttf in, refresh, and the dropdown populates. Windows users can grab a system font from C:\Windows\Fonts.
    • No opacity or outline options. A white #FFFFFF label on a white sky is invisible. Pick your color with the video in mind.
    • If your text is a single long word that overflows the frame edge, it just gets clipped - there's no auto-wrap or size-to-fit. Keep captions short.
    Category🔥FFmpeg

    Inputs (8)

    NameTypeDefaultDescription
    video_pathSTRINGC:/Users/Desktop/video.mp4
    output_pathSTRINGC:/Users/Desktop/output/
    font_fileCOMBO1 options: default
    font_sizeINT151–1000
    font_colorSTRING#FFFFFF
    textSTRINGWatermark
    position_xINT10
    position_yINT10

    Outputs (2)

    NameTypeDescription
    video_pathSTRING
    output_pathSTRING