Video Watermark (视频水印)
Brand your AI clips without a second tool
- video
- watermark_image
- video
- info
VideoWatermark is the burn-in node at the end of the pack's pipeline: take a generated clip, stamp text or a logo onto it, and get a video back. If you're posting Sora output to YouTube, Bilibili, or Douyin, this is how you make sure your handle rides along - and it does it locally with OpenCV and Pillow, no API call, no per-clip fee. That's a nice change of pace from the rest of ComfyUI_Sora: it's free, it's instant-ish, and it runs on whatever machine you already have.
How it works
The node reads your input video frame by frame, draws the watermark onto each frame using PIL/OpenCV (text with a TTF font, or your logo with optional background removal), re-encodes the result, and hands back the new file. Every parameter is applied per-frame, which is also how the animation effects work: fade, slide, rotate, scale, and blink are computed per-frame so the watermark moves instead of just sitting there. Local and deterministic - you can run the same clip through it a hundred times for free.
The inputs that matter
You don't need all 40+ knobs. The ones that do the work:
- watermark_type -
text,image, orboth. Everything else is conditional on this. - text_content / font_size / font_color / text_opacity - what the text says, how big, which of the 9 colors (or
customwith RGB), and how transparent. - watermark_image - wire a
Load Imagein for a logo;image_scale(relative to video width) andimage_opacitysize and fade it. - text_position / image_position / margin_x / margin_y - the 9-grid placement plus
customwithcustom_x/custom_y. - animation - the fun one: 22 options from
nonethrough fade/move/rotate/scale/blink/slide, withanimation_duration,move_direction,rotation_speed, andblink_frequencyto tune it. - start_time / end_time - show the watermark for only part of the clip;
end_time = -1means "to the end". - add_shadow / add_outline - readability on busy footage. Keep shadow on (default true), it's cheap insurance.
- enable_multi_position - cycle the watermark between positions (
four_corners,diagonal,all_nine, …) so a thief can't just crop one corner.
Outputs: video (VIDEO) and info (STRING).
Install
Standard pack install - ComfyUI Manager → search "ComfyUI_Sora", or:
cd ComfyUI/custom_nodes
git clone https://github.com/xuchenxu168/ComfyUI_Sora
cd ComfyUI_Sora && pip install -r requirements.txt
No API key, no config - just restart ComfyUI. opencv-python and Pillow come with the pack's requirements.
Common issues
- Watermark missing / video processing failed - make sure the input is a standard MP4 and the path resolves. The node needs ffmpeg available for re-encoding; if it can't find one, you'll see it in
info. - Chinese text renders as boxes - the README flags this directly: the default font may not cover CJK glyphs. Install a system Chinese font; the node uses your system fonts, so a missing CJK font produces tofu.
- Logo has a white box around it - turn on
auto_remove_bg(withbg_color_modewhite/black/auto andbg_threshold) to knock out a solid background before compositing. - Animation looks janky -
animation_durationtoo small makes moves jerky at low fps; give it 2–3 seconds and pick a single direction.
It's not glamorous, but it's the node that makes your output yours. For watermarking before you post, it's the one to reach for - and the advanced variant adds tracking if a fixed corner isn't enough.
Inputs (41)
| Name | Type | Default | Description |
|---|---|---|---|
| video | VIDEO | 输入视频 | |
| watermark_type | COMBO | text | 水印类型:text=文字, image=图片, both=文字+图片 |
| enable_watermark | BOOLEAN | true | 是否添加水印 |
| text_contentopt | STRING | © 2025 Your Brand | 水印文字内容 |
| font_sizeopt | INT | 4812–200 | 字体大小 |
| font_coloropt | COMBO | white | 字体颜色 |
| custom_color_ropt | INT | 2550–255 | 自定义颜色R(font_color=custom时使用) |
| custom_color_gopt | INT | 2550–255 | 自定义颜色G |
| custom_color_bopt | INT | 2550–255 | 自定义颜色B |
| text_positionopt | COMBO | bottom_right | 文字位置 |
| text_opacityopt | FLOAT | 0.700–1 | 文字透明度 |
| watermark_imageopt | IMAGE | 水印图片(可连接Load Image) | |
| auto_remove_bgopt | BOOLEAN | false | 自动移除纯色背景(白底、黑底等) |
| bg_color_modeopt | COMBO | white | 背景颜色模式 |
| bg_thresholdopt | INT | 2400–255 | 背景检测阈值(越高越严格) |
| image_positionopt | COMBO | top_right | 图片位置 |
| image_scaleopt | FLOAT | 0.150.01–1 | 图片缩放比例(相对视频宽度) |
| image_opacityopt | FLOAT | 0.800–1 | 图片透明度 |
| combined_layoutopt | COMBO | text_below_image | 文字和图片组合布局(仅当watermark_type=both时生效) |
| combined_spacingopt | INT | 100–100 | 文字和图片之间的间距(像素) |
| margin_xopt | INT | 200–500 | 水平边距(像素) |
| margin_yopt | INT | 200–500 | 垂直边距(像素) |
| custom_xopt | INT | 1000–3840 | 自定义X坐标(position=custom时使用) |
| custom_yopt | INT | 1000–2160 | 自定义Y坐标 |
| animationopt | COMBO | none | 动画效果 - 新增10种吸引眼球的效果 |
| animation_durationopt | FLOAT | 2.00.1–10 | 动画持续时间(秒) |
| move_directionopt | COMBO | left_to_right | 移动方向 |
| rotation_speedopt | FLOAT | 30.001–360 | 旋转速度(度/秒) |
| scale_range_minopt | FLOAT | 0.50.1–2 | 缩放最小值 |
| scale_range_maxopt | FLOAT | 1.50.1–2 | 缩放最大值 |
| blink_frequencyopt | FLOAT | 2.00.1–10 | 闪烁频率(次/秒) |
| start_timeopt | FLOAT | 0.00–3600 | 水印开始时间(秒) |
| end_timeopt | FLOAT | -1.0-1–3600 | 水印结束时间(秒,-1表示到视频结束) |
| add_shadowopt | BOOLEAN | true | 为文字添加阴影效果 |
| shadow_offsetopt | INT | 20–10 | 阴影偏移(像素) |
| add_outlineopt | BOOLEAN | false | 为文字添加描边 |
| enable_multi_positionopt | BOOLEAN | false | 水印在多个位置之间切换 |
| multi_position_presetopt | COMBO | four_corners | 多位置预设方案 |
| position_listopt | STRING | top_left,top_right,bottom_left,bottom_right | 自定义位置列表(仅当preset=custom时使用) |
| position_switch_intervalopt | FLOAT | 3.00.5–30 | 位置切换间隔(秒) |
| outline_widthopt | INT | 21–10 | 描边宽度 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| video | VIDEO | — |
| info | STRING | — |