Join two trimmed windows into a 30 s ad: 2 trims and 1 render, $0.14

Cut two 15 s windows from one master with video-trim ($0.02 each), then join them on Sume Timeline 1.0 ($0.10): $0.14 for a 30 s ad with a silent spine.

5 min readSume
All posts

Run two POST /v1/video-trim calls on the master (for example start: 5, duration: 15 and start: 48, duration: 15), and then one Timeline 1.0 render of 30 seconds with two slots. The cost is 2 x $0.02 + ceil(30 / 60) x $0.10 = $0.14 with a silent spine. If you need the master's sound as the spine, add one audio-detach call at $0.01, for $0.15. The result is a 30-second MP4, well inside the 10-minute limit of TikTok's non-Spark ad specification (page read 2026-10-08).

The three steps

Video trim returns a new MP4 for each window; the source is not changed. Timeline takes those two MP4s as video[] slots with source_in: 0, and a spine of 30 seconds.

Two windows and a join (prices as of 2026-10-08)
StepCallCost
Window Avideo-trim start 5, duration 15$0.02
Window Bvideo-trim start 48, duration 15$0.02
Jointimeline-1.0/render, spine 30 s, two slots$0.10 (1 ceil minute)
Total, silent spine$0.14
Optional spine from the masteraudio-detach with a range+ $0.01

The Timeline body

The first slot starts at 0 and the second at 15. A fade between them is optional; it must be at most 1 second and at most 50 percent of the shorter neighbour, so up to 1 second here. The last slot may stop at most 0.5 seconds before the end of the spine.

{
  "audio": { "mode": "silence", "duration_seconds": 30 },
  "video": [
    { "source_url": "https://media.sume.com/artifacts/artf_a/window-a.mp4",
      "start": 0, "duration": 15, "source_in": 0 },
    { "source_url": "https://media.sume.com/artifacts/artf_b/window-b.mp4",
      "start": 15, "duration": 15, "source_in": 0,
      "transition": { "type": "fade", "duration": 0.5 } }
  ]
}

Why trim first, then join

Both steps are ffmpeg on the worker, with no model call, so the cost is the sum of three small fees and the time is short. Trimming first keeps each window as its own file that you can reuse in another ad; for example, window A could open three different ads. Rendering all of it in one Timeline job with source_in on the slots is also possible, and then you skip the two trim fees: one render with source_in: 5, duration: 15 and source_in: 48, duration: 15 costs only $0.10. Use separate trims when you want the reusable files, and source_in when you do not.

Sound and the spine

Timeline gets its sound from the spine (a file, parts, or silence) and an optional soundtrack bed. Its program table lists no field that keeps the sound of each slot, so the sound of the two windows is not carried over by the join. Use silence and add a bed, or detach one range of the master and use that as the spine. If you use a detached range as the spine, keep its length the same as the render (30 seconds), because audio.duration_seconds decides the output length.

  • Cost with a Music 1.0 bed: $0.14 + $0.125 = $0.265.
  • Both windows must be 9:16 and at least 540x960 for the TikTok non-Spark minimum.
  • Use precision: exact for the windows if the cut points matter.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume