Nodes/ComfyUI_Sora/Video Watermark Advanced (高级水印)
ComfyUI Node

Video Watermark Advanced (高级水印)

A watermark that follows your subject

By xuchenxu168·Created 11 months ago·Updated 9 months ago· 5
Video Watermark Advanced (高级水印)
  • video
  • watermark_image
  • video
  • info
watermark_typetext
enable_watermarktrue
tracking_modenone
tracking_positionabove
tracking_offset_x0
tracking_offset_y-50
enable_anti_occlusionfalse
occlusion_detection_methodbrightness
min_target_confidence0.50
smooth_trackingtrue
smoothing_factor0.30
batch_modefalse
batch_video_folder
batch_output_folder
text_content© 2025 Your Brand
font_size48
font_colorwhite
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
text_effectnone
margin_x20
margin_y20
animationnone
animation_duration2.0
move_directionleft_to_right
rotation_speed30
scale_range_min0.5
scale_range_max1.5
blink_frequency2.0
enable_multi_positionfalse
multi_position_presetfour_corners
position_listtop_left,top_right,bottom_left,bottom_right
position_switch_interval3.0
add_shadowtrue
shadow_offset2

VideoWatermarkAdvanced is the plain VideoWatermark node with a tracking brain bolted on. Same text/logo stamping, same 22 animation effects, same local OpenCV pipeline - plus the ability to make the watermark chase a person through the frame, dodge busy areas, and process a whole folder of videos in one pass. If you're watermarking clips where the subject moves (which is most of them), a fixed corner stamp is easy to crop out; a watermark that rides along with the subject is a different problem for whoever wants to steal it. That's the pitch, and for the face/body case it mostly works.

How it works

Everything from the base watermark node applies, and on top of that:

  • tracking_mode - none, face, body, or object. Here's the honest bit: face and body tracking are implemented with OpenCV's Haar cascades (the classic haarcascade_frontalface_default.xml style classifiers that ship with opencv-python). They're fast and free, and they're also 2010-era tech - frontal faces track great, profile shots and heavily rotated subjects will lose the lock. The object mode is a stub (a TODO in the source), so treat it as "not really implemented." Don't build your workflow on it.
  • tracking_position / tracking_offset_x / tracking_offset_y - place the watermark above, below, left, right, or on_target relative to the detected target, with pixel offsets for fine placement (default offset -50 puts it above a face).
  • smooth_tracking / smoothing_factor - the node smooths the bounding box between frames so the watermark doesn't jitter; smaller factor = smoother, but laggier.
  • enable_anti_occlusion / occlusion_detection_method - try to shift the watermark away from bright/edge/salient regions (brightness, edge, or saliency scoring). Experimental, per the pack's own framing.
  • min_target_confidence - 0.1–1.0, default 0.5; raise it to require more confident detections (fewer false locks, more dropouts).
  • batch_mode / batch_video_folder / batch_output_folder - process every video in a folder. Great for a day of generated clips; mind the disk space.
  • text_effect - none or curved, for arc-shaped text. It's the little flourish the basic node lacks.

Outputs: video (VIDEO) and info (STRING).

Install

Same pack install - ComfyUI Manager → "ComfyUI_Sora", or clone + pip install -r requirements.txt. No API key needed; Haar cascade files come bundled with opencv-python, so there's nothing extra to download.

Common issues

  • Tracking loses the face mid-clip - expected with Haar cascades on side/rotated faces. Keep the subject front-facing, or fall back to fixed position for anything stylized.
  • object mode does nothing - it's a stub; use face/body or the fixed multi-position presets instead.
  • Watermark flickers between positions - that's enable_multi_position fighting tracking_mode; the tooltip even warns they conflict. Pick one.
  • Batch runs forever / fills the disk - batch mode re-encodes every video; check batch_output_folder has room and that you actually want all of them.

The honest verdict: for a fixed or animated watermark, the base node is plenty. Use this one when your clip has a clear frontal subject worth pinning a watermark to - it's a neat trick when it locks, and a "turn it off" when it doesn't.

CategoryKen-Chen/sora

Inputs (45)

NameTypeDefaultDescription
videoVIDEO输入视频(单个或批量)
watermark_typeCOMBOtext水印类型
enable_watermarkBOOLEANtrue
tracking_modeoptCOMBOnone目标跟踪模式:none=固定位置, face=跟随人脸, body=跟随人体, object=跟随物体
tracking_positionoptCOMBOabove水印相对目标的位置
tracking_offset_xoptINT0-500–500跟踪时的X偏移
tracking_offset_yoptINT-50-500–500跟踪时的Y偏移
enable_anti_occlusionoptBOOLEANfalse自动调整位置避开重要内容
occlusion_detection_methodoptCOMBObrightness遮挡检测方法:brightness=亮度, edge=边缘, saliency=显著性
min_target_confidenceoptFLOAT0.500.1–1目标检测最小置信度
smooth_trackingoptBOOLEANtrue使用平滑算法减少抖动
smoothing_factoroptFLOAT0.300.1–0.9平滑系数(越小越平滑)
batch_modeoptBOOLEANfalse是否批量处理多个视频
batch_video_folderoptSTRING批量处理的视频文件夹路径
batch_output_folderoptSTRING批量输出文件夹路径
text_contentoptSTRING© 2025 Your Brand
font_sizeoptINT4812–200
font_coloroptCOMBOwhite9 options: white, black, red, green, blue, yellow, +3
text_positionoptCOMBObottom_right10 options: top_left, top_center, top_right, center_left, center, center_right, +4
text_opacityoptFLOAT0.700–1
watermark_imageoptIMAGE水印图片
auto_remove_bgoptBOOLEANfalse自动移除纯色背景(白底、黑底等)
bg_color_modeoptCOMBOwhite背景颜色模式
bg_thresholdoptINT2400–255背景检测阈值(越高越严格)
image_positionoptCOMBOtop_right10 options: top_left, top_center, top_right, center_left, center, center_right, +4
image_scaleoptFLOAT0.150.01–1
image_opacityoptFLOAT0.800–1
combined_layoutoptCOMBOtext_below_image文字和图片组合布局(仅当watermark_type=both时生效)
combined_spacingoptINT100–100文字和图片之间的间距(像素)
text_effectoptCOMBOnone文字特效(curved=弧形文字)
margin_xoptINT200–500
margin_yoptINT200–500
animationoptCOMBOnone动画效果类型 - 新增10种吸引眼球的效果
animation_durationoptFLOAT2.00.1–30动画持续时间(秒)- 数值越大动画越慢
move_directionoptCOMBOleft_to_right4 options: left_to_right, right_to_left, top_to_bottom, bottom_to_top
rotation_speedoptFLOAT301–360旋转速度(度/秒)- 数值越小旋转越慢
scale_range_minoptFLOAT0.50.1–2
scale_range_maxoptFLOAT1.50.1–2
blink_frequencyoptFLOAT2.00.5–10
enable_multi_positionoptBOOLEANfalse水印在多个位置之间切换(与跟踪模式冲突)
multi_position_presetoptCOMBOfour_corners多位置预设方案
position_listoptSTRINGtop_left,top_right,bottom_left,bottom_right自定义位置列表(仅当preset=custom时使用)
position_switch_intervaloptFLOAT3.00.5–30位置切换间隔(秒)
add_shadowoptBOOLEANtrue
shadow_offsetoptINT20–10

Outputs (2)

NameTypeDescription
videoVIDEO
infoSTRING