CQTAI
FFmpeg Media · FFmpeg

Timeline Audio MuxNEW

📌 What is thisPlace multiple audio clips into a video at their own time offsets — positioning and muxing the whole track in one call.
💡 When to useUse to anchor N audio clips (e.g. multiple voice lines or sound effects) at different moments of a video. mux only places a single track from 0s; here each clip carries its own offset in seconds.

Endpoints

UsageMethodPath
Submit taskPOST/v1/ffmpeg/mux_timeline
Query ResultGET/v1/ffmpeg/info?id={taskId}
Recommended polling intervalPoll every 3-5s (response includes progress 0-100) until status = succeeded / failed. status = queued means the task is enqueued and waiting to start (not charged yet) — just keep polling. Single-task timeout is 300s with auto-refund.

Request Parameters

ParamTypeRequiredDescription
inputUrlstringRequiredInput media URL on a trusted allowlist domain (platform CDN or a trusted-source CDN); upload first to obtain one, or use an asset URL already on a trusted CDN
audioUrlsstring[]RequiredAudio URL array, 1-100, all on allowlist domains
offsetsnumber[]RequiredStart offset (sec) per audio; length must equal audioUrls, non-negative and non-decreasing
modestringreplace drops the original track (default) / add mixes with it (auto-falls back to replace when the video has no audio track)
keepVideoLengthbooleanWhether output equals the video length: true (default) pads silence if short, trims if long; false leaves it unconstrained
webhookUrlstringCompletion webhook URL (optional)

Request Example

curl -X POST https://api.cqtai.com/v1/ffmpeg/mux_timeline \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{ "inputUrl": "https://cdn.novapi.ai/veo31/1788164205419_de868f9d69d445baaf577d42e87a236f.mp4", "audioUrls": ["https://cdn.novapi.ai/tmp/l1.mp3", "https://cdn.novapi.ai/tmp/l2.mp3"], "offsets": [0, 4.2], "mode": "replace", "keepVideoLength": true }'
# -> { "code":200, "data":"<taskId>" }

Response Example

{
  "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
  }
}

Billing & Credits

Factor 0.4, billed by video length (same as mux) (x your user rate). Auto-refunded on failure.