Sign inSign up

thegmpteam/ffmpeg-api

By thegmpteam

•Updated 8 days ago

REST API for FFmpeg. FastAPI HTTP service for video/audio processing and transcoding.

Image
0

455

thegmpteam/ffmpeg-api repository overview

⁠FFmpeg API

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.

⁠Quick start

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

⁠Endpoints

MethodPathDescription
GET/healthStatus, queue depth, worker count, auth state
POST/jobSubmit a job spec, returns {job_id}, queues the work
GET/job/{job_id}Job status and result
GET/filesList files in the shared volume
GET/files/{filename}Download a file from the shared volume

PocketTTS bridge routes are also mounted:

MethodPathDescription
GET/voicesVoices available from the linked PocketTTS server
POST/generateGenerate speech through PocketTTS
POST/cloneClone a voice from an uploaded sample

⁠Job spec

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.

⁠Environment variables

VariableDefaultDescription
FFMPEG_API_TOKEN_FILE(none)Path to a bearer token file. When set, every route except /health requires Authorization: Bearer <token>.
FFMPEG_ALLOWED_ORIGINSloopback + stack hostsComma-separated allowlist for URL validation
COMFYUI_TOKEN_FILE(none)Bearer token used when fetching ComfyUI media
FFMPEG_TTS_EXECUTABLEespeak-ngFallback TTS binary
POCKET_TTS_URL(none)PocketTTS server URL for the /voices, /generate, /clone bridge

⁠Volumes

PathPurpose
/uploadsShared working directory — inputs and rendered outputs

⁠What's in the image

  • Python 3.11 + FastAPI/uvicorn
  • ffmpeg and espeak-ng
  • DejaVu and Liberation fonts for text overlays and captions

⁠Tags

TagMeaning
latestCurrent main build
sha-<commit>Immutable per-commit build

Platform: linux/amd64.

⁠Security

The API is unauthenticated by default. Set FFMPEG_API_TOKEN_FILE and keep the port on loopback or a trusted LAN before wider exposure.

⁠License

MIT

Tag summary

Content type

Image

Digest

sha256:5a7bc3cca…

Size

246.3 MB

Last updated

8 days ago

docker pull thegmpteam/ffmpeg-api