Timeline compose overlay on 1080x1920: a 972 px plate, 96 px margin
Overlay compose defaults width_ratio 0.9 and margin_ratio 0.05: on a 1080x1920 frame, a 972 px plate and a 96 px margin. Stack splits 50/50. $0.02 a job.
With Sume Timeline compose in overlay mode on the default 1080x1920 output, the default plate is 972 pixels wide (0.9 x 1080) and sits 96 pixels from its edge (0.05 x 1920). The job costs $0.02 flat. Both numbers are ratios, so they scale if you change output.width and output.height.
Compose takes exactly one still and one video from your workspace's media.sume.com and returns one MP4, as the timeline compose docs describe. The still stays on screen for the whole clip, and the output length comes from the video layer.
Overlay ratios turned into pixels
width_ratio is 0.05 to 1 of the frame width, with a default of 0.9, and the plate keeps its aspect. margin_ratio is 0 to 0.45 of the frame height, with a default of 0.05. position is top, center or bottom.
| Setting | Ratio | Arithmetic | Pixels |
|---|---|---|---|
| Default plate width | 0.9 | 0.9 x 1080 | 972 |
| Narrow plate | 0.5 | 0.5 x 1080 | 540 |
| Smallest plate | 0.05 | 0.05 x 1080 | 54 |
| Default margin | 0.05 | 0.05 x 1920 | 96 |
| Largest margin | 0.45 | 0.45 x 1920 | 864 |
Stack mode on the same frame
stack tiles the still and the video in one frame. The defaults are split: horizontal, image_region: top and ratio: 0.5, where ratio is the still's share (0.1 to 0.9) and the video takes the remainder. On 1920 pixels of height, ratio 0.5 gives a 960-pixel still and a 960-pixel video; ratio 0.25 gives 480 and 1440.
Do not mix the vocabularies. split, image_region and ratio belong to stack; position, width_ratio and margin_ratio belong to overlay. A mix returns a 400 with compose_stack_takes_no_overlay_layout or compose_overlay_takes_no_stack_layout.
{
"operation": "overlay",
"image": { "url": "https://media.sume.com/artifacts/artf_demo/label.png" },
"video": { "url": "https://media.sume.com/artifacts/artf_demo/clip.mp4", "duration": 12 },
"layout": { "position": "top", "width_ratio": 0.9, "margin_ratio": 0.05 }
}Things to know before submitting
Import both files first with POST /v1/media-imports; off-host URLs are rejected. Idempotency-Key is required. The ceiling is 300 seconds of output, and a duration past the end of the file is clamped with compose_duration_clamped_to_source. A mute video warns with compose_video_has_no_audio and still renders.
- 1,000 labelled clips: 1,000 x $0.02 = $20.00.
- A different output size than the timeline you plan to join causes a second rescale, so set
output.widthandoutput.heightto match. - An explicit
output.fpsthat differs from the clip warnsoutput_fps_resamples_sources.
Checking the result
After the job finishes, GET /v1/jobs/:id/result returns kind: timeline_compose with a new video_url and duration_seconds. Put that MP4 into a Timeline 1.0 video[] slot to assemble it with other shots and a voiceover. Inspect one still of the output to confirm the plate sits where you expect before you run a batch of hundreds.
A quick sizing test helps. On a 1080x1920 frame, the default plate of 972 pixels leaves 54 pixels on each side, since (1080 - 972) / 2 = 54. If your label or logo has built-in padding, it may look smaller than planned, so test with the real asset.
Sources
Related posts
More in Media tools
- Price badge over a 45-second clip: timeline compose overlay, $0.02
Put one still on top of one video with Sume timeline compose overlay: width_ratio, position, margin_ratio, the 300-second ceiling, and a flat $0.02.
- 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.
- Timeline refuses 9 chained fades: too_many_chained_transitions
Sume Timeline 1.0 refuses more than 8 adjacent fades with too_many_chained_transitions. How transitions are validated, and the hard-cut fix.
- Rendered video judders: output_fps_resamples_sources and 24 to 30 fps
Why a Sume timeline render can stutter when output.fps differs from your clips, what the output_fps_resamples_sources warning means, and the fix: omit fps.
Written by Sume