Overview

AI Video JSON Schema v2 overview and quick start

AI Video JSON Schema v2 - Overview

AI Video JSON Schema v2 is a structured JSON specification for AI-generated video pipelines, compatible with rendering tools like Revideo or Remotion.


Design Goals

GoalDescription
AI FriendlyClear structure, easy for AI to generate and understand
Simple RenderingClean mapping to Revideo components
Timeline LogicIntuitive time-based clip system
Multi-element SupportVideo, image, text, shapes, layout containers, subtitles
Multi-track AudioSupport for background music, voice, sound effects simultaneously
Subtitle SyncWord-level timestamps with highlight support
ExtensibleEasy to add new features

Top-level Structure

{
  "meta": {},
  "video": {},
  "audio": {},
  "assets": {},
  "tracks": []
}
FieldTypeRequiredDescription
metaobjectYesMetadata (version, title, description, etc.)
videoobjectYesGlobal video settings (resolution, fps, duration, etc.)
audioobjectNoGlobal audio resources (multi-track: bgm, voice, sfx)
assetsobjectNoAsset definitions (fonts, images, videos, audio)
tracksarrayYesArray of timeline tracks, each containing multiple clips

Rendering Pipeline

AI generates JSON Schema

    Schema Validator

    Schema Parser

    Revideo Renderer

    Video Frame Output

    Final Video File

Quick Example

{
  "meta": {
    "version": "2.0.0",
    "title": "Product Demo Video"
  },
  "video": {
    "width": 1920,
    "height": 1080,
    "fps": 30,
    "duration": 15
  },
  "audio": {
    "bgm": {
      "src": "https://example.com/bgm.mp3",
      "volume": 0.4
    }
  },
  "tracks": [
    {
      "id": "main",
      "type": "visual",
      "clips": [
        {
          "type": "text",
          "text": "Welcome",
          "start": 0.5,
          "duration": 5,
          "transform": {
            "x": "50%",
            "y": "30%",
            "anchor": "center"
          },
          "style": {
            "fontSize": 96,
            "fill": "#ffffff"
          },
          "animations": [
            { "type": "fadeIn", "duration": 1 }
          ]
        }
      ]
    }
  ]
}

Documentation Index

DocumentDescription
metaMetadata configuration details
videoVideo configuration details
audioAudio configuration details (multi-track support)
assetsAsset definition details
tracksTrack system details
clipsClip element details
transformTransform property details
styleStyle property details
animationsAnimation system details
layoutLayout container details
gradientsGradient fill details
filtersFilter effect details
apiAPI documentation
examplesComplete example collection
subtitleSubtitle system details

API Endpoints

POST /api/json

Create a new video configuration.

Request Body: VideoSchema JSON

Response:

{
  "taskId": "uuid",
  "url": "/v/uuid",
  "configUrl": "uuid.json",
  "schema": "AI Video JSON Schema v2"
}

GET /v/:id

View the video player.


TypeScript Type Definitions

For complete TypeScript definitions, refer to:

  • src/revideo/schema/types.ts - Schema type definitions
  • src/revideo/clips/types.ts - Clip renderer types

Version History

VersionDateChanges
2.0.02024Complete redesign with nested layouts, gradients, filters, full animation system
1.0.02024Initial version with simple image slideshow + subtitles