Crop a 21:9 or 2.39:1 film clip to 9:16 with video filter

Width fractions for cropping ultrawide 21:9, 2.39:1 and 32:9 clips to 9:16 with one Sume video-filter crop op, plus the 0.05 minimum side and a free check.

3 min readSume
All posts

To crop an ultrawide clip to 9:16, keep the full height and set the crop width to (9/16) divided by the source aspect ratio: 0.2411 for 21:9, 0.2354 for 2.39:1, and 0.1582 for 32:9. Sume's crop op takes fractions of the frame, so these numbers go straight into the request (Video filter).

Width fractions

Height is 1 in every row. Pick x to centre the strip: x = (1 - width) / 2.

Derived from the 9:16 target; the crop op needs side >= 0.05
Source ratioCrop widthCentred x
16:90.31640.3418
2:10.28130.3594
21:90.24110.3795
2.39:10.23540.3823
32:90.15820.4209

The request

For a centred 2.39:1 crop, send the same body to POST /v1/video-filter/check first (unbilled, returns valid and diagnostics), then encode at $0.02 for the 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: crop-239-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/scope.mp4",
    "ops": [{"op": "crop", "x": 0.3823, "y": 0, "width": 0.2354, "height": 1}]
  }'

What to watch

  • The compiler rounds the crop to even values for yuv420p, so the strip can differ by a pixel from your arithmetic.
  • The crop keeps the source frame rate and audio. It does not scale: a narrow strip is smaller than 1080x1920, so scale in the timeline step with fit: cover.
  • Source clips are limited to 300 s for video filter.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume