Crop 1920x1080 to 9:16 with an API: width 0.3164, x 0.3418
Center-crop a 16:9 clip to vertical with Sume video filter: the crop fractions, the arithmetic, and why 1280x720 falls under TikTok's 540x960 minimum.

To center-crop a 1920 x 1080 clip to 9:16 with Sume, send a crop op with x: 0.3418, y: 0, width: 0.3164, height: 1. Crop values are fractions of the source frame, so the same four numbers work for any 16:9 source. The job costs $0.02 and the source can be up to 300 seconds.
The arithmetic
The crop op takes x and y in [0, 1] and width and height in [0.05, 1], with x + width <= 1 and y + height <= 1. The compiler rounds the rectangle to pixels.
A 9:16 window of full height has a width of 9/16 of the height. For a 16:9 frame (width = 16/9 of the height) the width fraction is (9/16) / (16/9) = 81/256 = 0.3164. To center it, x = (1 - 0.3164) / 2 = 0.3418. On a 1920 x 1080 source that is a rectangle of about 608 x 1080 pixels.
| Source | width fraction | x fraction | Pixels cropped | Meets TikTok 540x960 minimum? |
|---|---|---|---|---|
| 1920x1080 | 0.3164 | 0.3418 | about 608x1080 | Yes |
| 1280x720 | 0.3164 | 0.3418 | about 405x720 | No: width under 540 |
| 3840x2160 | 0.3164 | 0.3418 | about 1215x2160 | Yes |
The platform minimum
TikTok's non-Spark ad specifications list vertical video at 9:16 with at least 540 x 960 pixels, horizontal at 960 x 540, and square at 640 x 640. File types are .mp4, .mov, .mpeg, .3gp, and .avi, with a length up to 10 minutes, a size of 500 MB or less, and a bitrate of at least 516 kbps (TikTok Ads help, read 2026-10-09).
A crop does not upscale. A 1280 x 720 source crops to about 405 x 720, which is under the 540 x 960 floor. Start from a 1080p or larger source, or conform the size with the trim step's exact-precision output option.
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-916-001" \
-d '{
"video_url": "https://media.sume.com/artifacts/artf_demo/wide.mp4",
"ops": [{ "op": "crop", "x": 0.3418, "y": 0,
"width": 0.3164, "height": 1 }]
}'Other source sizes
The fractions depend only on the aspect ratio, not the pixel size, so they hold for every 16:9 source. For a 4:3 source the width fraction is (9/16) / (4/3) = 27/64 = 0.4219, with x = (1 - 0.4219) / 2 = 0.2891. For a square source it is 0.5625 and x is 0.2188. Always check that x + width is at most 1; here 0.2188 + 0.5625 = 0.7813.
After the crop, the output keeps the source frame rate and audio. If you also need a file under TikTok's 500 MB ad limit or a minimum bitrate of 516 kbps, check the result's size and bitrate against the TikTok page before you upload it; video filter does not report them.
Check first
Run the same body against POST /v1/video-filter/check, which is free, and read diagnostics[] before you encode. Out-of-bounds fractions fail with video_filter_crop_out_of_bounds, which also fires if a side is under 0.05. The output keeps the source frame rate and audio unless the program changes them.
If your subject is not centered, move x and keep width: the rule is only that x + width stays at or below 1.
Sources
More in Media tools
- Crop a 1080x1920 clip to a 1080x1080 square for a TikTok 1:1 ad
TikTok's 1:1 ad needs 640x640 or more. A 9:16 source crops to a square with video filter height 0.5625 and y 0.21875, or y 0.1 to keep the top. $0.02.
- 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.
- Dim an avatar clip to 0.45 for overlay text: run the free check first
Darken a Sume avatar video with video-filter dim 0.45, run the unbilled /check call first, then pay $0.02 for the encode. What dim does and what it refuses.
- Does the Kling motion control prompt change the movement? No
On Sume's Kling 3.0 Motion Control route the motion video drives all movement and the prompt only steers appearance. Fields, limits and $0.1575 per second.
Written by Sume