Basic Concepts

Understand the core concepts of Video Schema

Basic Concepts

Before diving into creating videos, it's important to understand the core concepts of Video Schema.

Schema Structure

A video schema consists of several main sections:

{
  "meta": { ... },      // Metadata
  "video": { ... },     // Video configuration
  "audio": { ... },     // Audio configuration (optional)
  "assets": { ... },    // Asset references (optional)
  "tracks": [ ... ]     // Content tracks
}

Meta

Metadata about the schema itself:

FieldTypeRequiredDescription
versionstringYesSchema version (e.g., "2.0.0")
titlestringNoProject title
descriptionstringNoProject description
authorstringNoAuthor name
tagsstring[]NoTags for categorization

Video Configuration

Defines the output video properties:

FieldTypeRequiredDescription
widthnumberYesVideo width in pixels
heightnumberYesVideo height in pixels
fpsnumberYesFrames per second
durationnumberYesTotal duration in seconds
backgroundstringNoBackground color (hex)

Common Resolutions

NameWidthHeightAspect Ratio
1080p1920108016:9
720p128072016:9
4K3840216016:9
Vertical108019209:16
Square108010801:1

Tracks

Tracks are layers that contain clips. Think of them like layers in video editing software:

  • Visual tracks: Contain text, images, videos, shapes
  • Audio tracks: Contain background music, voiceovers
  • Subtitle tracks: Contain subtitle data
{
  "id": "main",
  "type": "visual",
  "clips": [ ... ]
}

Clips

Clips are individual elements within a track. Each clip has:

  • Type: What kind of element (text, image, video, etc.)
  • Timing: When it appears and for how long
  • Transform: Position and size
  • Style: Visual appearance
  • Animations: Motion effects

Clip Types

TypeDescription
textText content
imageStatic image
videoVideo content
rectRectangle shape
circleCircle shape
layoutContainer for child clips
subtitleSubtitle content

Timing

Every clip has timing properties:

{
  "start": 0,      // When the clip appears (seconds)
  "duration": 5    // How long it's visible (seconds)
}

Transform

Controls position and size:

{
  "transform": {
    "x": "50%",           // Horizontal position
    "y": "50%",           // Vertical position
    "width": 400,         // Width in pixels or percentage
    "height": 300,        // Height in pixels or percentage
    "rotation": 0,        // Rotation in degrees
    "anchor": "center"    // Anchor point
  }
}

Anchor Points

  • center, top, bottom, left, right
  • top-left, top-right, bottom-left, bottom-right

Style

Controls visual appearance:

{
  "style": {
    "fill": "#ffffff",       // Fill color
    "opacity": 1,            // 0-1
    "fontSize": 48,          // For text
    "fontWeight": 700,       // For text
    "shadowColor": "#000",   // Shadow color
    "shadowBlur": 10         // Shadow blur
  }
}

Animations

Add motion to clips:

{
  "animations": [
    { "type": "fadeIn", "duration": 0.5 },
    { "type": "slideIn", "direction": "up", "duration": 0.8 }
  ]
}

Animation Types

TypeDescription
fadeInFade in from transparent
fadeOutFade out to transparent
slideInSlide in from a direction
slideOutSlide out to a direction
zoomInScale up from small
zoomOutScale down to small
scaleAnimate scale property
moveAnimate position
rotateAnimate rotation

Z-Index

Controls the stacking order of clips. Higher values appear on top:

{
  "zIndex": 10  // Will appear above clips with lower zIndex
}

Next Steps