Timeline compose stack ratio 0.4 on 1080x1920: 768 and 1,152 px

Timeline compose stack splits the 1080x1920 frame by ratio. Ratio 0.4 gives the still a 768 px band and the video the other 1,152 px. $0.02 flat per job.

4 min readSume
All posts

On the default 1080x1920 output, layout.ratio: 0.4 in a horizontal stack gives the still the top 768 pixels (1920 x 0.4) and the video the remaining 1,152 pixels. Compose costs $0.02 flat per job.

Band heights by ratio

ratio is the share of the still, allowed from 0.1 to 0.9, and the video takes the exact remainder. Computed for a 1920-pixel-tall frame.

Stack bands on 1080x1920, computed 2026-10-09
ratioStill bandVideo band
0.1192 px1,728 px
0.3576 px1,344 px
0.4768 px1,152 px
0.5 (default)960 px960 px
0.91,728 px192 px

Request

Required fields are operation (stack or overlay), image.url and video.url; both must already be on media.sume.com. The default horizontal split with image_region: top is the half-banner look. Output length always follows the video layer, up to 300 s. Mixing overlay keys into a stack returns compose_stack_takes_no_overlay_layout.

curl -X POST https://api.sume.com/v1/timeline-1.0/compose \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: compose-04-001" \
  -d '{"operation":"stack","image":{"url":"https://media.sume.com/artifacts/artf_demo/banner.png"},"video":{"url":"https://media.sume.com/artifacts/artf_demo/talk.mp4"},"layout":{"split":"horizontal","image_region":"top","ratio":0.4}}'

Fit modes

image_fit and video_fit take cover, contain or stretch; blur is not a compose fit. A 1080x768 band has a 1.41:1 aspect, so a square still with cover crops top and bottom.

Why flat price

The $0.02 rate is flat because video.duration may be absent until the worker probes the video. A mute video gives the warning compose_video_has_no_audio, not a failure. Next, put the MP4 into a Timeline 1.0 video[] slot.

Choosing a ratio

A product banner with a price line needs about a quarter of the frame, ratio 0.25, which is 480 pixels. A logo strip needs less, ratio 0.1 at 192 pixels. A 0.4 band at 768 pixels is room for a headline and a product shot. If you set a custom output size, the bands scale with its height, so 1280 pixels tall at ratio 0.4 is 512 and 768. Fifty shots cost 50 x $0.02 = $1.00. Every media job follows the same lifecycle: submit with an Idempotency-Key, receive a job, poll GET /v1/jobs/:id/status until it is ready, then read GET /v1/jobs/:id/result. A retry with the same key does not queue a second job, so a network error during submit never doubles a charge.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume