Crop a 16:10 MacBook screen recording to 9:16: width 0.3516
A 16:10 recording needs crop width 0.3515625 for 9:16: 900x1600 at 2560x1600, but 674x1200 at 1920x1200 because 675 is odd. The request and the rounding.
To crop a 16:10 screen recording to 9:16 with Sume video filter, keep the full height and use a crop width of 0.3515625 of the frame. The number is the 9:16 ratio divided by the 16:10 ratio, 0.5625 / 1.6. Centre it with x = (1 - 0.3515625) / 2 = 0.32421875. The crop op takes fractions, so the same request serves a 2560x1600 and a 1920x1200 recording.
The even-pixel rule changes the answer
The compiler rounds crop sides and offsets down to the nearest even value, because yuv420p needs even dimensions. Whether your crop is exactly 9:16 therefore depends on the pixel size of the source. The fraction is sent with six decimals, so 0.3515625 is written as 0.351563, which is a hair above the exact value. That tiny excess is what keeps an even result from rounding down a step.
| Source | Ideal 9:16 width | Cropped width | Output |
|---|---|---|---|
| 2560x1600 | 900 | 900 | 900x1600, exactly 9:16 |
| 1920x1200 | 675 (odd) | 674 | 674x1200, about 0.15 percent narrow |
| 1680x1050 | 590.6 | 590 | 590x1050 |
| 1440x900 | 506.25 | 506 | 506x900 |
Why the odd widths do not matter much
A 674x1200 strip is off 9:16 by about one pixel in 675. The next step is a scale to the delivery size, and scale=1080:1920 stretches that sliver imperceptibly. For a screen recording with text an exact aspect is rarely needed, but check one frame with video frames at full size before you batch the rest.
The request
Ops run before the graph, so the crop sees the original frame and the scale sees the strip. The source must be 300 seconds or shorter; a longer demo needs a video trim first. A filter encode is $0.02 per job, and POST /v1/video-filter/check validates the same body for free.
{
"video_url": "https://media.sume.com/artifacts/artf_demo/demo.mp4",
"ops": [
{ "op": "crop", "x": 0.324219, "y": 0, "width": 0.351563, "height": 1 }
],
"filtergraph": "scale=1080:1920"
}What the crop throws away
The strip is about 35 percent of the width. A 16:10 desktop usually has its toolbar and content spread across the whole frame, so a centre crop can cut off the sidebar you meant to show. Move x toward 0 for a left-aligned window or toward 1 - width (0.648437) for one on the right, or crop the browser chrome off first, as in the screen recording crop post. A crop never resizes the content, so text that was 14 px high stays 14 px high until the scale step enlarges it.
Sources
Related posts
More in Media tools
- Crop a 2:1 landscape phone recording to 9:16: width 0.28125
A 2:1 (18:9) landscape clip needs width 0.28125 for 9:16: exact at 1920x960 (540x960), 606 px at 2160x1080. The offset, the rounding and the full request.
- Crop a 5:4 monitor clip to 9:16: width 0.45 and the exact sizes
A 5:4 clip crops to 9:16 with width 0.45 and x 0.275. At 1280x1024 that is 576x1024, at 1600x1280 it is 720x1280. Two sizes, one body, and why it is exact.
- How many 6-second clips fill a 3-minute Short, Reel or TikTok ad?
A 3-minute Short needs 30 six-second clips, a 20-minute Reel 200, a 10-minute TikTok ad 100. Slot limits, chunked renders and Timeline cost for each.
- Pan and scan a 1.85:1 trailer to vertical: one crop per shot
For a 1.85:1 trailer, trim each shot, then crop it at its own x offset: width 0.304054, x 0 to 0.695946. A three-shot plan with job count, cost and order.
Written by Sume