ffmpeg API — convert, compress, trim, GIF, thumbnail avatar

ffmpeg API — convert, compress, trim, GIF, thumbnail

Pricing

from $20.00 / 1,000 media operations

Go to Apify Store
ffmpeg API — convert, compress, trim, GIF, thumbnail

ffmpeg API — convert, compress, trim, GIF, thumbnail

Run ffmpeg over HTTP: POST a media URL to /convert, /compress, /trim, /gif, /thumbnail or /extract-audio and get the result back. Pay per operation, no infrastructure.

Pricing

from $20.00 / 1,000 media operations

Rating

0.0

(0)

Developer

Synthetic

Synthetic

Maintained by Community

Actor stats

0

Bookmarked

5

Total users

4

Monthly active users

14 days ago

Last modified

Share

ffmpeg API — media processing over HTTP

Run ffmpeg in the cloud without any infrastructure. Send a media URL to an endpoint and get the processed file back. Convert, compress, trim, make GIFs, grab thumbnails or extract audio — all pay-per-operation, no server to manage, no ffmpeg to install.

  • ⚡ HTTP API (Standby): POST /<operation> with a JSON body, get a JSON reply with a link to the result
  • 🔒 Safe by design: you send URLs and parameters, never raw shell commands
  • 💵 Pay per operation, from $0.02
  • 🤖 Callable from any language, from n8n/Make/Zapier, or from an AI agent

Endpoints

Base URL (Standby): https://synthetic-ia--ffmpeg-api.apify.actor with header Authorization: Bearer <APIFY_TOKEN>.

EndpointBodyDoes
POST /convert{ url, format: mp4|webm|mkv|mov }Transcode to another container/codec
POST /compress{ url, crf?: 18-40, preset?: ultrafast..slow }Re-encode smaller (H.264)
POST /trim{ url, start?, duration? }Cut a clip (seconds or HH:MM:SS)
POST /gif{ url, start?, duration?: 0.5-15, fps?: 4-30, width?: 120-1080 }High-quality GIF from a clip
POST /thumbnail{ url, time?, width?: 120-1920 }Still JPG at a moment
POST /extract-audio{ url, format: mp3|aac|m4a|wav|ogg|flac }Pull the audio track
POST /advanced{ inputs:[url | {url, ss?, t?, loop?}, …≤24], filterComplex?, map?, subtitles?: {ass}, outputDuration?, uploadPutUrl?, outputFormat, videoCodec?, audioCodec?, crf?, preset?, videoBitrate?, audioBitrate?, fps?, size?, pixFmt? }Full ffmpeg: any filtergraph + codecs, safely validated
POST /async{ operation, …params } → { runId }Start a long job; then GET /status/<runId>
GET /status/<runId>—Poll an async job; returns the result when done

GET / returns this list as JSON.

Full power — /advanced

Expose (almost) everything ffmpeg can do through a validated interface: pass up to 24 inputs and a filterComplex graph of up to 16,000 characters (overlays, concat, scaling, color, speed, watermarks, hstack/vstack…), pick codecs/format/bitrate/fps/size. For safety, file-access filters (movie, subtitles, …) and hidden inputs are rejected — you can't read the server's files. Total download is capped at 1 GB per call (250 MB per input).

Multi-clip montage (video clips + music + cover image + burned subtitles):

  • inputs entries can be { "url", "ss"?, "t"?, "loop"? }: ss/t trim that input before decoding (fast), loop: true repeats a still image (needs t or outputDuration).
  • subtitles: { "ass": "<full .ass file text>" } (max 64 KB) is burned onto the final video. You send the text, never a path. With a filterComplex, name the final video label in map (e.g. ["[v]","3:a"]) or in subtitles.on. DejaVu Sans and Liberation fonts are installed.
  • outputDuration is a global -t in seconds (max 1800): stops color= backgrounds or looped images from leaving a tail.
  • uploadPutUrl is a pre-signed https PUT URL: the finished file is uploaded straight there instead of the key-value store (the response then has "delivered": true and no url). The Actor needs no credentials; a failed upload returns 502 and is not charged.
curl -X POST "https://synthetic-ia--ffmpeg-api.apify.actor/advanced" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
-d '{"url":"https://example.com/clip.mp4","filterComplex":"[0:v]scale=720:-1,hue=s=0[v]","map":["[v]"],"outputFormat":"mp4","crf":24}'

Long jobs — /async

Heavy transcodes can exceed the 4-minute synchronous window. Start them async and poll:

RID=$(curl -s -X POST ".../async" -H "Authorization: Bearer $APIFY_TOKEN" -d '{"operation":"convert","url":"…","format":"webm"}' | jq -r .runId)
curl ".../status/$RID" -H "Authorization: Bearer $APIFY_TOKEN" # → { "status": "SUCCEEDED", "result": { "url": "…" } }

Response

{ "ok": true, "operation": "gif", "url": "https://api.apify.com/v2/key-value-stores/.../records/output/gif-....gif", "contentType": "image/gif", "sizeBytes": 812345, "tookMs": 1840 }

Example

curl -X POST "https://synthetic-ia--ffmpeg-api.apify.actor/gif" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
-d '{"url":"https://example.com/clip.mp4","start":"0:03","duration":4,"width":480}'

Prefer a one-off run? Start the Actor normally with input { "operation": "compress", "url": "https://…", "crf": 30 }.

Limits

  • Input max 250 MB, http(s) URLs only.
  • Synchronous response under 4 minutes — great for clips, thumbnails, GIFs, conversions. For very long transcodes, run it as a normal (async) Actor run.
  • No GPU (Apify is CPU-only), so no hardware encoding; H.264/VP9 software encoding is used.

Pricing

Per successful operation, from $0.02 on higher plans (platform usage included). You only pay when an operation succeeds.

FAQ

Can I send raw ffmpeg commands? No — for security you use the endpoints above with parameters. This covers the common operations safely. Need another operation exposed? Open an issue.

Where does the output go? To the run's key-value store; the response gives you a direct URL to download it.