Media
为视频添加图片水印,可自定义位置、大小、透明度和显示时间
用三种语言从你的代码中调用此工具。
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/video-watermark-image' \
-F 'file=@/path/to/videoFile.ext'
curl -X POST 'https://api.elysiatools.com/upload/video-watermark-image' \
-F 'file=@/path/to/watermarkImageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/zh/api/tools/video-watermark-image' \
-F 'videoFile=/path/to/file.ext' \
-F 'watermarkImageFile=/path/to/file.ext' \
-F 'position=bottom-right' \
-F 'scale=15' \
-F 'opacity=0.7' \
-F 'margin=20' \
-F 'animationMode=static' \
-F 'animationSpeed=50' \
-F 'startTime=0' \
-F 'endTime=-1' \
-F 'outputFormat=mp4'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/video-watermark-image| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| videoFile | file需先上传 | 是 | — |
| watermarkImageFile | file需先上传 | 是 | — |
| position | select | 否 | — |
| scale | range | 否 | 水印相对于视频宽度的大小(1-100%) |
| opacity | range | 否 | 水印不透明度(0.1 = 透明,1 = 不透明) |
| margin | range | 否 | 距离视频边缘的距离(0-200 像素) |
| animationMode | select | 否 | — |
| animationSpeed | range | 否 | 移动速度(像素/秒,10-500) |
| startTime | number | 否 | 何时开始显示水印(0 = 从头开始) |
| endTime | number | 否 | 何时停止显示水印(-1 = 直到结束) |
| outputFormat | select | 否 | — |
文件结果
{
"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-watermark-image": {
"name": "video-watermark-image",
"description": "为视频添加图片水印,可自定义位置、大小、透明度和显示时间",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=video-watermark-image",
"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-watermark-image",
"arguments": {
"videoFile": "https://example.com/file.ext",
"watermarkImageFile": "https://example.com/file.ext",
"position": "bottom-right",
"scale": 15,
"opacity": 0.7,
"margin": 20,
"animationMode": "static",
"animationSpeed": 50,
"startTime": 0,
"endTime": -1,
"outputFormat": "mp4"
}
}
}有问题或反馈?请联系 [email protected]