Trim the first 0.6 s off an avatar clip: exact vs keyframe, $0.02

Cut a lead-in off a 22-second Sume avatar video with video-trim: exact re-encode or keyframe copy, what actual_start_seconds means, and the total cost.

5 min readSume
All posts

To cut a short lead-in off a finished Sume avatar video, send the clip to Video trim with start: 0.6 and end: 21.5, and leave precision at its default, exact. The result is a new MP4 of 20.9 seconds; the source is untouched. Trim is $0.02 per job, so a 22-second standard avatar clip costs $4.048 plus $0.02, $4.068 in all.

You would do this when a take starts a beat too late or ends on a pause you do not want. Re-rendering the avatar video to fix that costs the full per-second price again. Trimming costs two cents.

Exact or keyframe

Video trim has two precision modes. exact is the default and gives a frame-accurate cut by re-encoding. keyframe copies the stream, so the cut can start a group of pictures early. Sume says to re-base your times against the actual_start_seconds field in the result when you use keyframe.

Video trim precision modes (docs read 2026-10-09)
ModeHow it cutsStart accuracyAllows output conform
exact (default)Frame-accurate re-encode, libx264 yuv420p, kept audio as AACFrame accurateYes: output width, height, fps
keyframeStream copyCan start a GOP early; read actual_start_secondsNo: output with keyframe is refused

The request

start is required, and you send only one of end or duration. Duration must be 0.2 to 900 seconds. The video has to be a media.sume.com artifact or asset in your workspace, and an Idempotency-Key is required. Avatar results are already public media.sume.com artifacts, so you can use the result URL directly.

curl -X POST https://api.sume.com/v1/video-trim \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: avatar-trim-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/avatar.mp4",
    "start": 0.6,
    "end": 21.5
  }'

Things that go wrong

If end is past the end of the source, it clamps and the result carries the warning trim_clamped_to_source. Sending both end and duration returns video_trim_range_conflict, and an end at or before start returns video_trim_range_empty. Sending ffmpeg fields such as codec or crf is refused with ffmpeg_fields_rejected, because the server compiles ffmpeg itself.

Trim changes the clip length, so do it before you burn on captions with the separate video-captions job. Inline captions from the avatar job are already in the pixels and will be cut with the video. If you need a clip at a certain frame size or rate for a placement, output can conform width, height and fps in the same exact-mode job.

Trim versus regenerate

A 22-second standard clip with a bad first 0.6 seconds costs $4.048 to regenerate and $0.02 to trim. If the lead-in is the only problem, trim wins by a wide margin. If the problem is in the delivery itself, such as a wrong word, trimming cannot fix it and you need a new script. For tail dead air, set end earlier, and for a middle cut, run two trims and join them with Timeline.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume