Trim an H.265 or AV1 clip by API: which codec comes out?
DaVinci Resolve 21 lists H.265, MV-HEVC and AV1. Sume's exact trim re-encodes to libx264 yuv420p; keyframe trim copies the stream. Input support is not listed.

Sume's precision: "exact" trim (the default) re-encodes the cut with libx264 and yuv420p into MP4, so the output is H.264 whatever the source was. precision: "keyframe" copies the stream instead, so the codec stays the source's. The docs do not list which source codecs are accepted, so try a short trim of your own file first ($0.02 per job).
Blackmagic's DaVinci Resolve 21 page lists the codecs "H.265, MV-HEVC (4:2:0 and 4:2:2), AV1". Sume's side is from the Video trim docs, read 2026-09-30.
What does each precision mode do?
exact is a frame-accurate re-encode. keyframe is a stream copy: the cut may start a GOP early, so re-base against actual_start_seconds in the result. output (width, height, fps) is allowed with exact only, otherwise video_trim_output_requires_exact.
curl -X POST https://api.sume.com/v1/video-trim \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: trim-codec-001" \
-d '{
"video_url": "https://media.sume.com/artifacts/artf_demo/hevc-source.mp4",
"start": 2,
"duration": 8,
"precision": "exact"
}'What happens to the audio?
audio is keep (default) or drop. An exact trim remuxes kept audio as AAC. The result reports precision, audio and output so you can confirm what you got.
What does the docs not promise?
Nothing in the trim docs says AV1, MV-HEVC or 4:2:2 sources are accepted or preserved. A source that is not a video fails unsupported_media_type, and one over 1800 s fails source_duration_exceeded. Treat other codecs as untested until a small trim of your own file succeeds.
| precision | What happens | Codec out |
|---|---|---|
| exact (default) | Frame-accurate re-encode | libx264, yuv420p |
| keyframe | Stream copy, may start a GOP early | Same as source |
Sources
Related posts
More in Developers
- waitForRun family: agent, action or format for a run id?
In @sume-com/sdk, waitForRun needs family: format, action or agent because a run id does not say which surface it belongs to. Use agent for Agent Completions.
- Webhook rate limits: Zapier, Airtable, Pipedream vs a bulk of 100
Zapier, Airtable and Pipedream each publish a webhook intake limit. Compare them with a Sume bulk queue of up to 100 items and pick a receiver that fits.
- What not to log from an AI API: keys, signed URLs, private media
Safe to log: request ids, job ids, status and sanitized media metadata. Unsafe: API keys, signed URLs, raw private media URLs and excess user content.
- Zapier Catch Hook test trigger with Sume Send test
Zapier lists the three most recent webhooks from the past hour. Use Sume's Send test to put a signed webhook.test sample there before a real run exists.
Written by Sume