FFmpeg API curl Examples: 20 Commands You Can Copy-Paste

March 11, 2026 · RenderIO

20 curl commands you can copy-paste

Every example below is a complete, working curl command. Replace your_api_key with your RenderIO API key and the input URLs with your files. If you're new to the API, the REST API tutorial walks through the submit-poll-download flow step by step.

Each command submits an FFmpeg job. Poll with:

curl https://renderio.dev/api/v1/commands/COMMAND_ID \
  -H "X-API-KEY: your_api_key"

1. Convert MOV to MP4

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -c:v libx264 -preset fast -crf 22 -c:a aac -b:a 128k {{output}}",
    "input_files": {"input": "https://example.com/video.mov"},
    "output_files": {"output": "converted.mp4"}
  }'

2. Convert MP4 to WebM

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -c:v libvpx-vp9 -crf 30 -b:v 0 -c:a libopus {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "video.webm"}
  }'

3. Convert MKV to MP4

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -c:v libx264 -c:a aac {{output}}",
    "input_files": {"input": "https://example.com/video.mkv"},
    "output_files": {"output": "video.mp4"}
  }'

4. Resize to 720p

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -vf scale=-2:720 -c:v libx264 -crf 23 -c:a copy {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "720p.mp4"}
  }'

5. Resize to 1080p

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -vf scale=-2:1080 -c:v libx264 -crf 23 -c:a copy {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "1080p.mp4"}
  }'

6. Resize for TikTok (1080x1920)

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -vf \"scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black\" -c:v libx264 -crf 23 -c:a aac {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "tiktok.mp4"}
  }'

7. Resize for Instagram Square (1080x1080)

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -vf \"scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2:black\" -c:v libx264 -crf 23 -c:a aac {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "instagram.mp4"}
  }'

Need more scaling options? The FFmpeg scale video guide covers percentage scaling, the iw/ih variables, letterbox padding, and a multi-output social media export example using the parallel API endpoint.

8. Trim video (first 30 seconds)

Need frame-accurate trimming or want to extract multiple clips? The FFmpeg trim video guide covers keyframe issues and batch trimming via API.

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -t 00:00:30 -c copy {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "first30s.mp4"}
  }'

9. Trim video (from 1:00 to 2:00)

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -ss 00:01:00 -t 00:01:00 -c copy {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "clip.mp4"}
  }'

10. Extract audio as MP3

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -vn -acodec libmp3lame -q:a 2 {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "audio.mp3"}
  }'

11. Extract audio as WAV

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -vn -acodec pcm_s16le -ar 44100 {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "audio.wav"}
  }'

12. Generate thumbnail at 5 seconds

Need more than a single thumbnail? The frame extraction guide covers keyframe extraction, scene detection, batch processing, and fps= vs select= performance.

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -ss 00:00:05 -vframes 1 -q:v 2 {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "thumb.jpg"}
  }'

13. Add watermark (bottom-right)

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{video}} -i {{logo}} -filter_complex \"overlay=W-w-10:H-h-10\" {{output}}",
    "input_files": {
      "video": "https://example.com/video.mp4",
      "logo": "https://example.com/logo.png"
    },
    "output_files": {"output": "watermarked.mp4"}
  }'

This does a basic fixed-position overlay. For responsive scaling (scale2ref), semi-transparent logos, text watermarks, and animated overlays, see the FFmpeg watermark guide.

14. Compress video (reduce file size)

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -c:v libx264 -crf 28 -preset slow -c:a aac -b:a 96k {{output}}",
    "input_files": {"input": "https://example.com/large-video.mp4"},
    "output_files": {"output": "compressed.mp4"}
  }'

CRF 28 with slow preset gives good compression with acceptable quality.

15. Remove audio from video

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -an -c:v copy {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "silent.mp4"}
  }'

This removes all audio streams. If you need to replace audio with a new track, or silence only a specific time range, see the FFmpeg remove audio guide for commands covering all three scenarios.

16. Create GIF from video

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -ss 00:00:02 -t 5 -vf \"fps=15,scale=480:-1:flags=lanczos\" {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "clip.gif"}
  }'

This creates a basic GIF. For palette-optimized GIFs with better color accuracy and smaller files, see the MP4 to GIF guide.

17. Speed up video (2x)

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -filter_complex \"[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]\" -map \"[v]\" -map \"[a]\" {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "fast.mp4"}
  }'

18. Slow down video (0.5x)

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -filter_complex \"[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]\" -map \"[v]\" -map \"[a]\" {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "slow.mp4"}
  }'

19. Rotate video 90 degrees

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -vf \"transpose=1\" -c:v libx264 -crf 23 -c:a copy {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "rotated.mp4"}
  }'

transpose=1 rotates 90 degrees clockwise. Use transpose=2 for counter-clockwise.

20. Strip all metadata

curl -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{
    "ffmpeg_command": "-i {{input}} -map_metadata -1 -c:v copy -c:a copy {{output}}",
    "input_files": {"input": "https://example.com/video.mp4"},
    "output_files": {"output": "clean.mp4"}
  }'

Tips for working with curl

Check the response status code. A 200 means the job was submitted. A 400 means your FFmpeg command has a syntax error. A 401 means your API key is wrong or missing.

Pipe output to jq for readability:

curl -s -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -d '{"ffmpeg_command": "...", "input_files": {...}, "output_files": {...}}' | jq .

Download the result directly:

# After polling shows status "completed"
curl -o output.mp4 "$(curl -s https://renderio.dev/api/v1/commands/CMD_ID \
  -H 'X-API-KEY: your_api_key' | jq -r '.output_files.output')"

For language-specific integration, see the Python guide or Node.js guide. The FFmpeg cheat sheet has all 50 commands with explanations of what each flag does.

FAQ

Can I use these commands in a shell script?

Yes. Wrap the submit call, add a polling loop with sleep 2, and check the status with jq. Here's a minimal example:

#!/bin/bash
API_KEY="ffsk_your_key"
CMD_ID=$(curl -s -X POST https://renderio.dev/api/v1/run-ffmpeg-command \
  -H "Content-Type: application/json" -H "X-API-KEY: $API_KEY" \
  -d '{"ffmpeg_command":"-i {{input}} -c:v libx264 -crf 23 {{output}}","input_files":{"input":"https://example.com/video.mp4"},"output_files":{"output":"out.mp4"}}' \
  | jq -r '.command_id')

while true; do
  STATUS=$(curl -s "https://renderio.dev/api/v1/commands/$CMD_ID" \
    -H "X-API-KEY: $API_KEY" | jq -r '.status')
  [ "$STATUS" = "SUCCESS" ] && break
  [ "$STATUS" = "FAILED" ] && echo "Failed" && exit 1
  sleep 2
done
echo "Done: $CMD_ID"

Do I need to URL-encode the FFmpeg command?

No. The command is sent as a JSON string in the request body, not as a URL parameter.

Can I merge or concatenate videos via the API?

Yes. Use the concat filter with multiple {input} placeholders to merge videos via the API. The merge guide has curl, Node.js, and Python examples for concatenating clips in the cloud.

Can I submit multiple jobs at once?

Yes. Fire multiple curl commands in the background (&) or use xargs for batch processing. Each job runs in its own isolated container.

What if my input file requires authentication?

Use a pre-signed URL from your storage provider (S3, R2, GCS). The API fetches the file from that URL — it doesn't support Authorization headers on input file downloads.

The Starter plan at $9/mo includes 500 commands. Get your API key to start processing.