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.
- Wan 3.0 reference video requirements: 15 seconds and 16 fps
On Sume, wan-3.0 reference videos total 15 seconds or less and need 16 fps or more, up to 5 clips. Check each clip with video inspect and trim to fit.
- Webhook 410 Gone and 3xx: what Sume does with each
Sume has no special 410 handling and does not follow redirects. Any non-2xx, including 410 or 301, burns one of ten attempts. Here is the fix for each case.
- Consume webhooks at your own pace: Sume has no offset commit
Sume has no polling endpoint with offset commits. Page GET /v1/jobs with starting_after, read each job's status, and keep your own cursor.
Written by Sume