Core concepts
These are the building blocks every JSON2Video request shares. Understanding them is enough to read and write any movie JSON.
- Movie. The final video output. A movie is a JSON document describing the video's resolution, scenes, and movie-level elements that overlay every scene.
- Scene. A segment of the movie. A movie contains one or more scenes, played back-to-back. Scenes cannot overlap; each renders independently and is then chained into the final output.
- Element. The atomic content unit inside a scene or movie. Element types include
image,video,text,audio,voice,subtitles,component,html, andaudiogram. - Duration and timing. Every element has a
start(when it appears) and aduration(how long it plays).durationaccepts a number in seconds, or-1for "natural duration of the asset", or-2for "match the container". - Coordinates. Positioning works like HTML/CSS: the canvas origin
(0, 0)is the top-left corner.xandymove right and down. Width/height match the movie'sresolution. - Layering. Elements stack in the order they appear in the JSON array. Later elements paint on top of earlier ones, the same way HTML siblings stack along the z-axis.
- Caching. The renderer caches downloaded assets and intermediate scene renders to speed up repeat requests and reduce cost. Set
cache: falseon an element to bypass the cache for that asset.