Fix tilted video perspective by API with the perspective filter

Sume's video filter allowlists ffmpeg's perspective filter, so you can pull a keystoned phone clip back to a rectangle. You choose the four corner points.

4 min readSume
All posts

Yes, with corner points you supply. perspective is on the allowlist for POST /v1/video-filter, so a graph can remap the four corners of a keystoned clip and return a new MP4. Sume has no auto-straighten: nothing detects the tilt for you.

Higgsfield's changelog dated Sep 4, 2026 describes 3D Jutsu, which turns a prompt or reference into an editable 3D scene with cameras and layout, then into video. That is camera control before generation. This post is the other direction: repairing perspective in footage you already have, per Video filter, read 2026-10-01.

How do I run the correction?

Import the clip with POST /v1/media-imports, then send a filtergraph. The corner values below are placeholders from ffmpeg's perspective filter syntax, not a Sume preset: x0,y0 is top-left, x1,y1 top-right, x2,y2 bottom-left, x3,y3 bottom-right, and W/H are the frame size. Measure your own points on a still first.

curl -X POST https://api.sume.com/v1/video-filter \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: perspective-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/clip.mp4",
    "filtergraph": "perspective=x0=0:y0=0:x1=W:y1=0:x2=0:y2=H:x3=W:y3=H:sense=destination"
  }'

How do I test before paying for the full clip?

Call POST /v1/video-filter/check with the same body. It is free and returns valid plus diagnostics from the allowlist and source preflight; it does not run the encoder, so a bad expression can still fail on the box. Cut a short sample with video trim and filter that first.

Warped edges often need a crop afterwards. A crop op runs before the filtergraph, so for crop-after-perspective put a crop filter inside the graph instead. Crop op values are fractions of the frame.

What is the difference from rotate and lenscorrection?

rotate fixes a level horizon, lenscorrection fixes barrel or pincushion bulge (see lens distortion), and perspective fixes converging lines. All three are on the same allowlist and can be chained in one graph, within the 32-filter cap.

What are the limits?

Video filter limits from the Sume docs, read 2026-10-01.
ItemValue
Price$0.02 per encode job; the check is free
SourceUp to 300 seconds, on media.sume.com
GraphUp to 2048 chars and 32 named filters; no [0:v] stream specifiers
Auto-detect tiltNone; corners are yours
OutputKeeps source geometry, frame rate and audio unless the program changes them

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume