CQTAI
FFmpeg 媒体处理 · FFmpeg

叠加水印NEW

📌 这是什么在视频上叠加图片水印。
💡 什么时候用想加 logo / 版权标识时用。

接口地址

用途方法路径
提交任务POST/v1/ffmpeg/watermark
查询结果GET/v1/ffmpeg/info?id={taskId}
建议轮询时间建议每 3~5 秒轮询一次(响应含 progress 0→100),直到 status = succeeded / failed。单任务超时 300 秒、超时退款。

请求参数

参数类型必填说明
inputUrlstring必填输入媒体 URL,必须为平台 CDN 白名单域名(先用 upload 上传获取)
imageUrlstring必填水印图片 URL(白名单域名)
positionstring位置:tl / tr / bl / br / center,默认 br
opacitynumber透明度 [0,1],默认 1.0
margininteger边距像素 [0,200],默认 10
webhookUrlstring完成回调地址(可选)

请求示例

curl -X POST https://api.cqtai.com/v1/ffmpeg/watermark \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{ "inputUrl": "https://cdn.novapi.ai/tmp/video.mp4", "imageUrl": "https://cdn.novapi.ai/tmp/logo.png", "position": "br", "opacity": 0.8, "margin": 20 }'
# -> { "code":200, "data":"<taskId>" }

响应示例

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "<taskId>",
    "operation": "transcode",
    "status": "succeeded",
    "progress": 100,
    "resultUrl": "https://cdn.novapi.ai/ffmpeg/xxx.mp4",
    "costPoints": 3,
    "errorMsg": null
  }
}

计费与积分

系数 1.3;1 分钟 720P ≈ 4 积分(× 你的用户费率)。任务失败自动退回。