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.

4 min readSume
All posts

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.

Trim precision and codec (https://docs.sume.com/models/video-trim, read 2026-09-30)
precisionWhat happensCodec out
exact (default)Frame-accurate re-encodelibx264, yuv420p
keyframeStream copy, may start a GOP earlySame as source

Sources

Related posts

More in Developers

All Developers posts

Written by Sume