๐Ÿšœ sql-demo-maker

March 21, 2026 ยท View on GitHub

Generate annotated demo videos for DuckDB extensions from YAML scripts.

Built by Query.Farm.

How It Works

  1. Write a YAML script describing the demo (SQL queries, annotations, visualizations)
  2. Run sql-demo-maker prepare to execute queries against DuckDB and produce a JSON render plan
  3. Render with Remotion to produce a polished MP4 video
YAML โ†’ DuckDB execution โ†’ JSON โ†’ Remotion (React) โ†’ MP4

Quick Start

# Install Python dependencies
uv venv && uv pip install -e .

# Install Remotion dependencies
cd remotion && npm install

# Generate render plan
sql-demo-maker prepare demos/lindel_extension.yaml -o remotion/src/data/renderPlan.json

# Preview in browser
cd remotion && npx remotion studio

# Render final video
npx remotion render src/index.ts LindelDemo --output ../output.mp4 --crf 18

Project Structure

sql-demo-maker/
โ”œโ”€โ”€ demos/                      # YAML demo scripts
โ”‚   โ”œโ”€โ”€ lindel_extension.yaml   # Lindel extension demo
โ”‚   โ””โ”€โ”€ lindel_script.md        # Video script/storyboard
โ”œโ”€โ”€ remotion/                   # Video rendering (React/TypeScript)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ LindelDemo.tsx      # Main video composition
โ”‚   โ”‚   โ”œโ”€โ”€ theme.ts            # Centralized color theme
โ”‚   โ”‚   โ”œโ”€โ”€ highlight.ts        # SQL syntax highlighting
โ”‚   โ”‚   โ”œโ”€โ”€ mapPath.ts          # Natural Earth SVG map data
โ”‚   โ”‚   โ””โ”€โ”€ components/         # Reusable video components
โ”‚   โ”‚       โ”œโ”€โ”€ Terminal.tsx     # DuckDB CLI terminal
โ”‚   โ”‚       โ”œโ”€โ”€ CurveGrid.tsx   # Animated space-filling curves
โ”‚   โ”‚       โ”œโ”€โ”€ HighlightGrid.tsx # Grid with cell highlighting
โ”‚   โ”‚       โ”œโ”€โ”€ CityScatter.tsx # GPS city map visualization
โ”‚   โ”‚       โ”œโ”€โ”€ RowGroupDiagram.tsx # Parquet row group diagram
โ”‚   โ”‚       โ”œโ”€โ”€ BrandBar.tsx    # Persistent header branding
โ”‚   โ”‚       โ”œโ”€โ”€ SplitLayout.tsx # Two-panel layout
โ”‚   โ”‚       โ”œโ”€โ”€ TitleCard.tsx   # Title/closing cards
โ”‚   โ”‚       โ”œโ”€โ”€ Callout.tsx     # Info/warning/success boxes
โ”‚   โ”‚       โ””โ”€โ”€ StepNote.tsx    # Floating note badges
โ”‚   โ””โ”€โ”€ public/
โ”‚       โ””โ”€โ”€ qr-lindel.png      # QR code for extension page
โ”œโ”€โ”€ sql_demo_maker/             # Python CLI
โ”‚   โ”œโ”€โ”€ cli.py                  # Click CLI (prepare command)
โ”‚   โ”œโ”€โ”€ schema.py               # Pydantic YAML models
โ”‚   โ””โ”€โ”€ executor.py             # DuckDB query execution
โ”œโ”€โ”€ narration.txt               # Voice-over script
โ””โ”€โ”€ pyproject.toml

Theming

Colors are centralized in remotion/src/theme.ts. Current theme: Modern Farmhouse.

export const T = {
  bg: "#12150f",       // near-black with green tint
  surface: "#1e2419",  // dark sage
  text: "#f5f0e8",     // eggshell
  green: "#66bb6a",    // meadow
  gold: "#ffca28",     // honey
  orange: "#ffa726",   // apricot
  red: "#ef5350",      // poppy
  blue: "#42a5f5",     // clear sky
  mauve: "#ab47bc",    // lavender field
  teal: "#80cbc4",     // pond
  // ...
};

Change the theme by editing this one file โ€” all components reference it.

Audio

Voice-over is generated with ElevenLabs and synced per-scene using FFmpeg:

# Generate per-scene audio segments, time-fit to scene durations, concatenate
# Then combine with video:
ffmpeg -i video.mp4 -i narration_synced.wav \
  -c:v libx264 -crf 18 -pix_fmt yuv420p \
  -c:a aac -b:a 192k \
  -movflags +faststart \
  output.mp4

YAML Step Types

TypePurpose
titleFull-screen title card
sqlExecute SQL, show output
calloutInfo/warning/success overlay
clearClear terminal
revealProgressive sub-steps
visualizationAnimated grids, charts
split_sqlSQL + visualization side by side
section_headerNon-modal text overlay

Dependencies

Python: duckdb, pyyaml, pydantic, click

Node: remotion, react, typescript

System: FFmpeg, SF Mono font (from Terminal.app)

License

MIT