Files
SnapOtter/apps/docs/zh-TW/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

2.0 KiB
Raw Blame History

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
將文字浮水印燒錄到影片畫面上。 937bb075b894 human c752499f18db

Watermark Video

將文字浮水印燒錄到影片的每一個畫面上,並可設定位置、大小、不透明度和顏色。

API Endpoint

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

接受包含一個影片檔案和一個 JSON settings 欄位的 multipart form data。

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 工具。