All toolsvideo compression API

Compress Video for Web

Reduce video file size while preserving a crisp, web-ready image. Run the preset directly on this page or call the same agent-ready endpoint from your product.

Prefer the shell? Compress a video with FFmpeg, the verified FFmpeg command for this edit.

LIVE TOOL
Run compress video
Drop a video, adjust the defaults if you need to, and download the result here.

or ·

Already have an account? Sign in

BEFORE / AFTER

See what the tool changes.

A real example: the after side is the unedited output of a KinoPipe job. Run the live form above to generate the same result from your own media.

BeforeOriginal video
Original
16.3 MB
AfterCompressed MP4
Ready
−44% size
9.1 MB

Demo footage: public-domain timelapses (Bureau of Land Management, Oregon · NASA SVS). Processed by the same pipeline the API and MCP tools call.

Useful defaults, typed options.

The tool slug stays stable while your agent supplies named media inputs and a narrow set of documented options.

  • Faster page loads
  • Lower storage and transfer costs
  • Predictable MP4 output
What this preset does
  1. 01Inspect the source codec
  2. 02Encode with H.264
  3. 03Optimize bitrate and CRF
  4. 04Move metadata for fast start
Stable endpointPOST /api/v1/tools/compress-video
Live API request
{
  "inputs": [{ "id": "main", "url": "https://example.com/video.mp4" }],
  "options": { "quality": "balanced" }
}
Successful output example
{
  "result": {
    "output": {
      "filename": "compress-video-output.mp4",
      "contentType": "video/mp4",
      "byteSize": 437021,
      "downloadUrl": "https://cdn.kinopipe.com/…"
    }
  }
}

The command this runs

ffmpeg -i input.mp4 -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 160k -movflags +faststart output.mp4
-crf 23
The quality target. Lower means better and bigger, and every step of about 6 halves or doubles the file. 23 is the x264 default and what quality: "balanced" sends.
-preset medium
How long the encoder is allowed to think. A slower preset finds a smaller file at the same CRF. It does not make the picture better, it makes the same picture cheaper to store.
-c:a aac -b:a 160k
Audio is re-encoded rather than copied, so the output plays everywhere without a container surprise.
-movflags +faststart
Moves the index to the front of the file so a browser can start playing before the download finishes. Every MP4 we write gets this, whether you ask or not.

What it costs and how long it takes

Median wall clock on 60-second fixtures, warm workers, measured 2026-08-25.

Hardware$/hourfastbalanced4K to 1080p
CPU, 4 vCPU / 8 GB0.16813.5 s21.9 s28.5 s
CPU, 8 vCPU / 16 GB0.33610.0 s16.2 s20.3 s
RTX A4000, 16 GB0.5768.2 s9.3 s11.0 s
A40, 48 GB1.2248.2 s11.5 s12.2 s

The A40 costs more than twice the A4000 and finished no sooner on any of the three, which is why the pool runs A4000s. H.264 encoding stops scaling with the card long before the card runs out of room.

The three quality options, and what they actually send

fast becomes -preset veryfast -crf 27. balanced, the default, becomes -preset medium -crf 23. quality becomes -preset slow -crf 20. That is the whole mapping; there is nothing else behind the words.

Most people should leave it on balanced. Reach for fast when the output is a preview nobody keeps, and for quality when the file is going to be re-encoded again downstream and you want the generation loss to start from a better place.

What this will not do

It will not hit a target file size. CRF is a quality target, so the size falls out of the source rather than out of your request. If you need "under 8 MB for Discord", that is a two-pass encode against a computed bitrate, and we do not expose one yet.

It will not rescue an already-compressed file. Feeding a CRF 23 file back through CRF 23 mostly re-encodes the compression artifacts and hands you a slightly worse video of nearly the same size.

It will not resize on its own. Pass width or height and you get both in a single decode and encode instead of two round trips.

Doing it yourself

The command at the top is the whole job, and if you already have FFmpeg on the machine that runs your code, use it. What you are paying for here is that an agent can call this without a shell, that a bad value comes back as a typed error instead of a crash halfway through an encode, and that the encode happens on a worker rather than on the box serving your users.

Know the boundaries before you run.

Inputs are limited to 300 MB each and 600 MB combined.
Output size varies with motion and source codec.
The current preset returns H.264 MP4.

About compress video

There is no honest single number, because CRF targets a quality level and lets the size land where it lands. A 4K screen recording with little motion can lose 90% of its bytes. A phone clip that already left the camera at roughly this quality will barely move.

Not by default. Add width or height options when you want compression and resizing in the same job.

Related media tools