GET /api/dev/video-processing/:taskId
查询视频加工任务状态。
| 路径参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
taskId | string | 是 | 任务 ID,由创建接口返回 |
请求示例:
curl http://127.0.0.1:9527/api/dev/video-processing/vp_1714700000000_abc123 \
-H "X-API-Key: dk_your_key_here"
运行中响应:
{
"ok": true,
"data": {
"status": "running",
"inputPath": "/Users/test/demo.mp4",
"outputPath": "",
"progress": 45,
"config": {
"inputPath": "/Users/test/demo.mp4",
"outputPath": "",
"codec": "h265",
"bitrate": "5M",
"crop": "9:16"
}
}
}
已完成响应:
{
"ok": true,
"data": {
"status": "completed",
"inputPath": "/Users/test/demo.mp4",
"outputPath": "/Users/test/VideoTranslate/video-processing/vp_1714700000000_abc123/output.mp4",
"progress": 100,
"config": { "..." : "..." }
}
}
失败响应:
{
"ok": true,
"data": {
"status": "failed",
"inputPath": "/Users/test/demo.mp4",
"outputPath": "",
"progress": 30,
"config": { "...": "..." },
"error": "ffmpeg 退出 (code=1): ..."
}
}