Send one 1080p video URL to POST /v1/ffmpeg with split=4 and ReelSDK returns 1080x1920, 1080x1080, 1080x1350 and 1280x720 MP4s. A 30-second clip costs about 2 cents for all four, at $0.02 per compute minute.
Video resize API
Yes: ffmpeg on ReelSDK decodes the video once and splits it 4 ways, cropping 3 copies from the center and scaling the 16:9 one, so all sizes take under a minute of compute.
Use casesUpdated
The request
POST /v1/ffmpeg
Render 9:16, 1:1, 4:5 and 16:9 copies of one video in a single ffmpeg call, about 2 cents for all 4 from a 30 s clip.
curl "https://api.reelsdk.com/v1/ffmpeg?wait=120" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"launch.mp4": "https://api.reelsdk.com/f/lib/in/use-cases/launch.mp4"
},
"args": [
"-i", "launch.mp4", "-filter_complex",
"[0:v]split=4[a][b][c][d];[a]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920[vertical];[b]scale=1080:1080:force_original_aspect_ratio=increase,crop=1080:1080[square];[c]scale=1080:1350:force_original_aspect_ratio=increase,crop=1080:1350[portrait];[d]scale=1280:720[landscape]",
"-map", "[vertical]", "-map", "0:a", "-c:a", "copy", "-movflags",
"+faststart", "vertical.mp4", "-map", "[square]", "-map", "0:a",
"-c:a", "copy", "-movflags", "+faststart", "square.mp4", "-map",
"[portrait]", "-map", "0:a", "-c:a", "copy", "-movflags", "+faststart",
"portrait.mp4", "-map", "[landscape]", "-map", "0:a", "-c:a", "copy",
"-movflags", "+faststart", "landscape.mp4"
],
"outputs": ["vertical.mp4", "square.mp4", "portrait.mp4", "landscape.mp4"]
}'const res = await fetch("https://api.reelsdk.com/v1/ffmpeg?wait=120", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.REELSDK_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"inputs": {
"launch.mp4": "https://api.reelsdk.com/f/lib/in/use-cases/launch.mp4"
},
"args": [
"-i", "launch.mp4", "-filter_complex",
"[0:v]split=4[a][b][c][d];[a]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920[vertical];[b]scale=1080:1080:force_original_aspect_ratio=increase,crop=1080:1080[square];[c]scale=1080:1350:force_original_aspect_ratio=increase,crop=1080:1350[portrait];[d]scale=1280:720[landscape]",
"-map", "[vertical]", "-map", "0:a", "-c:a", "copy", "-movflags",
"+faststart", "vertical.mp4", "-map", "[square]", "-map", "0:a",
"-c:a", "copy", "-movflags", "+faststart", "square.mp4", "-map",
"[portrait]", "-map", "0:a", "-c:a", "copy", "-movflags", "+faststart",
"portrait.mp4", "-map", "[landscape]", "-map", "0:a", "-c:a", "copy",
"-movflags", "+faststart", "landscape.mp4"
],
"outputs": ["vertical.mp4", "square.mp4", "portrait.mp4", "landscape.mp4"]
}),
});
const { job } = await res.json();{
"job": {
"id": "job_qqbiramid9a8i1urxs7e",
"op": "ffmpeg",
"status": "succeeded",
"stage": null,
"created_at": "2026-11-07T02:01:01.997Z",
"finished_at": "2026-11-07T02:02:01.606Z",
"outputs": {
"vertical.mp4": "https://api.reelsdk.com/f/out/job_qqbiramid9a8i1urxs7e/vertical.mp4?s=...",
"square.mp4": "https://api.reelsdk.com/f/out/job_qqbiramid9a8i1urxs7e/square.mp4?s=...",
"portrait.mp4": "https://api.reelsdk.com/f/out/job_qqbiramid9a8i1urxs7e/portrait.mp4?s=...",
"landscape.mp4": "https://api.reelsdk.com/f/out/job_qqbiramid9a8i1urxs7e/landscape.mp4?s=..."
},
"result": null,
"duration_s": 30,
"error": null,
"usage": {
"output_seconds": 120,
"audio_seconds": 0,
"tts_characters": 0,
"images": 0
},
"poll_url": "https://api.reelsdk.com/v1/jobs/job_qqbiramid9a8i1urxs7e"
}
}Four sizes from one decode
The -filter_complex graph starts with [0:v]split=4[a][b][c][d], which decodes the 30 s, 1920x1080 launch.mp4 input once and copies the frames into four branches. Branches [a], [b] and [c] each run scale with force_original_aspect_ratio=increase followed by crop to fill 1080x1920 (9:16), 1080x1080 (1:1) and 1080x1350 (4:5), cutting the overflow from the center. The fourth branch, [d], skips the crop and runs scale=1280:720 to produce a 16:9 copy.
For the output files, each output maps one video branch plus 0:a, adds -movflags +faststart and uses -c:a copy so the original AAC track goes straight through. Because no -c:v is set, ffmpeg uses its default H.264 encoder, libx264, for all four MP4 files. From the 18.6 MB source, the four files come out between 5.9 MB for the 720p copy and 10.3 MB for the vertical one.
At a glance
Ways to resize a video to every social size
| Option | Price | Limits | What you run |
|---|---|---|---|
| ffmpeg on your own machine | Free; LGPL 2.1 or later, or GPL 2 or later with GPL libraries such as libx264 | Your CPU, disk and bandwidth | ffmpeg builds, a job queue, storage |
| AWS Lambda with an ffmpeg layer | $0.0000166667 per GB-second plus $0.20 per 1M requests (x86, US East) | 900 s per run, 10,240 MB memory and /tmp, 250 MB of code and layers, 6 MB sync payload | The layer, S3 in and out, retries |
| FFmpeg Micro | 1 token per 10 s of input, 500 tokens for $5 | 100 MB input on the free plan, 1,024 MB on Starter and Pro | API calls |
| ReelSDK | $0.02 per compute minute; about 2 cents for these 4 files | 500 MB per file, 1 GB per job, 10 minutes of run time, up to 20 outputs | One HTTP call |
Sources: FFmpeg license and legal, AWS Lambda quotas, AWS Lambda pricing, FFmpeg Micro pricing, checked November 2026.
Crop, blur or a ladder
A center crop from a 16:9 source drops the left and right sides of the frame. You'll want to keep the subject in the middle, or swap the crop for a blurred background instead (see the vertical video page).
The same split setup also builds a standard resolution ladder from a single decode. Passing [0:v]split=3[a][b][c];[a]scale=-2:720[v720];[b]scale=-2:480[v480];[c]scale=-2:360[v360] and mapping each branch with 0:a writes 720p.mp4 (1280x720), 480p.mp4 (854x480) and 360p.mp4 (640x360), where scale=-2:480 picked an even width of 854. That run billed about 19 seconds of compute, about two thirds of a cent.
curl "https://api.reelsdk.com/v1/ffmpeg?wait=120" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"launch.mp4": "https://api.reelsdk.com/f/lib/in/use-cases/launch.mp4"
},
"args": [
"-i", "launch.mp4", "-filter_complex",
"[0:v]split=3[a][b][c];[a]scale=-2:720[v720];[b]scale=-2:480[v480];[c]scale=-2:360[v360]",
"-map", "[v720]", "-map", "0:a", "720p.mp4", "-map", "[v480]", "-map",
"0:a", "480p.mp4", "-map", "[v360]", "-map", "0:a", "360p.mp4"
],
"outputs": ["720p.mp4", "480p.mp4", "360p.mp4"]
}'Cost and limits
This four-output job billed about 57 seconds of compute to fetch the input, run ffmpeg and store the files, which comes to about 2 cents for all four. Machine start-up isn't billed. On ReelSDK, pricing follows compute time at $0.02 per compute minute, billed per second with a 1 s minimum, not the number of outputs.
What it costs
What this job cost
- Compute: fetching the input, running ffmpeg and storing the files
- 57.1 s
- Rate
- $0.02 per compute minute
- Charged
- $0.0190
Billed per second with a 1 s minimum. Machine start-up is not billed, and failed jobs cost $0.
Limits
What one request takes
- Input files
- 500 MB each, 1 GB per job
- Job run time
- Up to 10 minutes
- Outputs per job
- Up to 20
- Frame size
- Up to 8192 px per side and 37.7 megapixels
- Waiting for a result
- 60 s by default, up to 300 s
- Output retention
- 7 days
How it works
From request to file
Host the input
Any public http or https URL on the default port works, as long as it has no username or password in it; ReelSDK downloads it before ffmpeg starts. A local file goes up with
POST /v1/uploads?filename=clip.mp4first: up to 100 MiB per upload, kept 7 days, and larger files go up as a multipart upload.Send the arguments
split=4makes four copies of the decoded video. Three go throughscalewithforce_original_aspect_ratio=increaseand acropto 1080x1920, 1080x1080 and 1080x1350; the fourth scales to 1280x720. Each output maps its branch plus0:a, and all four names go underoutputs.Download the result
Every file is listed under
job.outputs, and the links work for 7 days, so copy what you keep. For long jobs, send?wait=0with awebhook_urland fetchGET /v1/jobs/{id}when the webhook arrives.
FAQ
Questions, answered
How do I change the encoder or bitrate for one of the outputs?
Since args is just an array handed to ffmpeg, you can add -c:v or other encoding flags right before any output file name in the list. Leaving -c:v off uses libx264 by default, while -c:a copy keeps the existing AAC audio track without re-encoding it. Any allowlisted ffmpeg option placed between a -map pair and its output file applies to that output.
Why is the 480p copy 854x480?
In the ladder run, scale=-2:480 fixed the height and let ffmpeg pick the width that keeps the source shape, rounded to an even number, so the copy came out at 854x480. The same -2 in scale=-2:720 and scale=-2:360 gave 1280x720 and 640x360.
What if my source file is on disk instead of a URL, or the job runs over 60 seconds?
A single local upload takes up to 100 MiB and is kept 7 days, and files over 100 MiB up to the 500 MB input limit go up as a multipart upload. One request waits 60 s by default (and you can set it up to 300 s), so if a job runs longer than that, it keeps running in the background up to the 10-minute run time limit while you poll it or wait for a webhook. Output files are kept for 7 days.
How does the cost compare to FFmpeg Micro and AWS Lambda?
FFmpeg Micro charges 1 token per 10 seconds of input (at 500 tokens for $5, metered per second) and caps files at 100 MB on the free plan or 1,024 MB on Starter and Pro, whereas ReelSDK bills by compute time at $0.02 per minute so this 30 s input cost about 2 cents for four outputs and about two thirds of a cent for the three-output ladder. On AWS Lambda, you pay $0.0000166667 per GB-second (x86, US East) and $0.20 per 1M requests. On ReelSDK, failed jobs cost $0 and you get $0.50 of free credit at sign-up.
- Resize a video with ffmpegScale a video with scale=w:h: keep the aspect ratio with -2, fit a 1080x1920 frame with pad, and fix the odd-size error.
- Vertical video dimensionsThe 9:16 sizes TikTok, Instagram Reels and YouTube Shorts ask for, and the ffmpeg commands that turn any clip into 1080x1920.
- Vertical videoTurn 16:9 footage into a 1080x1920 vertical video with a blurred fill in one ffmpeg call, about a quarter cent per 30 s clip.
- Video compressionCompress a video to a size budget in one ffmpeg call: a 129 MB 1080p clip fits a 5 MB target at 4.6 MB, for under 1 cent.
- Video thumbnailsGrab a poster frame and a contact sheet with one frame per shot from one ffmpeg call, under a fifth of a cent for both.
- Video conversionConvert WebM, MKV or MOV to MP4 and back in one ffmpeg call, about a third of a cent for a 30 s clip.
- FFmpeg API reference: POST /v1/ffmpegPOST /v1/ffmpeg runs ffmpeg 8.1 with your own arguments: up to 50 inputs of 500 MB, 20 outputs and 600 s per command, with tested recipes for GIFs, thumbnails and subtitles.
Sources, checked November 2026
Ready to build?
Ship video from your app today
Your first $0.50 is free, and one key covers every endpoint.
