ReelSDK cuts any span out of a video URL with one POST /v1/ffmpeg at $0.02 per compute minute, so a frame-accurate 10-second cut costs under a fifth of a cent. With -c copy it costs even less but snaps to keyframes.

Trim video API

Yes: pass the span as -ss 6 -to 16 and ReelSDK returns those 10 seconds as an MP4; one job can write up to 20 clips from the same source.

Use casesUpdated

liftoff.mp4: 6 s to 16 s of the 30-second NASA launch clip, cut on the exact frame.Input: launch.mp4liftoff.mp4 (6.3 MB)liftoff-copy.mp4 (7.3 MB)

The request

POST /v1/ffmpeg

Cut a clip out of a longer video by URL, frame-accurate or by stream copy, for under a fifth of a cent per 10-second cut.

terminalTry it
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
  -H "Authorization: Bearer $REELSDK_KEY" \
  --json '{
    "inputs": {
      "launch.mp4": "https://api.reelsdk.com/f/lib/in/use-cases/launch.mp4"
    },
    "args": [
      "-ss", "6", "-to", "16", "-i", "launch.mp4", "-c:v", "libx264", "-crf",
      "20", "-preset", "veryfast", "-c:a", "aac", "-b:a", "160k",
      "-movflags", "+faststart", "liftoff.mp4"
    ],
    "outputs": ["liftoff.mp4"]
  }'
request.mjsTry it
const res = await fetch("https://api.reelsdk.com/v1/ffmpeg?wait=60", {
  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": [
      "-ss", "6", "-to", "16", "-i", "launch.mp4", "-c:v", "libx264", "-crf",
      "20", "-preset", "veryfast", "-c:a", "aac", "-b:a", "160k",
      "-movflags", "+faststart", "liftoff.mp4"
    ],
    "outputs": ["liftoff.mp4"]
  }),
});
const { job } = await res.json();
response.json
{
  "job": {
    "id": "job_kvlcnbwntsn945a9e5wd",
    "op": "ffmpeg",
    "status": "succeeded",
    "stage": null,
    "created_at": "2026-11-07T01:20:08.871Z",
    "finished_at": "2026-11-07T01:20:23.804Z",
    "outputs": {
      "liftoff.mp4": "https://api.reelsdk.com/f/out/job_kvlcnbwntsn945a9e5wd/liftoff.mp4?s=..."
    },
    "result": null,
    "duration_s": 10.01,
    "error": null,
    "usage": {
      "output_seconds": 10.01,
      "audio_seconds": 0,
      "tts_characters": 0,
      "images": 0
    },
    "poll_url": "https://api.reelsdk.com/v1/jobs/job_kvlcnbwntsn945a9e5wd"
  }
}

Exact cuts vs. -c copy

In the run above, POST /v1/ffmpeg trimmed launch.mp4 from 6 s to 16 s with -ss 6 -to 16 before -i launch.mp4. Because it re-encoded the video with -c:v libx264 -crf 20 -preset veryfast and the audio with -c:a aac -b:a 160k, the cut landed right on the timestamps. Fetching the source, running ffmpeg and storing liftoff.mp4 billed about 5 seconds of compute, which is under a fifth of a cent.

If you don't need a frame-exact cut, swap the codec flags for -c copy: -ss 6 -to 16 -i launch.mp4 -c copy -movflags +faststart liftoff-copy.mp4. That run skipped re-encoding, so the cut snapped to a keyframe and ran slightly long, and it billed under 2 seconds of compute, about a third of what the exact cut cost.

Stream copyTry it
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
  -H "Authorization: Bearer $REELSDK_KEY" \
  --json '{
    "inputs": {
      "launch.mp4": "https://api.reelsdk.com/f/lib/in/use-cases/launch.mp4"
    },
    "args": [
      "-ss", "6", "-to", "16", "-i", "launch.mp4", "-c", "copy", "-movflags",
      "+faststart", "liftoff-copy.mp4"
    ],
    "outputs": ["liftoff-copy.mp4"]
  }'

At a glance

Ways to trim a video

Ways to trim a video
OptionPriceLimitsWhat you run
ffmpeg on your own machineFree; LGPL 2.1 or later, or GPL 2 or later with GPL libraries such as libx264Your CPU, disk and bandwidthffmpeg 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 payloadThe layer, S3 in and out, retries
FFmpeg Micro1 token per 10 s of input, 500 tokens for $5; a 10 s clip: 1 token, $0.01100 MB input on the free plan, 1,024 MB on Starter and ProAPI calls
ReelSDK$0.02 per compute minute; under a fifth of a cent for this 10 s cut500 MB per file, 1 GB per job, 10 minutes of run timeOne HTTP call

Sources: FFmpeg license and legal, AWS Lambda quotas, AWS Lambda pricing, FFmpeg Micro pricing, checked November 2026.

Cutting multiple clips from one input

You don't need a separate API call for every clip when you're slicing up the same video. A single job can write up to 20 files in outputs, each cut from its own time span of the file in inputs, and ReelSDK fetches the source once for the whole run.

In args (which goes straight to ffmpeg as a JSON array without a shell), you repeat the output flags and output file name for each span you want back, then list all those file names in outputs.

  • Up to 20 outputs per job
  • Up to 50 inputs per job
  • Output files are kept for 7 days

Cost and limits

Raw ffmpeg jobs on ReelSDK cost $0.02 per compute minute, billed per second with a 1 s minimum. You pay for the time spent fetching inputs, running ffmpeg and storing outputs; machine start-up isn't billed, and failed jobs cost $0 (you also get $0.50 of free credit at sign-up). The pricing page has the full rate card, and the FFmpeg Micro comparison covers token billing.

What it costs

What this job cost

Compute: fetching the inputs, running ffmpeg and storing the file
5.0 s
Rate
$0.02 per compute minute
Charged
$0.0017

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
Waiting for a result
60 s by default, up to 300 s
Output retention
7 days

How it works

From request to file

  1. 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.mp4 first: up to 100 MiB per upload, kept 7 days, and larger files go up as a multipart upload.

  2. Send the arguments

    -ss 6 -to 16 before -i sets the span. Re-encoding with -c:v libx264 -crf 20 makes the cut land on the exact frame; -c copy instead keeps the original streams and starts at the nearest keyframe. List the file name under outputs.

  3. 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=0 with a webhook_url and fetch GET /v1/jobs/{id} when the webhook arrives.

FAQ

Questions, answered

How did the encoding settings affect the output size and quality?

The source launch.mp4 is 30 s of 1080p H.264 and AAC, 18.6 MB. Re-encoding the 10-second span with -c:v libx264 -crf 20 -preset veryfast -c:a aac -b:a 160k -movflags +faststart kept the 1080p resolution and brought liftoff.mp4 in at 6.3 MB. Using -c copy kept the original streams untouched for a 7.3 MB file, though the clip ran a little long because the cut snapped to a keyframe.

Can I trim a local file instead of passing a URL?

Yes, you can upload a local file first and pass it in inputs. A single upload takes up to 100 MiB and is kept for 7 days. If your file is over 100 MiB, it goes up as a multipart upload, up to the 500 MB per-file limit.

Why does a 10 s trim cost under a fifth of a cent here vs. $0.01 on FFmpeg Micro?

ReelSDK bills $0.02 per compute minute down to the second (1 s minimum), so about 5 seconds of compute for the re-encoded clip comes to under a fifth of a cent, and the -c copy run costs about a third of that. FFmpeg Micro bills 1 token per 10 seconds of the trimmed clip, metered per second, which makes a 10 s clip 1 token, or $0.01 when you buy a top-up of 500 tokens for $5. On AWS Lambda, you'd pay $0.0000166667 per GB-second (x86, US East) plus $0.20 per 1M requests.

Ready to build?

Ship video from your app today

Your first $0.50 is free, and one key covers every endpoint.

Moonlit lake with a lit cabin under the mountains