Create a project
v1 and one audio track a1. Project names use letters, digits, - and _. You can also send a full manifest to start from an existing timeline.
GET /projects/{project} (vidjutsu show <project>) returns the current timeline: revision, duration_seconds and the manifest with its media, tracks and clips. Add ?revision= to read an older one.
Send an edit
- An edit is atomic. Operations run in order and each sees the result of the ones before it. If any operation fails, the whole edit is rejected and the timeline doesn’t change.
- An edit holds at most 64 operations. Split a big timeline into several edits.
- Safe retries: send
expected_head(the revision your edit was written against). If someone else edited since, you get a 409conflictinstead of a surprise. Retrying the same request with the sameIdempotency-Keyreturns the first result instead of applying it twice. - The body can also be a bare list of operations.
- History: send
summary, the one line history and the editor’s Activity show for this edit (default: written from the operations). Every edit can be undone, on its own or one change at a time.
vidjutsu edit launch-film ops.json.
Times
Times are exact. Write them as whole seconds (12), a decimal string ("12.5"), a fraction string ("1001/30000") or {"ticks": 25, "rate": 2}. JSON decimals like 12.5 are refused because they aren’t exact. Responses always use {ticks, rate}.
Ratios (gain) take the same forms: "0.25", "1/4" or {"numerator": 1, "denominator": 4}.
Ranges are half-open: a clip with source: {start: 0, end: 20} plays from 0 up to, not including, 20 seconds.
Edit operations
An occurrence (a clip on a track) is:
layout is required on video clips and not allowed on audio clips. It is a rectangle on a 1000x1000 canvas, so {"x": 0, "y": 0, "width": 1000, "height": 1000} is full frame and {"x": 700, "y": 700, "width": 280, "height": 280} is a small picture in the bottom-right corner. It can also have a shape, crop and fit: see Layout fields. gain, fade_in and fade_out are optional.
When an edit splits a clip (a ripple insert, a cut or a layout range), the leftmost piece keeps its id and the later pieces get new ids. Read them from show instead of guessing.
Example
Two takes back to back with their own sound, and a music bed at a quarter volume under both, fading out:"..." stand for their hashes.
Later, to cut a stumble between 14.2 and 15.8 seconds out of every track at once: