๐ 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
- Write a YAML script describing the demo (SQL queries, annotations, visualizations)
- Run
sql-demo-maker prepareto execute queries against DuckDB and produce a JSON render plan - 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
| Type | Purpose |
|---|---|
title | Full-screen title card |
sql | Execute SQL, show output |
callout | Info/warning/success overlay |
clear | Clear terminal |
reveal | Progressive sub-steps |
visualization | Animated grids, charts |
split_sql | SQL + visualization side by side |
section_header | Non-modal text overlay |
Dependencies
Python: duckdb, pyyaml, pydantic, click
Node: remotion, react, typescript
System: FFmpeg, SF Mono font (from Terminal.app)
License
MIT