Crop a video by fractions and the out-of-bounds error
The video filter crop op takes fractions of the frame, not pixels. Rules, the 0.05 minimum, the out-of-bounds error, and a centered 9:16 crop of a 16:9 clip.

The crop operation of Sume's video filter takes a rectangle as fractions of the source frame, not pixels: x, y, width and height, each between 0 and 1. If the rectangle leaves the frame, or a side is under 0.05, the request is refused with video_filter_crop_out_of_bounds.
The rules are from the Video filter docs, read 2026-09-29; the 9:16 numbers are arithmetic on a 16:9 source.
What are the crop rules?
The compiler rounds the result to even pixel sizes for yuv420p, so the output can be a pixel off the exact fraction.
| Field | Range |
|---|---|
x, y | 0 to 1 |
width, height | 0.05 to 1 |
x + width | At most 1 |
y + height | At most 1 |
How do I crop the center 9:16 out of a 16:9 clip?
Keep the full height, so height is 1 and y is 0. A 9:16 window is 9/16 of the height wide; against a 16:9 frame that is (9/16) / (16/9), about 0.3164 of the width. Center it with x = (1 - 0.3164) / 2, about 0.3418.
This cuts away the sides, so anything there is lost; it is a crop, not a reframe that keeps the whole picture.
curl -X POST https://api.sume.com/v1/video-filter \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: video-filter-crop-001" \
-d '{"video_url":"https://media.sume.com/artifacts/artf_demo/talk.mp4","ops":[{"op":"crop","x":0.3418,"y":0,"width":0.3164,"height":1}]}'What if I need something the crop op cannot do?
Other pixel work goes in filtergraph, a filters-only ffmpeg graph applied after ops[]. It is limited to 2048 characters and 32 named filters, and only allowlisted filters work; drawtext, subtitles, movie and lut3d are not on the list. Run the free /v1/video-filter/check first to see a program's diagnostics.
Are there other limits?
The source can be up to 300 seconds, at most 8 ops run per request, and an encode is listed at $0.02 per job (confirm in GET /v1/catalog).
Sources
Related posts
More in Media tools
- seek fast or precise: which to use for video inspect stills
Video inspect's seek option: precise decodes the exact instant, fast snaps to the keyframe at or before it and skips the decode. What changes in the result.
- Transcribe a video into sentence segments with Sume: options and cost
video inspect with transcribe true returns text, words and, with sentence segmentation, gapless caption-line segments. Options, the $0.01 per minute rate.
- WooCommerce product image size: defaults and crop settings
WooCommerce shows product images 600 px wide uncropped, grid thumbnails 300 px wide cropped square, and gallery thumbnails at 100×100 by default.
- YouTube audio ads: specs, length, and the 2026 US change
YouTube audio ads run up to 30 seconds as a YouTube video, not an MP3. From Sept. 1, 2026, US-targeted ones sell only through Pandora and SiriusXM.
Written by Sume