Automotion docs

Video element

Plays a video clip inside the scene. Clips can be trimmed and muted; the element is sized and positioned like any visual element.

Plays a video clip inside the scene. Clips can be trimmed and muted; the element is sized and positioned like any visual element.

Properties

PropertyTypeDefaultDescription
id *string (non-empty)Stable identifier, unique across the whole movie. Used by editor selection sync and error paths.
startnumber (≥ 0)0When the element appears, in seconds relative to its scene (or to the movie for movie-level elements).
durationnumber (> 0)How long the element is active, in seconds. Defaults to the remainder of its scene.
positionobject | "top-left" | "top-center" | "top-right" | "center-left" | "center" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right""center"Where to place the element: absolute {x, y} pixels or a named anchor.
widthnumber (> 0)Element box width in output pixels. Defaults to an element-specific intrinsic size.
heightnumber (> 0)Element box height in output pixels. Defaults to an element-specific intrinsic size.
opacitynumber (0–1)1Element opacity from 0 (invisible) to 1 (fully opaque).
rotationnumber0Rotation around the element's center, in degrees (clockwise).
animationobjectEntrance animation applied when the element appears.
type *"video"A video clip.
src *string (non-empty)Image source URL. Provide exactly one of "src" or "generate".
trimobjectPortion of the source media to play.
mutebooleanfalseStrip the source clip's audio track.
fit"cover" | "contain" | "fill""cover"How the media scales to its box: cover crops to fill it, contain letterboxes inside it, fill stretches to it.

position object

Absolute pixel position of the element's center.

PropertyTypeDefaultDescription
x *numberHorizontal position of the element's center, in output pixels from the left edge.
y *numberVertical position of the element's center, in output pixels from the top edge.

animation object

Entrance animation applied when the element appears.

PropertyTypeDefaultDescription
preset *"none" | "fade" | "slide-in-left" | "slide-in-right" | "slide-in-up" | "slide-in-down" | "zoom-in" | "zoom-out"Entrance animation preset applied when the element appears.
easing"linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out""ease"Easing curve applied to the animation.
durationnumber (> 0)0.5Animation duration in seconds.

trim object

Portion of the source media to play.

PropertyTypeDefaultDescription
start *number (≥ 0)Offset into the source media to start playing from, in seconds.
duration *number (> 0)Length of source media to play, in seconds.

Example

Video: trimmed, muted clip as a scene layer:

movie.json
{
  "schema": "v1",
  "preset": "16:9",
  "scenes": [
    {
      "id": "broll",
      "duration": 6,
      "elements": [
        {
          "id": "broll-clip",
          "type": "video",
          "src": "https://assets.example.com/clips/city-timelapse.mp4",
          "trim": {
            "start": 2,
            "duration": 6
          },
          "mute": true,
          "fit": "cover"
        },
        {
          "id": "broll-caption",
          "type": "text",
          "text": "City at dusk",
          "fontSize": 44,
          "position": "bottom-left"
        }
      ]
    }
  ]
}

▶ Try it in the playground

On this page