This page was machine-translated. Spotted a mistake?Help improve it.
Skip to content

Video Color

调整视频的亮度、对比度、饱和度和伽马校正。

API Endpoint

POST /api/v1/tools/video/video-color

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

Parameters

ParameterTypeRequiredDefaultDescription
brightnessnumberNo0亮度调整(-1 到 1)
contrastnumberNo1对比度倍数(0-4)
saturationnumberNo1饱和度倍数(0-3)。设为 0 表示灰度
gammanumberNo1伽马校正(0.1-10)

Example Request

bash
curl -X POST http://localhost:1349/api/v1/tools/video/video-color \
  -H "Authorization: Bearer si_your-api-key" \
  -F "[email protected]" \
  -F 'settings={"brightness": 0.1, "contrast": 1.2, "saturation": 1.5}'

Example Response

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

Notes

  • 所有值都为默认值(亮度 0,对比度 1,饱和度 1,伽马 1)时不会产生任何变化。
  • 将饱和度设置为 0 会将视频转换为灰度。
  • 伽马值低于 1 会提亮阴影,高于 1 会加深阴影。