Crop 16:9 to 4:5 with video-filter: width 0.45 and an x offset
To crop 16:9 to 4:5 in Sume video-filter, use width 0.45, height 1 and an x between 0 and 0.55. Here is the math, the x choice and the output scale.

To cut a 4:5 portrait out of a 16:9 clip with Sume, send one crop op with width: 0.45, height: 1, y: 0 and an x between 0 and 0.55. Centered, that is x: 0.275. The crop values are fractions of the source frame, so you do not need to know the pixel size.
The rule comes from the video filter docs: x, y in [0, 1], width and height in [0.05, 1], and x + width and y + height must each be at most 1.
What is the math for 4:5 from 16:9?
A 16:9 frame has an aspect of 1.7778 and a 4:5 frame has 0.8. Keep the full height and the kept width is 0.8 divided by 1.7778, which is 0.45 of the source width. The widest x that still fits is 1 minus 0.45, so 0.55.
The crop is exact only for sources that are truly 16:9. The compiler even-rounds the compiled size for yuv420p, so a 1920x1080 source gives about 864x1080, which is a hair off 4:5 at the pixel level. Treat the result as 4:5 for display, not as a guaranteed 864x1080.
Where should the x offset go?
Pick x from where the subject sits, not by default. Here are three values.
| Subject position | x | Kept range of the source width |
|---|---|---|
| Left third | 0 | 0 to 0.45 |
| Centered | 0.275 | 0.275 to 0.725 |
| Right third | 0.55 | 0.55 to 1 |
What does the request look like?
Check first with the free check endpoint, then encode. Import the source before either call, because only media.sume.com URLs are accepted. Writes need an Idempotency-Key.
curl -X POST https://api.sume.com/v1/video-filter \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: crop-4x5-001" \
-d '{
"video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4",
"ops": [{"op":"crop","x":0.275,"y":0,"width":0.45,"height":1}]
}'What does Sume not do here?
It does not track a subject. The crop box is fixed for the whole clip, so a person who walks across the frame can leave it. For a moving subject, cut the clip with video trim into shots and crop each with its own x.
The op takes no pixel sizes and no scale. To land on exactly 1080x1350 you would add scale in the filtergraph, which runs after ops[]; scale is on the allowlist, but check the program first and read the compiled filters[] in the result.
Finally, the job is async by default. Poll GET /v1/jobs/:id/status, then read /result for the new video_url; the jobs page covers the details.
Sources
Related posts
More in Media tools
- Cut out a subject from a video frame: video frames, then RMBG
Pull a lossless PNG frame with Sume video frames (unbilled), then run RMBG 1.0 on it for a transparent PNG. Sume does not remove backgrounds from a whole video.
- Cut a Seedance 2.5 clip shorter: video-trim or regenerate?
To shorten a Seedance 2.5 clip, cut it with video-trim at $0.02 a job. Regenerating re-rolls the whole video and cannot go under the model's 4-second minimum.
- Cut out then upscale, or upscale then cut out? Order for PNG alpha
Upscale first, then remove the background last so nothing can drop alpha. Sume RMBG returns PNG with alpha; upscale takes output_format png, jpg or webp.
- Cyber Monday ad in 9:16, 1:1 and 16:9 from one clip with Timeline
Resize one offer video to vertical, square and landscape with Timeline 1.0 output width and height, fit blur or cover, for $0.30 across three renders.
Written by Sume