How to increase video length by looping a short clip

Loop a short clip until it matches a song or voiceover: put it in one Timeline 1.0 slot as long as the audio and set render.pad_mode to loop.

4 min readSume
All posts

To increase a video's length by looping, repeat the same clip back to back until it covers the time you need, such as the length of a song or a voiceover, and save the result as a new file. With Sume, when the clip is already hosted on Sume, put it in one Timeline 1.0 slot as long as the audio: when a slot is longer than its clip, render.pad_mode fills the rest, and loop replays the clip until the slot is covered.

The facts come from the Timeline 1.0 docs and the field descriptions in the Sume API reference, read on 2026-09-27. Anything described as current behavior is read from Sume's code.

How do I loop a clip to the length of my audio?

The audio sets the length. audio.duration_seconds, from 1 to 1,800, is the output length, and audio.url is the song or voiceover, such as a music or voice track from an earlier Sume job. Give the clip one slot from start: 0 whose duration equals that length, and set render.pad_mode to loop:

  • Every URL must already be your workspace's media.sume.com artifact or asset, such as an earlier Sume job's output. Sume has no public upload route for a file on your computer; see which URLs each endpoint accepts.
  • Set output.width and output.height to the clip's size, because the default output is 1080×1920.
  • A looped source comes back as a soft warning in warnings[] (segment_source_short_looped in the current code), not a failure. The unbilled POST /v1/timeline-1.0/plan checks the body first, but the docs say it cannot predict pad or loop warnings.
  • For a silent video, send audio.mode: "silence" with no url; duration_seconds still sets the length.
curl -X POST https://api.sume.com/v1/timeline-1.0/render \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: loop-to-song-001" \
  -d '{
    "audio": { "url": "https://media.sume.com/artifacts/artf_demo/song.mp3", "duration_seconds": 95 },
    "output": { "width": 1920, "height": 1080 },
    "render": { "pad_mode": "loop" },
    "video": [
      { "source_url": "https://media.sume.com/artifacts/artf_demo/clip-6s.mp4", "start": 0, "duration": 95 }
    ]
  }'

Does a short clip loop by default?

Mostly. The default, auto, loops short sources instead of holding a long freeze. In the current compiler, though, auto loops only when the slot outlasts the clip by more than 0.25 s, and a source shorter than 0.5 s is never looped, even with loop, because looping it would strobe; it holds its last frame instead. Name loop when you want the repeat, rather than relying on the default.

From the Sume API reference for Timeline 1.0, read 2026-09-27.
`render.pad_mode`A slot longer than its clip is filled by…
loopReplaying the source
freezeHolding the last frame
auto (default)Looping short sources instead of holding a long freeze

Does the clip's own sound loop too?

No. In the current compiler a Timeline render's sound comes only from its spine and an optional soundtrack, never from the clips, so the looped picture plays under your song or voiceover and the clip's own audio is left out. To repeat a music bed, soundtrack.loop repeats it until the spine ends; see add background music to a video.

Will the loop show a seam?

Each pass replays the clip from its start, so every seam shows whatever jump there is between the clip's last frame and its first. A clip that ends on the same picture it starts with hides the seam; make a seamless loop AI video shows how to generate one.

Is looping the only way to extend a video?

No. To add new footage instead of repeats, generate the next clip from the last frame, as in chaining AI clips from the last frame. And if you only want a video to repeat while it plays, that is a player setting, not a new file; a Timeline render writes a longer file.

What does it cost, and what are the limits?

The render reserves $0.10 per output minute on API pricing, plus a 5.5% agent fee by default, counted as ceil(audio.duration_seconds / 60) minutes, so a 95-second song reserves 2 minutes. It never charges more than its reservation.

  • Output from 1 to 1,800 seconds, so one render loops a clip to at most 30 minutes.
  • output.width and output.height are even integers from 256 to 2160.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume