# Remotion — full corpus # LLM Wiki An open-source template for building LLM-powered knowledge bases, following [Andrej Karpathy's "LLM Wiki" pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f). You provide raw sources. The LLM reads them, writes structured wiki pages, cross-links everything, and maintains it over time. You never edit the wiki directly — you curate sources and ask questions. ## How It Works The system has three layers: ``` raw/ Sources you collect (articles, transcripts, notes, PDFs) wiki/ LLM-written & maintained pages (summaries, concepts, entities, syntheses) CLAUDE.md Schema that tells the LLM how to structure everything ``` Three operations drive the workflow: | Operation | Trigger | What happens | |-----------|---------|--------------| | **Ingest** | "ingest raw/my-source.txt" | LLM reads the source, creates a summary page, creates/updates concept and entity pages, adds cross-links, updates the index and log | | **Query** | Ask any question | LLM searches the wiki, synthesizes an answer with citations, optionally creates a synthesis page for novel insights | | **Lint** | "lint" or "health check" | LLM audits all pages for orphans, contradictions, missing links, incomplete sections, and low-confidence claims — fixes what it can, reports the rest | ## Quick Start 1. **Clone this repo** ```bash git clone https://github.com/YOUR_USERNAME/llm-wiki.git my-knowledge-base cd my-knowledge-base ``` 2. **Customize CLAUDE.md** for your domain - Update the Purpose section with your topic - Replace the placeholder tagging taxonomy with your own categories - Adjust confidence level descriptions if needed - Everything else (workflows, page formats, linking rules) works as-is 3. **Drop sources into `raw/`** - Text files, transcripts, articles, notes — any plain text - These are immutable once added; the LLM never modifies them 4. **Tell the LLM to ingest** ``` ingest raw/my-first-source.txt ``` The LLM will create summary pages, concept pages, entity pages, cross-links, and update the index. 5. **Ask questions** ``` What are the key differences between X and Y? ``` The LLM answers from the wiki, citing specific pages. 6. **Run health checks** ``` lint ``` The LLM audits the wiki and fixes issues. ## Directory Structure ``` . ├── CLAUDE.md # Schema — the LLM's instructions ├── raw/ # Your source documents (immutable) └── wiki/ ├── index.md # Master catalog of all pages ├── log.md # Append-only activity log ├── dashboard.md # Dataview dashboard (Obsidian) ├── analytics.md # Charts View analytics (Obsidian) ├── flashcards.md # Spaced repetition cards ├── summaries/ # One page per source document ├── concepts/ # Concept and framework pages ├── entities/ # People, tools, organizations, etc. ├── syntheses/ # Cross-cutting analyses and comparisons ├── journal/ # Research/session journal entries │ └── template.md # Journal entry template └── presentations/ # Marp slide decks ``` ## Enhancements This template includes several extras beyond the core wiki pattern: ### Dataview Dashboard (`wiki/dashboard.md`) Live queries that surface low-confidence pages, recent updates, concepts by tag, and pages with the most sources. Requires the [Dataview](https://github.com/blacksmithgu/obsidian-dataview) Obsidian plugin. ### Charts View Analytics (`wiki/analytics.md`) Visual analytics with pie charts, bar charts, and word clouds. Requires the [Charts View](https://github.com/caronchen/obsidian-chartsview-plugin) Obsidian plugin. ### Mermaid Diagrams Use Mermaid code blocks in any wiki page to create flowcharts, sequence diagrams, or concept maps. Native support in Obsidian and GitHub. ### Marp Slides (`wiki/presentations/`) Create slide decks from markdown using [Marp](https://marp.app/). Drop presentation files in this directory. ### Research Journal (`wiki/journal/`) Track your research sessions, experiments, or applied work with the included template. The LLM can reference journal entries when answering queries. ### Spaced Repetition (`wiki/flashcards.md`) Flashcards in the format used by the [Spaced Repetition](https://github.com/st3v3nmw/obsidian-spaced-repetition) Obsidian plugin. Ask the LLM to generate flashcards from any wiki page. ### MCP Server This repo works with Claude Code's MCP server capabilities. Point an MCP-compatible client at this repo and the LLM can read/write the wiki programmatically. ## Customizing for Your Domain The schema in `CLAUDE.md` is domain-agnostic. To adapt it: 1. **Purpose** — Describe your knowledge domain in one paragraph 2. **Tagging taxonomy** — Replace placeholder categories with your own (e.g., for a cooking KB: `cuisine`, `technique`, `ingredient`, `equipment`) 3. **Confidence levels** — Adjust the descriptions to match your domain's evidence standards 4. **Entity types** — Update the entity page description to match what entities mean in your domain (people, tools, companies, etc.) 5. **Journal template** — Customize `wiki/journal/template.md` for your workflow Everything else — page format, linking conventions, workflows, rules — is universal and works across domains. ## Example Domains This template works for any knowledge-intensive topic: - **Research notes** — papers, experiments, methodologies - **Book analysis** — themes, characters, author techniques - **Competitive analysis** — companies, products, market trends - **Course notes** — lectures, readings, key concepts - **Personal development** — frameworks, habits, book summaries - **Technical documentation** — APIs, architectures, design patterns - **Hobby deep-dives** — any subject you want to master ## License MIT --- title: "Remotion KB — Master Index" type: index updated: 2026-06-11 remotion_version: "4.0.475" --- # Remotion KB — Master Index Master catalog of all wiki pages. Every page in the wiki must have an entry here. **Latest verified Remotion version:** 4.0.475 (2026-06-10); cadence ~1 release every 2 days **KB pages:** 30 (13 concepts + 6 entities + 4 summaries + 5 syntheses + 2 system) ## Concepts (13) ### Authoring - [[concepts/installation-setup]] — create-video, project structure, brownfield install, studio startup - [[concepts/compositions-fundamentals]] — Composition/Sequence/Series, props flow, calculateMetadata, schemas, fonts - [[concepts/animation]] — useCurrentFrame, interpolate, spring, easing, noise, deterministic randomness - [[concepts/audio]] — audio tags, getAudioData, waveforms, sample rates - [[concepts/video-media]] — OffthreadVideo vs Html5Video vs @remotion/media, images, assets, prefetch - [[concepts/captions]] — @remotion/captions: parsing, transcribing, TikTok-style pages, display - [[concepts/transitions]] — TransitionSeries, presentations, timings, overlays, audio behavior - [[concepts/player]] — @remotion/player: embedding, props/ref API, events, autoplay policies ### Rendering & operations - [[concepts/rendering-ssr]] — bundle/selectComposition/renderMedia, encoding, Docker, distributed rendering - [[concepts/lambda]] — AWS Lambda rendering: setup/IAM, deploy, concurrency, cost, webhooks, limits - [[concepts/cloudrun]] — GCP Cloud Run rendering (alpha): setup, deploy, limits - [[concepts/cli-reference]] — npx remotion commands, config file, env vars, chromium flags - [[concepts/licensing]] — free vs company license, cloud rendering units, who must pay ## Entities (6) - [[entities/remotion-studio]] — the Studio: flags, props editing, render UI, deployment - [[entities/framework-integrations]] — Angular, Figma, After Effects, Electron, Bun/Deno, React 18/19 - [[entities/packages-catalog]] — CATALOG: the ~45 @remotion/* package space mapped - [[entities/lambda-api-catalog]] — CATALOG: every Lambda API function with signature essence - [[entities/cloudrun-api-catalog]] — CATALOG: all 13 Cloud Run functions + light client - [[entities/ai-integration]] — official llms.txt AI rules, remotion skills, agent prompting patterns ## Summaries (4) - [[summaries/release-digest]] — v4.0.461–475 digest: effects system, Studio interactivity arcs - [[summaries/casebook-rendering]] — solved cases: timeouts, delayRender, flicker, concurrency, ENAMETOOLONG - [[summaries/casebook-platform]] — solved cases: Lambda/Cloud Run quotas, bundle-size walls, WSL, Safari player - [[summaries/official-ai-rules]] — what remotion.dev/llms.txt mandates for AI-generated Remotion code ## Syntheses (5) - [[syntheses/rendering-path-picker]] — CLI vs SSR vs Lambda vs Cloud Run: pick by volume and ops budget - [[syntheses/media-tag-picker]] — which media component when, with the naming-history trap - [[syntheses/performance-recipes]] — concurrency, GPU/hardware acceleration, prefetch, benchmark - [[syntheses/cost-estimation]] — Lambda cost model, egress gotchas, license interplay - [[syntheses/troubleshooting-checklist]] — signature→step triage and the 8-step sequence ## Gaps / TODO - Per-presentation transition option docs (fade/wipe/slide/flip/clock-wipe option objects) not in raw/ — [[concepts/transitions]] confirms names only; fetch `packages/docs/docs/transitions/presentations/` next ingest. - ~24 @remotion/* packages marked "(not yet ingested)" in [[entities/packages-catalog]] — per-item reference ring candidates if demand shows. - No dollar pricing in license sources — [[concepts/licensing]] points to remotion.pro instead of inventing figures. - Releases ship every ~2 days — re-verify [[summaries/release-digest]] and bump `remotion_version` each ingest. Remotion 5.0 is in migration-guide stage; re-check status next pass. ## Statistics - **Total pages**: 30 - **Concepts**: 13 - **Entities**: 6 - **Summaries**: 4 - **Syntheses**: 5 --- title: "Animation: Frames, Interpolation & Springs" type: concept tags: [animation, interpolate, spring, easing, noise, randomness] created: 2026-06-11 updated: 2026-06-11 confidence: high sources: ["raw/github_doc-packages-docs-docs-animating-properties-mdx.md", "raw/github_doc-packages-docs-docs-interpolate-mdx.md", "raw/github_doc-packages-docs-docs-spring-mdx.md", "raw/github_doc-packages-docs-docs-measure-spring-mdx.md", "raw/github_doc-packages-docs-docs-animation-math-mdx.md", "raw/github_doc-packages-docs-docs-noise-visualization-mdx.md", "raw/github_doc-packages-docs-docs-interpolate-colors-mdx.md", "raw/github_doc-packages-docs-docs-random-mdx.md"] --- # Animation: Frames, Interpolation & Springs ## Definition Animation in Remotion is a pure function of the frame number: `useCurrentFrame()` gives the current frame, and you derive every animated property from it. Two helpers do most of the work — `interpolate()` maps a value range to an output range (with easing and clamping), and `spring()` runs a physics simulation from 0 to 1. Because frames render concurrently across multiple headless browser tabs, anything time- or randomness-dependent must be deterministic per frame. ## How It Works ### The frame-driven model A fade-in is just math on the frame: `const opacity = Math.min(1, frame / 60);`. The cardinal rule: **always animate using `useCurrentFrame()`** — CSS transitions and other wall-clock animations cause flickering during rendering because frames are captured out of order. ### `interpolate(input, inputRange, outputRange, options?)` ```ts const opacity = interpolate(frame, [0, 60], [0, 1], { extrapolateRight: "clamp", }); ``` - **Multiple keyframes**: `interpolate(frame, [0, 20, durationInFrames - 20, durationInFrames], [0, 1, 1, 0])` fades in and out (`durationInFrames` from `useVideoConfig()`). - **Any driver, not just time**: feed a spring into it — `interpolate(driver, [0, 1], [0, 200])` maps a 0→1 spring to 0→200px. - **Extrapolation**: `extrapolateLeft` / `extrapolateRight` accept `extend` (default), `clamp`, `wrap`, `identity`. E.g. `interpolate(1.5, [0, 1], [0, 2], {extrapolateRight: 'clamp'}) // 2`. - **Easing**: `easing: Easing.bezier(0.8, 0.22, 0.96, 0.65)` curves the progress within the active segment; from v4.0.462 pass an array with one easing per segment, e.g. `[Easing.out(Easing.cubic), Easing.in(Easing.cubic)]` for a 3-keyframe range (length must be `inputRange.length - 1`). - **Posterize** (v4.0.470+): `posterize: 3` quantizes the input so frames 0–2 share frame 0's value — a stop-motion/sampled look. - **CSS transform strings** (v4.0.472+): output ranges may be `scale`, `translate`, `rotate`, or `transformOrigin` strings, e.g. `translate: interpolate(frame, [0, 30], ['0px 0px', '100px 50px'])`. Units must match per component. - **Numeric tuples** (v4.0.473+): output range entries can be same-length number tuples. - Input and output ranges must have equal length; single-value ranges work from v4.0.469. ### `spring()` and `measureSpring()` ```ts const value = spring({ frame, fps, config: { stiffness: 100, }, }); ``` Animates `from: 0` to `to: 1` by default; pass `fps` from `useVideoConfig()`. Config knobs: `mass` (default `1`, lower = faster), `damping` (default `10`, higher = less bounce), `stiffness` (default `100`, bounciness), `overshootClamping` (default `false`, caps at `to`). Timing knobs: `durationInFrames` stretches the curve to an exact length, `delay` holds the initial value for n frames, `reverse` plays backwards. Order of operations: stretch → reverse → delay. Delay can also be done manually via `frame - 20` as the `frame` argument. `measureSpring({fps, config})` returns how many frames a spring needs to settle (e.g. `measureSpring({fps: 30, config: {damping: 200}}) // => 23`); `threshold` (default `0.005`) defines "settled" — lower threshold, longer measured duration. Use it to size sequences around a spring. ### Animation math Spring values are plain numbers, so combine them arithmetically. The enter/exit idiom: ```ts const enter = spring({fps, frame, config: {damping: 200}}); const exit = spring({fps, frame, config: {damping: 200}, durationInFrames: 20, delay: durationInFrames - 20}); const scale = enter - exit; ``` `enter` rises 0→1 at the start; `exit` rises 0→1 in the last 20 frames; their difference scales the element in and back out with one expression. ### Colors: `interpolateColors()` `interpolateColors(frame, [0, 20], ['red', 'yellow'])` returns an `rgba()` string (e.g. `rgba(255, 128, 0, 1)`). Accepts hex, `rgb`/`rgba`, `hsl`/`hsla`, CSS color names, and (v4.0.439+) `oklch`, `oklab`, `lab`, `lch`, `hwb` with optional `/ alpha`. Options: `easing` (v4.0.475+, single function or per-segment array) and `posterize` (v4.0.470+). ### Noise and deterministic randomness - `@remotion/noise` provides `noise3D(seed, x, y, z)` — use two dimensions for space and the third for time (`frame * speed`) to get organic motion like a floating dot grid; map its `[-1, 1]` output with `interpolate()`. - `random(seed)` from `remotion` returns a deterministic pseudorandom number in `[0, 1)` for a `number` or `string` seed: `random(1) // 0.07301638228818774`, always. Seed per element (`random(`random-x-${i}`)`) for stable particle layouts. `Math.random()` triggers an ESLint warning because each render thread would see different values; if you truly want non-determinism, `random(null)` bypasses the warning. ## Key Parameters - `interpolate()` options: `extrapolateLeft`, `extrapolateRight`, `easing`, `posterize`. Types `ExtrapolateType` and `InterpolateOptions` exported since v3.3.77. - `spring()` args: `frame`, `fps`, `from`, `to`, `reverse`, `delay`, `durationInFrames`, `durationRestThreshold`, `config: {mass, damping, stiffness, overshootClamping}`. - `measureSpring()` args: `fps`, `threshold`, `config`, `from`, `to`. - `random()` arg: `number | string | null`. ## When To Use - Linear/keyframed property changes → `interpolate()` with `clamp`. - Natural, bouncy entrances and scale pops → `spring()`; flatten the bounce with `damping: 200`. - Combined enter/exit on one element → animation math (`enter - exit`). - Animated color shifts → `interpolateColors()`. - Organic wobble, particles, generative art → `@remotion/noise` + `random(seed)`. ## Risks & Pitfalls - **CSS transitions/animations flicker in renders** — never animate outside `useCurrentFrame()`. - **Forgetting `extrapolateRight: 'clamp'`** lets values run past the output range (scale 2 at frame 40 for a `[0, 20] → [0, 1]` mapping). - **`Math.random()` differs per render thread** — use `random(seed)`. - **Springs overshoot by design** — values can exceed `to` briefly; use `overshootClamping: true` if that breaks layout. - **Hardcoding spring length** — a spring's natural settle time depends on config and fps; measure with `measureSpring()` instead of guessing. - **Per-segment easing array of wrong length** errors — must be `inputRange.length - 1`. ## Related Concepts - [[concepts/compositions-fundamentals]] — `` shifts the frame that drives these helpers - [[concepts/transitions]] — packaged scene-to-scene animations - [[concepts/audio]] — driving animation from audio data - [[syntheses/performance-recipes]] — keeping per-frame work cheap ## Sources - raw/github_doc-packages-docs-docs-animating-properties-mdx.md — frame-driven model, flickering warning - raw/github_doc-packages-docs-docs-interpolate-mdx.md — `interpolate()` full API incl. easing, posterize, CSS transforms - raw/github_doc-packages-docs-docs-spring-mdx.md / -measure-spring-mdx.md — spring API and measurement - raw/github_doc-packages-docs-docs-animation-math-mdx.md — enter/exit composition - raw/github_doc-packages-docs-docs-interpolate-colors-mdx.md — color interpolation - raw/github_doc-packages-docs-docs-noise-visualization-mdx.md — `noise3D()` technique - raw/github_doc-packages-docs-docs-random-mdx.md — deterministic randomness --- title: "Audio: Playback, Analysis & Sample Rates" type: concept tags: [audio, visualization, media-utils, sample-rate, volume] created: 2026-06-11 updated: 2026-06-11 confidence: high sources: ["raw/github_doc-packages-docs-docs-html5-audio-mdx.md", "raw/github_doc-packages-docs-docs-get-audio-data-mdx.md", "raw/github_doc-packages-docs-docs-get-audio-duration-in-seconds-mdx.md", "raw/github_doc-packages-docs-docs-get-waveform-portion-mdx.md", "raw/github_doc-packages-docs-docs-sample-rate-mdx.md", "raw/github_doc-packages-docs-docs-audiobuffertodataurl-mdx.md"] --- # Audio: Playback, Analysis & Sample Rates ## Definition Audio in Remotion has two halves: **playback** — the `` component (previously called `