Skip to main content

FFmpeg Transcoding API

The FFmpeg API allows you to submit video and audio transcoding tasks to be processed in the cloud using FFmpeg.

Features

  • Asynchronous Processing: Submit tasks and poll for results
  • Full FFmpeg Support: Use any FFmpeg command
  • Multiple Outputs: Generate multiple output files from a single input
  • Progress Tracking: Monitor task progress in real-time
  • Webhook Notifications: Get notified when tasks complete
  • Metadata Extraction: Optionally get ffprobe metadata for outputs

Authentication

All API requests require Bearer token authentication:
Authorization: Bearer YOUR_API_KEY
You can obtain an API key from the FFHub Dashboard.

Base URL

https://api.ffhub.io/v1

Quick Example

curl -X POST https://api.ffhub.io/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "command": "ffmpeg -i https://example.com/video.mp4 -c:v libx264 -crf 23 output.mp4"
  }'

Task Lifecycle

1

Create Task

Submit a transcoding task with your FFmpeg command via POST /tasks
2

Task Queued

Task enters pending status and waits for processing
3

Processing

Task moves to running status, progress updates available
4

Completed

Task finishes with completed or failed status, outputs available

Task Status

StatusDescription
pendingTask is queued and waiting to be processed
runningTask is currently being processed
completedTask finished successfully, outputs available
failedTask failed, check error field for details

Next Steps