FFmpeg Media · FFmpeg Media

FFmpeg Media · IntroductionComing Soon

🚧 This capability is coming soon. The docs are a preview; online run is not yet available. Watch announcements for the launch date.

FFmpeg media processing API: transcode, compress, scale, trim, frame extraction, watermark, concat, mux, audio extraction, GIF conversion, thumbnail, media probe, and file upload. Flow: (1) upload a file to get a CDN URL → (2) call an operation (use that URL as input) → (3) poll by taskId until succeeded / failed. Inputs only accept URLs on the platform CDN allowlist. Billed by credits: pre-charged on submit, auto-refunded on failure.

How to call

  1. Upload: POST /v1/ffmpeg/upload (multipart), get a CDN URL.
  2. Submit: POST /v1/ffmpeg/{operation}, use that URL as input, returns a taskId.
  3. Query: GET /v1/ffmpeg/info?id=taskId, poll until status = succeeded.

Operations

Billing

Pre-charged on submit, auto-refunded on failure. Formula: credits = max(1, ceil(output seconds x 0.05 x op factor x resolution factor)). upload / probe / thumbnail are a flat 1 credit.

Resolution factors: 480P=0.6, 720P=1.0, 1080P=1.8, >1080P=3.0. Final credits are multiplied by your user rate.

Concurrency & Limits

  • Max concurrent tasks per user: 3
  • Single-task timeout: 300s (refunded on timeout)
  • Upload limit 200MB; task input download limit 1GB
  • Input URLs must be on the platform CDN allowlist

Common Errors

CodemsgMeaningHow to fix
400invalid params / non-allowlist urlInvalid params or input URL not on allowlist (rejected before charge)Check enum/range; upload input first to get a CDN URL
429Task limit reachedMore than 3 concurrent tasksWait for running tasks to finish, then submit
500failed / timeoutProcessing failed or timed out (300s); credits auto-refunded, see data.errorMsgAdjust input/params per errorMsg and retry