invalid_segment_timing: the two causes in a 3-minute Short timeline

invalid_segment_timing means a slot start is not after the previous start, or a slot ends over 0.5 s past audio.duration_seconds. Check starts, then ends.

4 min readSume
All posts

invalid_segment_timing is returned by Sume Timeline 1.0 for two different reasons, and the error text alone does not say which. Cause one: a video[] slot has a start that is not greater than the previous slot's start. Cause two: a slot's start + duration runs more than 0.5 seconds past audio.duration_seconds. Check the starts first, then the last slot's end.

This bites when you build a Short up to the platform limit. YouTube classes a square or vertical video up to 3 minutes as a Short (YouTube Help, read 2026-10-05), so a spine of 180 seconds is a natural ceiling, and one extra second on the last slot is enough to trip the check.

Cause one: starts that do not increase

The Timeline 1.0 docs say video[0].start must be 0 and later starts must increase. Declared starts are authoritative, and the compiler compensates for crossfades instead of pre-shifting you. A duplicated start, such as two slots both at 12, is refused. A start that goes backwards is refused. A start that overlaps the previous slot beyond its transition is a different code, segment_overlap.

Cause two: a slot ends too late

Coverage may stop at most 0.5 seconds before the end of the spine, and a slot may end at most 0.5 seconds after it. In the schema, the last slot is checked against audio.duration_seconds + 0.5, and each slot after the first is checked the same way. So a 180 second spine tolerates a final slot that ends at 180.5 but not 181.

invalid_segment_timing triggers in Timeline 1.0 (Sume docs and schema read 2026-10-05)
SlotCheckRefused when
video[0]startnot 0 (timeline_must_start_at_zero)
video[n], n>0start vs previous startstart is not greater (invalid_segment_timing)
video[n], n>0start vs previous end minus transitionoverlap (segment_overlap)
video[n], n>0start + durationmore than 0.5 s past audio.duration_seconds
last slotstart + durationmore than 0.5 s past audio.duration_seconds

A quick self-check

This Python snippet checks both rules locally on a list of slots before you call the API. It mirrors the two documented rules and nothing else, so a pass is not a guarantee: /plan is the real check.

def check(video, spine):
    problems = []
    for i, slot in enumerate(video):
        if i and not slot["start"] > video[i - 1]["start"]:
            problems.append(f"slot {i}: start must increase")
        if i and slot["start"] + slot["duration"] > spine + 0.5:
            problems.append(f"slot {i}: ends past the spine")
    return problems

slots = [{"start": 0, "duration": 90},
         {"start": 90, "duration": 91}]
print(check(slots, 180))

Limits

Do not stretch the spine to hide a mismatch. If the spine is voice-over, extend or trim the slots, not the number. Slot durations also need to be at least 0.2 seconds. And remember render.strategy: single is refused above 12 slots, so a long montage should leave strategy on auto. The plan call is unbilled and needs no Idempotency-Key, which makes it the cheapest place to find this error.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume