Media
批量给多个视频添加文本水印,可自定义位置、字体大小、颜色、透明度和时间
用三种语言从你的代码中调用此工具。
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/video-batch-watermark' \
-F 'file=@/path/to/videoFiles.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/zh/api/tools/video-batch-watermark' \
-F 'videoFiles=/path/to/file.ext' \
-F 'text=Watermark' \
-F 'position=bottom-right' \
-F 'fontSize=24' \
-F 'fontColor=#FFFFFF' \
-F 'opacity=0.7' \
-F 'margin=20' \
-F 'animationMode=static' \
-F 'animationSpeed=50' \
-F 'backgroundColor=#000000' \
-F 'backgroundOpacity=0' \
-F 'shadowOpacity=0.5' \
-F 'startTime=0' \
-F 'endTime=-1' \
-F 'keepOriginalNames=true'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/video-batch-watermark| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| videoFiles | file需先上传 | 是 | — |
| text | text | 是 | — |
| position | select | 否 | — |
| fontSize | range | 否 | 字体大小(像素) |
| fontColor | color | 否 | — |
| opacity | range | 否 | 文字透明度(0.1 到 1.0) |
| margin | range | 否 | 距离边缘的像素 |
| animationMode | select | 否 | — |
| animationSpeed | range | 否 | 动画速度(像素/秒) |
| backgroundColor | color | 否 | — |
| backgroundOpacity | range | 否 | 背景透明度(0 到 1.0) |
| shadowOpacity | range | 否 | 阴影透明度(0 到 1.0) |
| startTime | number | 否 | 何时开始显示水印(0 = 从开始) |
| endTime | number | 否 | 何时停止显示水印(-1 = 直到结束) |
| keepOriginalNames | checkbox | 否 | — |
文件结果
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-video-batch-watermark": {
"name": "video-batch-watermark",
"description": "批量给多个视频添加文本水印,可自定义位置、字体大小、颜色、透明度和时间",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=video-batch-watermark",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}连接到 SSE 端点后,列出已开放的工具:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}通过工具 id 调用,参数由其参数表构建:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "video-batch-watermark",
"arguments": {
"videoFiles": "https://example.com/file.ext",
"text": "Watermark",
"position": "bottom-right",
"fontSize": 24,
"fontColor": "#FFFFFF",
"opacity": 0.7,
"margin": 20,
"animationMode": "static",
"animationSpeed": 50,
"backgroundColor": "#000000",
"backgroundOpacity": 0,
"shadowOpacity": 0.5,
"startTime": 0,
"endTime": -1,
"keepOriginalNames": true
}
}
}有问题或反馈?请联系 [email protected]