Files
SnapOtter/apps/docs/zh-CN/tools/video/watermark-video.md
T
SnapOtterandGitHub 4963ab3bbd feat(docs-i18n): translate all documentation into 20 languages
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
2026-07-11 13:52:47 +08:00

1.9 KiB
Raw Blame History

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
将文本水印烧录到视频画面上。 937bb075b894 human f1708b74c3f6

Watermark Video

将文本水印烧录到视频的每一帧画面上,并可配置位置、大小、不透明度和颜色。

API Endpoint

POST /api/v1/tools/video/watermark-video

接受包含视频文件和 JSON settings 字段的 multipart 表单数据。

Parameters

Parameter Type Required Default Description
text string Yes - 水印文本(1-200 个字符)
position string No "br" 画面上的位置:tltctrlcrblbcbr
fontSize integer No 36 字号,单位为像素(8-120
opacity number No 0.5 水印不透明度(0.05-1
color string No "#ffffff" 文本的十六进制颜色(例如 "#ffffff"

Position Values

  • tl - 左上,tc - 顶部居中,tr - 右上
  • l - 左中,c - 居中,r - 右中
  • bl - 左下,bc - 底部居中,br - 右下

Example Request

curl -X POST http://localhost:1349/api/v1/tools/video/watermark-video \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@clip.mp4" \
  -F 'settings={"text": "PREVIEW", "position": "c", "fontSize": 48, "opacity": 0.3}'

Example Response

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
  "originalSize": 12500000,
  "processedSize": 12400000
}

Notes

  • 水印会永久渲染进视频画面,处理后无法移除。
  • 水印使用 FFmpeg 内置的无衬线字体。
  • 对于图像水印,请改用图像 Watermark 工具。