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.

5 min readSume
All posts

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.

16:10 sources cropped with width 0.351563, height 1 (arithmetic from the compiler's floor-to-even rule; limits read 2026-10-07)
SourceIdeal 9:16 widthCropped widthOutput
2560x1600900900900x1600, exactly 9:16
1920x1200675 (odd)674674x1200, about 0.15 percent narrow
1680x1050590.6590590x1050
1440x900506.25506506x900

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

All Media tools posts

Written by Sume