Resize a clip while trimming: output needs precision exact
Sume video trim takes output {width, height, fps} only with precision exact, the default. With keyframe you get video_trim_output_requires_exact. $0.02 a job.

Yes, Sume video trim can resize and change the frame rate in the same job as the cut, but only with precision: exact, which is the default. Send output with width, height and fps, and the exact re-encode conforms the clip. If you ask for precision: keyframe and output together, the request is refused with video_trim_output_requires_exact.
The reason is in how the modes work, described in the video trim docs: keyframe is a stream copy, so there is nothing to scale, while exact re-encodes with libx264 in yuv420p. One job costs $0.02 either way, per the catalog.
The output block
output is { width, height, fps }. If you leave it out, the output keeps the source values.
| Field | Accepts | Note |
|---|---|---|
| width | 256 to 2160 | Pixels |
| height | 256 to 2160 | Pixels |
| fps | 24, 25, 30 or 60 | Other rates are refused |
| precision | exact (default) or keyframe | output works with exact only |
| audio | keep (default) or drop | Exact remuxes kept audio as AAC |
A 9:16 example
To cut seconds 12 to 27 of a master and deliver a 720x1280 clip at 30 fps, send one job. The range is 15 seconds, within the 0.2 to 900 second output limit, and the source must be 1800 seconds or shorter. A separate rescale job would add a second fee, so combining them costs $0.02 instead of two jobs.
Pick sizes that match the aspect ratio of the source or accept that the content will be conformed to the box you name; check one output before a batch.
{
"video_url": "https://media.sume.com/artifacts/artf_demo/master.mp4",
"start": 12,
"end": 27,
"precision": "exact",
"output": { "width": 720, "height": 1280, "fps": 30 },
"audio": "keep"
}When keyframe is still the right choice
Keyframe is for quick, lossless cuts where the exact start does not matter. The cut can begin a GOP early, so re-base your times with actual_start_seconds from the result. If you later find you need a new size, run a second exact trim, or use video filter for a crop.
- Cut and conform together: exact, with
output. - Cut only, fast: keyframe, no
output. - A trim past the end of the source is clamped and warns
trim_clamped_to_source. - Import the file first; the source must already be on your workspace's media host.
Checking the result
The result returns the new MP4 as a durable artifact plus duration_seconds, actual_start_seconds, precision, audio and output, and optional warnings[]. Compare the returned values with what you asked for. If the output is the wrong shape, you have not lost the source: the original is never changed, and a second trim costs another $0.02.
For a batch of 50 clips that all need 720x1280 at 30 fps, the cost is 50 x $0.02 = $1.00, and each job needs its own idempotency key.
Choosing sizes
The width and height range of 256 to 2160 covers the common delivery sizes: 720x1280 for vertical social, 1080x1920 for full-height vertical, and 1280x720 or 1920x1080 for landscape. The upper bound of 2160 applies to each side separately, so a 3840-wide landscape frame is outside it. For a larger output, use video upscale, which takes a public HTTPS URL and a factor from 1.1 to 4 at $0.009 per video second.
One more option: the default frame rate keeps the source value. Set fps only when the destination needs a fixed rate, since a conform to 24, 25, 30 or 60 re-times the clip.
Sources
Related posts
More in Media tools
- Runway Enhance Frame Rate (24 to 120 fps) vs Sume's fps conform
Runway's Enhance Frame Rate converts video to 24-120 fps at 1 credit per 2 seconds. Sume's trim only conforms to 24, 25, 30 or 60 fps.
- Score a six-image moodboard: six music beds from stills for $0.75
Music 1.0 and the Music Router take an optional image_url. Six stills, six beds, $0.125 each: $0.75. What the image does, what it does not, and the limits.
- Snapchat Commercials: 3-6 s or 7-180 s, a 6.5 s cut fits neither
Snapchat lists Standard Commercials at 3 to 6 seconds and Extended Play at 7 to 180. Cut to the exact second with video trim exact and check duration_seconds.
- Snapchat Commercials need H.264: trim keyframe copies the source codec
Snapchat lists H.264 mp4 or mov for Commercials. Video trim keyframe is a stream copy, exact re-encodes to libx264, so use exact if the source is not H.264.
Written by Sume