Introduction
What is FFHub?
FFHub is a cloud-based FFmpeg API service that allows you to run FFmpeg commands via simple REST API calls. No server setup, no dependencies - just send your command and get results.
Quick Start
1. Get Your API Key
Sign up at ffhub.io and create an API key in the dashboard.
2. Create a Task
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/input.mp4 -c:v libx264 -preset fast output.mp4"
}'Response:
{
"task_id": "task_abc123",
"status": "pending",
"created_at": "2024-01-01T00:00:00Z"
}3. Query Task Status
curl https://api.ffhub.io/v1/tasks/task_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"Response:
{
"task_id": "task_abc123",
"status": "completed",
"created_at": "2024-01-01T00:00:00Z",
"finished_at": "2024-01-01T00:03:35Z",
"elapsed": "215.30",
"total_elapsed": "220.50",
"progress": 100,
"outputs": [
{
"filename": "output.mp4",
"url": "https://storage.ffhub.io/outputs/task_abc123/output.mp4",
"size": 10485760
}
]
}API Reference
Base URL
https://api.ffhub.io/v1Authentication
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEYEndpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /tasks | Create a new FFmpeg task |
| GET | /tasks/:id | Get task status and result |
Task Status
| Status | Description |
|---|---|
| pending | Task is queued for processing |
| running | Task is currently being processed |
| completed | Task finished successfully |
| failed | Task failed with an error |
Pricing
- 1 credit = 5 seconds of processing time
- $1 = 1,000 credits
Only pay for actual processing time, billed per second.
Support
- GitHub: ffhub-io/ffmpeg-cookbook (Issues & Discussions)
- Email: [email protected]
- Twitter: @ffhub_io
More Resources
For detailed API documentation, see API Reference.