Tomacco

Docs Operation reference demo operations

demo operations#

8 operations. Generated from assets/operations.json; all areas.

On this page (8)

demo.capabilities#

Inspect Demo Studio capabilities

Discover local renderer, ffmpeg and ffprobe availability, supported presets, device models, output limits and audio modes. Exports are muted by default; source audio is an explicit saved-scene option. Does not execute or probe a device.

Annotations: read-only, idempotent, closed world.

Takes no arguments.

tomaccoctl call demo.capabilities

demo.media.inspect#

Inspect local demo recording

Inspect a local recording with ffprobe and streaming SHA-256. Returns DISPLAY dimensions after rotation, duration, frame rate, rotation and audio presence. No hardware or network access.

Annotations: read-only, idempotent, closed world.

ArgumentTypeRequiredDefaultDetails
pathstringyesAbsolute local path. No device access or remote media URLs.
tomaccoctl call demo.media.inspect '{"path":"<path>"}'

demo.scene.create#

Create demo scene

Create a versioned local scene from a verified recording and preset. Refuses existing destinations. Returns path, revision and scene. New and legacy scenes default to muted audio; change audio.mode to source to include the recording's first audio track.

Annotations: writes, not idempotent, closed world.

ArgumentTypeRequiredDefaultDetails
pathstringyesAbsolute local path. No device access or remote media URLs.
sourcestringyesAbsolute recording path, inspected and hashed before scene creation.
presetstringone of portrait-orbit, landscape-orbit, square-float, portrait-still
titlestringup to 200 characters
tomaccoctl call demo.scene.create '{"path":"<path>","source":"<source>"}'

demo.scene.get#

Read demo scene

Read and validate the scene and current source digest. Returns path, revision and scene without connecting or discovering devices.

Annotations: read-only, idempotent, closed world.

ArgumentTypeRequiredDefaultDetails
pathstringyesAbsolute local path. No device access or remote media URLs.
tomaccoctl call demo.scene.get '{"path":"<path>"}'

demo.scene.update#

Update demo scene

Apply a partial scene change using optimistic revision control and atomic persistence. Source and scene identity are immutable. Keyframes are strictly ordered; easing belongs to the segment start. Image backgrounds must be local PNGs. Returns the new revision and complete scene. Audio mode muted (default) or source is saved with the revision; source requires a recording with an audio track. PNG previews remain silent.

Annotations: writes, not idempotent, closed world.

ArgumentTypeRequiredDefaultDetails
pathstringyesAbsolute local path. No device access or remote media URLs.
if_revisionintegeryes1 to 9007199254740991
changesobjectyes
changes.titlestringup to 200 characters
changes.clipobject
changes.clip.startnumber0 to 86400
changes.outputobject
changes.output.widthinteger320 to 3840
changes.output.heightinteger320 to 3840
changes.output.fpsintegerone of 24, 25, 30, 60
changes.output.durationnumber0.1 to 60
changes.deviceobject
changes.device.modelstringone of phone, tablet
changes.device.finishstringmatching #[0-9A-Fa-f]{6}
changes.device.bezelnumber0.005 to 0.12
changes.device.thicknessnumber0.01 to 0.2
changes.device.corner_radiusnumber0.01 to 0.2
changes.backgroundobject
changes.background.stylestringone of solid, gradient, image
changes.background.colorstringmatching #[0-9A-Fa-f]{6}
changes.background.color2stringmatching #[0-9A-Fa-f]{6}
changes.background.imagestringAbsolute local PNG path; backend stores its verified digest.
changes.shadowobject
changes.shadow.enabledboolean
changes.shadow.opacitynumber0 to 1
changes.shadow.blurnumber0 to 100
changes.shadow.offset_xnumber-500 to 500
changes.shadow.offset_ynumber-500 to 500
changes.cameraobject
changes.camera.distancenumber2 to 12
changes.camera.fovnumber15 to 75
changes.keyframesarray of object1 to 120 items
changes.keyframes[].timenumberyes0 to 60
changes.keyframes[].yawnumberyes-75 to 75
changes.keyframes[].pitchnumberyes-75 to 75
changes.keyframes[].rollnumberyes-180 to 180
changes.keyframes[].scalenumberyes0.1 to 1.5
changes.keyframes[].xnumberyes0 to 1
changes.keyframes[].ynumberyes0 to 1
changes.keyframes[].easingstringyesone of linear, smooth, ease-in, ease-out
changes.audioobject
changes.audio.modestringone of muted, source; Muted by default, including older scenes without audio settings. Source includes the first audio track, trimmed to the same clip and padded with silence to the rendered video duration.
tomaccoctl call demo.scene.update '{"path":"<path>","if_revision":1,"changes":{}}'

demo.preview#

Render demo preview

Submit a durable job for a complete scene PNG at an exact scene time. Copies verified inputs privately, renders an immutable revision, then independently decodes and validates the PNG. Never overwrites existing output. Use job.wait/get/cancel.

Annotations: writes, idempotent, closed world.

ArgumentTypeRequiredDefaultDetails
pathstringyesAbsolute local path. No device access or remote media URLs.
if_revisionintegeryes1 to 9007199254740991
timenumberyes0 to 60
outputstringyesNew absolute .png path.
request_idstringmatching [A-Za-z0-9][A-Za-z0-9_.:-]{0,127}; Optional retry identity. Reuse returns the same job; changed request content is rejected.
tomaccoctl call demo.preview '{"path":"<path>","if_revision":1,"time":0,"output":"<output>"}'

demo.export#

Export demo video

Submit a durable job for H.264/yuv420p MP4 (muted by default; saved audio.mode source includes AAC audio), OUTPUT.mp4.poster.png and OUTPUT.mp4.manifest.json. Source inputs are copied and hashed privately. Success requires independent full video and audio decode, exact dimensions/FPS/frame-count validation, and the requested audio policy. Output times are i/fps, count ceil(duration*fps). Existing files are never overwritten. Reuse an identical request_id to retrieve its job; use a new output for an explicit retry after failure. Use job.wait/get/cancel.

Annotations: writes, idempotent, closed world.

ArgumentTypeRequiredDefaultDetails
pathstringyesAbsolute local path. No device access or remote media URLs.
if_revisionintegeryes1 to 9007199254740991
outputstringyesNew absolute .mp4 path; sidecars append .poster.png and .manifest.json to this entire path.
request_idstringmatching [A-Za-z0-9][A-Za-z0-9_.:-]{0,127}; Optional retry identity. Reuse returns the same job; changed request content is rejected.
tomaccoctl call demo.export '{"path":"<path>","if_revision":1,"output":"<output>"}'

demo.export.inspect#

Validate demo export

Fully decode and inspect a completed local export. Return actual dimensions, FPS, duration, audio, frame count, codec and SHA-256. If a sidecar exists, its media digest must match. Reports the actual audio stream and checks the saved export audio policy when a scene sidecar is present.

Annotations: read-only, idempotent, closed world.

ArgumentTypeRequiredDefaultDetails
pathstringyesAbsolute local path. No device access or remote media URLs.
tomaccoctl call demo.export.inspect '{"path":"<path>"}'

View this page as Markdown on GitHub