A HTTP API for processing video, audio, and images using FFmpeg.
- Convert media formats (video ↔ audio, MP4 → GIF, WAV → MP3)
- Resize, trim, or transcode files
- Extract audio or frames from video
- Run media workflows without local file handling
You provide input files and FFmpeg commands; the API returns the results via S3, Base64, or a direct HTTP stream.
POST /v1/process
curl -X POST http://localhost:8080/v1/process \
-H "Content-Type: application/json" \
-d '{
"input": {
"input.mp4": { "http": "https://example.com/video.mp4" }
},
"commands": [
["-i", "input.mp4", "-vn", "output.mp3"]
],
"output": { "base64": true }
}'{
"s3Config": { ... },
"input": { ... },
"commands": [ ... ],
"output": { ... }
}A map of filename → source (used by FFmpeg).
Supported sources:
s3:s3://bucket/keyhttp: public URLbase64: Base64-encoded content
{
"input.mp4": {
"http": "https://example.com/video.mp4"
}
}An array of FFmpeg argument lists, executed sequentially.
[
["-i", "input.mp4", "-vn", "output.mp3"]
]Filenames reference input files or outputs from previous commands.
{ "s3": "s3://my-bucket/outputs/" }{ "base64": true }{ "inlineContentType": "audio/mpeg" }When streaming, the first output file is returned directly and no JSON is sent.
{
"results": {
"output.mp3": {
"url": "...",
"base64": "..."
}
}
}S3 access is configured per request using the s3Config object.
-
Works with:
- AWS S3
- S3-compatible providers (MinIO, DigitalOcean Spaces, Cloudflare R2, etc.)
-
The
endpointshould not include a bucket name -
useSSLdefaults to true if omitted
{
"s3Config": {
"endpoint": "s3.amazonaws.com",
"region": "us-east-1",
"accessKey": "AKIA...",
"secretKey": "SECRET...",
"useSSL": true
}
}- FFmpeg is bundled
- No external dependencies
ghcr.io/aureum-cloud/ffmpeg-api:latest
docker run -d -p 8080:8080 ghcr.io/aureum-cloud/ffmpeg-api:latestAPI available at:
http://localhost:8080
Each request is handled independently by the HTTP server.
- Input files are fetched in parallel (HTTP, S3, Base64 decoding).
- FFmpeg is executed as a separate OS process per request.
Concurrency comes from handling multiple HTTP requests simultaneously. FFmpeg’s own multithreading is fully supported and can be controlled via standard flags such as:
-threads 0 # auto
-threads 4 # fixedThe service is stateless:
- No shared filesystem state
- No in-memory session data
This makes it easy to scale horizontally by running multiple instances behind a load balancer, for example using Kubernetes, or a managed container service.