Crop an avatar video to 1:1: video-filter fractions for every ratio
Exact x, y, width and height fractions that turn a 9:16, 3:4, 4:3 or 16:9 Sume avatar clip into a centered square with video-filter, $0.02 a job.
To crop a Sume avatar video to a centered square, send Video filter a crop op with fractions of the frame: for a 9:16 clip that is x 0, y 0.21875, width 1 and height 0.5625. Other ratios use the same rule, and the table below gives all four. The job costs $0.02 and returns a new MP4; the source is not changed.
You may want this when you rendered the default 9:16 but a placement wants 1:1. You can also render a 1:1 avatar video directly, since 1:1 is one of the five supported ratios. Cropping is the cheaper fix when a clip already exists.
The fractions
Video filter takes a crop rectangle as fractions of the source frame, not pixels. x and y are in 0 to 1, width and height are in 0.05 to 1, and x + width and y + height must not pass 1. The compiler rounds to even values for yuv420p. Because the numbers are fractions, they work for any resolution; no pixel dimensions are assumed here.
| Source ratio | Crop op | Why |
|---|---|---|
| 9:16 (default) | x 0, y 0.21875, width 1, height 0.5625 | 9/16 = 0.5625 of the height; (1 - 0.5625) / 2 = 0.21875 |
| 3:4 | x 0, y 0.125, width 1, height 0.75 | 3/4 = 0.75 of the height; (1 - 0.75) / 2 = 0.125 |
| 4:3 | x 0.125, y 0, width 0.75, height 1 | 3/4 = 0.75 of the width; (1 - 0.75) / 2 = 0.125 |
| 16:9 | x 0.21875, y 0, width 0.5625, height 1 | 9/16 = 0.5625 of the width; (1 - 0.5625) / 2 = 0.21875 |
| 1:1 | nothing to crop | already square |
The request
The video must already be a media.sume.com artifact or asset of your workspace; the API does not fetch open-internet URLs, so import first. An Idempotency-Key is required. Use the free /v1/video-filter/check call first: it validates the program and returns diagnostics without creating a job.
curl -X POST https://api.sume.com/v1/video-filter \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: square-crop-001" \
-d '{
"video_url": "https://media.sume.com/artifacts/artf_demo/avatar.mp4",
"ops": [{"op": "crop", "x": 0, "y": 0.21875, "width": 1, "height": 0.5625}]
}'Check the framing before you crop
A center crop assumes the subject is in the middle of the frame. Look at one still from the clip first. If the face sits high in a 9:16 frame, lower y toward 0 so the window moves up, and keep y + height at or under 1. For example y 0.1 with height 0.5625 ends at 0.6625, which is valid.
Captions burned into the avatar job are part of the pixels, so crop before you add captions with the separate video-captions job, or check that inline captions survive. Video filter takes sources up to 300 seconds, well past the 60-second avatar maximum.
Sources
Related posts
More in Media tools
- Cut out and upscale a product photo: $0.2225 per image on Sume
RMBG is $0.0225 and Image Upscale is $0.20, so a cutout plus upscale is $0.2225 per photo whichever step goes first. A 400-photo catalog is $89.00.
- Cutting out 1,000 product photos on Sume costs $22.50
Remove background (RMBG 1.0) is $0.0225 per image in the Sume catalog, so cutting out 1,000 product photos is $22.50. Rate read 2026-10-09.
- Cutting out 10,000 product photos on Sume costs $225.00
Remove background (RMBG 1.0) is $0.0225 per image in the Sume catalog, so cutting out 10,000 product photos is $225.00. Rate read 2026-10-09.
- Cutting out 100 product photos on Sume costs $2.25
Remove background (RMBG 1.0) is $0.0225 per image in the Sume catalog, so cutting out 100 product photos is $2.25. Rate read 2026-10-09.
Written by Sume