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:
| Field | Type | Required | Description |
|---|---|---|---|
version | string | Yes | Schema version (e.g., "2.0.0") |
title | string | No | Project title |
description | string | No | Project description |
author | string | No | Author name |
tags | string[] | No | Tags for categorization |
Video Configuration
Defines the output video properties:
| Field | Type | Required | Description |
|---|---|---|---|
width | number | Yes | Video width in pixels |
height | number | Yes | Video height in pixels |
fps | number | Yes | Frames per second |
duration | number | Yes | Total duration in seconds |
background | string | No | Background color (hex) |
Common Resolutions
| Name | Width | Height | Aspect Ratio |
|---|---|---|---|
| 1080p | 1920 | 1080 | 16:9 |
| 720p | 1280 | 720 | 16:9 |
| 4K | 3840 | 2160 | 16:9 |
| Vertical | 1080 | 1920 | 9:16 |
| Square | 1080 | 1080 | 1: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
| Type | Description |
|---|---|
text | Text content |
image | Static image |
video | Video content |
rect | Rectangle shape |
circle | Circle shape |
layout | Container for child clips |
subtitle | Subtitle 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,righttop-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
| Type | Description |
|---|---|
fadeIn | Fade in from transparent |
fadeOut | Fade out to transparent |
slideIn | Slide in from a direction |
slideOut | Slide out to a direction |
zoomIn | Scale up from small |
zoomOut | Scale down to small |
scale | Animate scale property |
move | Animate position |
rotate | Animate rotation |
Z-Index
Controls the stacking order of clips. Higher values appear on top:
{
"zIndex": 10 // Will appear above clips with lower zIndex
}