REST API for FFmpeg. FastAPI HTTP service for video/audio processing and transcoding.
455
REST API for FFmpeg — a FastAPI HTTP service that runs an asynchronous job queue for video/audio assembly, transcoding and thumbnail generation.
Part of the n8n AI stack — n8n-table-ui, n8n, Ollama, PocketTTS, SearXNG and ComfyUI.
docker pull thegmpteam/ffmpeg-api:latest
docker run -d \
--name ffmpeg-api \
-p 8765:8765 \
-v /path/to/uploads:/uploads \
thegmpteam/ffmpeg-api:latest
curl http://localhost:8765/health
| Method | Path | Description |
|---|---|---|
GET | /health | Status, queue depth, worker count, auth state |
POST | /job | Submit a job spec, returns {job_id}, queues the work |
GET | /job/{job_id} | Job status and result |
GET | /files | List files in the shared volume |
GET | /files/{filename} | Download a file from the shared volume |
PocketTTS bridge routes are also mounted:
| Method | Path | Description |
|---|---|---|
GET | /voices | Voices available from the linked PocketTTS server |
POST | /generate | Generate speech through PocketTTS |
POST | /clone | Clone a voice from an uploaded sample |
assets.images[] { url, frames, effect, duration }
assets.videos[] { url, trim_start, trim_duration, loop }
overlays[] { type: "banner" | "image", text/url, position, style }
text_overlays[] { text, start, duration, position, style }
dialogue[] { text, start, voice }
transitions[] { type, duration }
audio_tracks[] { url, start }
callbackUrl webhook called when the job finishes
n8n { baseUrl, apiKey, tableId } for data-table writeback
Up to 40 scenes per job. Jobs run through a pool of 6 async workers.
| Variable | Default | Description |
|---|---|---|
FFMPEG_API_TOKEN_FILE | (none) | Path to a bearer token file. When set, every route except /health requires Authorization: Bearer <token>. |
FFMPEG_ALLOWED_ORIGINS | loopback + stack hosts | Comma-separated allowlist for URL validation |
COMFYUI_TOKEN_FILE | (none) | Bearer token used when fetching ComfyUI media |
FFMPEG_TTS_EXECUTABLE | espeak-ng | Fallback TTS binary |
POCKET_TTS_URL | (none) | PocketTTS server URL for the /voices, /generate, /clone bridge |
| Path | Purpose |
|---|---|
/uploads | Shared working directory — inputs and rendered outputs |
ffmpeg and espeak-ng| Tag | Meaning |
|---|---|
latest | Current main build |
sha-<commit> | Immutable per-commit build |
Platform: linux/amd64.
The API is unauthenticated by default. Set FFMPEG_API_TOKEN_FILE and keep the port on loopback or a trusted LAN before wider exposure.
MIT
Content type
Image
Digest
sha256:5a7bc3cca…
Size
246.3 MB
Last updated
8 days ago
docker pull thegmpteam/ffmpeg-api