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.

5 min readSume
All posts

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.

Center crop to 1:1 for each Sume avatar aspect ratio (video-filter fractions, read 2026-10-09)
Source ratioCrop opWhy
9:16 (default)x 0, y 0.21875, width 1, height 0.56259/16 = 0.5625 of the height; (1 - 0.5625) / 2 = 0.21875
3:4x 0, y 0.125, width 1, height 0.753/4 = 0.75 of the height; (1 - 0.75) / 2 = 0.125
4:3x 0.125, y 0, width 0.75, height 13/4 = 0.75 of the width; (1 - 0.75) / 2 = 0.125
16:9x 0.21875, y 0, width 0.5625, height 19/16 = 0.5625 of the width; (1 - 0.5625) / 2 = 0.21875
1:1nothing to cropalready 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

All Media tools posts

Written by Sume