Nodes/ComfyUI_Sora/Video Watermark (视频水印)
ComfyUI Node

Video Watermark (视频水印)

Brand your AI clips without a second tool

By xuchenxu168·Created 11 months ago·Updated 9 months ago· 5
Video Watermark (视频水印)
  • video
  • watermark_image
  • video
  • info
watermark_typetext
enable_watermarktrue
text_content© 2025 Your Brand
font_size48
font_colorwhite
custom_color_r255
custom_color_g255
custom_color_b255
text_positionbottom_right
text_opacity0.70
auto_remove_bgfalse
bg_color_modewhite
bg_threshold240
image_positiontop_right
image_scale0.15
image_opacity0.80
combined_layouttext_below_image
combined_spacing10
margin_x20
margin_y20
custom_x100
custom_y100
animationnone
animation_duration2.0
move_directionleft_to_right
rotation_speed30.00
scale_range_min0.5
scale_range_max1.5
blink_frequency2.0
start_time0.0
end_time-1.0
add_shadowtrue
shadow_offset2
add_outlinefalse
enable_multi_positionfalse
multi_position_presetfour_corners
position_listtop_left,top_right,bottom_left,bottom_right
position_switch_interval3.0
outline_width2

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, or both. 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 custom with RGB), and how transparent.
  • watermark_image - wire a Load Image in for a logo; image_scale (relative to video width) and image_opacity size and fade it.
  • text_position / image_position / margin_x / margin_y - the 9-grid placement plus custom with custom_x/custom_y.
  • animation - the fun one: 22 options from none through fade/move/rotate/scale/blink/slide, with animation_duration, move_direction, rotation_speed, and blink_frequency to tune it.
  • start_time / end_time - show the watermark for only part of the clip; end_time = -1 means "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 (with bg_color_mode white/black/auto and bg_threshold) to knock out a solid background before compositing.
  • Animation looks janky - animation_duration too 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.

CategoryKen-Chen/sora

Inputs (41)

NameTypeDefaultDescription
videoVIDEO输入视频
watermark_typeCOMBOtext水印类型:text=文字, image=图片, both=文字+图片
enable_watermarkBOOLEANtrue是否添加水印
text_contentoptSTRING© 2025 Your Brand水印文字内容
font_sizeoptINT4812–200字体大小
font_coloroptCOMBOwhite字体颜色
custom_color_roptINT2550–255自定义颜色R(font_color=custom时使用)
custom_color_goptINT2550–255自定义颜色G
custom_color_boptINT2550–255自定义颜色B
text_positionoptCOMBObottom_right文字位置
text_opacityoptFLOAT0.700–1文字透明度
watermark_imageoptIMAGE水印图片(可连接Load Image)
auto_remove_bgoptBOOLEANfalse自动移除纯色背景(白底、黑底等)
bg_color_modeoptCOMBOwhite背景颜色模式
bg_thresholdoptINT2400–255背景检测阈值(越高越严格)
image_positionoptCOMBOtop_right图片位置
image_scaleoptFLOAT0.150.01–1图片缩放比例(相对视频宽度)
image_opacityoptFLOAT0.800–1图片透明度
combined_layoutoptCOMBOtext_below_image文字和图片组合布局(仅当watermark_type=both时生效)
combined_spacingoptINT100–100文字和图片之间的间距(像素)
margin_xoptINT200–500水平边距(像素)
margin_yoptINT200–500垂直边距(像素)
custom_xoptINT1000–3840自定义X坐标(position=custom时使用)
custom_yoptINT1000–2160自定义Y坐标
animationoptCOMBOnone动画效果 - 新增10种吸引眼球的效果
animation_durationoptFLOAT2.00.1–10动画持续时间(秒)
move_directionoptCOMBOleft_to_right移动方向
rotation_speedoptFLOAT30.001–360旋转速度(度/秒)
scale_range_minoptFLOAT0.50.1–2缩放最小值
scale_range_maxoptFLOAT1.50.1–2缩放最大值
blink_frequencyoptFLOAT2.00.1–10闪烁频率(次/秒)
start_timeoptFLOAT0.00–3600水印开始时间(秒)
end_timeoptFLOAT-1.0-1–3600水印结束时间(秒,-1表示到视频结束)
add_shadowoptBOOLEANtrue为文字添加阴影效果
shadow_offsetoptINT20–10阴影偏移(像素)
add_outlineoptBOOLEANfalse为文字添加描边
enable_multi_positionoptBOOLEANfalse水印在多个位置之间切换
multi_position_presetoptCOMBOfour_corners多位置预设方案
position_listoptSTRINGtop_left,top_right,bottom_left,bottom_right自定义位置列表(仅当preset=custom时使用)
position_switch_intervaloptFLOAT3.00.5–30位置切换间隔(秒)
outline_widthoptINT21–10描边宽度

Outputs (2)

NameTypeDescription
videoVIDEO
infoSTRING