{"_id":"@beast-course/video-pipeline","_rev":"2-3f979cfb30e576217bc11c692808bd2e","name":"@beast-course/video-pipeline","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@beast-course/video-pipeline","version":"0.1.0","_id":"@beast-course/video-pipeline@0.1.0","maintainers":[{"name":"beast-course","email":"beastcreates46@gmail.com"}],"bin":{"opencode-video-pipeline":"bin/cli.js"},"dist":{"shasum":"4e5c075266cb1933455eae4079489c67d3112c63","tarball":"https://registry.npmjs.org/@beast-course/video-pipeline/-/video-pipeline-0.1.0.tgz","fileCount":135,"integrity":"sha512-vfxseIqZFzL1V0IwHNE1JAVZZNCI5nxfTBk0NgTdvfh6oG+x+0TR30G0LGSqGfWQMov3NNilDjNs1SF7xR0Zlw==","signatures":[{"sig":"MEUCIQCkT7njvoThTUwaRw/fuWFtP20yyxg2NfFFh9e060LuaQIgW+gLAjKXB2l1ImdxR6uqZ3KQJZs7QF2Y0zQ1ZDdvgKY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":277879},"main":"src/index.ts","gitHead":"c541b3dacddc334a5b544684b05a6b63164f2820","scripts":{"test":"vitest run","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"vitest run"},"_npmUser":{"name":"beast-course","email":"beastcreates46@gmail.com"},"workspaces":["packages/*"],"_npmVersion":"10.9.8","description":"Autonomous, production-grade video generation pipeline for OpenCode — scene graph engine, motion library, 5-agent orchestration, and 3-layer QA","directories":{},"_nodeVersion":"22.23.1","dependencies":{"commander":"^12.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.0","vitest":"^4.1.10","remotion":"^4.0.0","react-dom":"^18.3.0","typescript":"^5.5.0","@remotion/bundler":"^4.0.0","@remotion/renderer":"^4.0.0"},"peerDependencies":{"react":"^18.0.0","remotion":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/video-pipeline_0.1.0_1783606673587_0.5538798247675132","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@beast-course/video-pipeline","version":"0.1.1","description":"Autonomous, production-grade video generation pipeline for OpenCode — scene graph engine, motion library, 5-agent orchestration, and 3-layer QA","workspaces":["packages/*"],"bin":{"opencode-video-pipeline":"bin/cli.js"},"main":"src/index.ts","scripts":{"test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","prepublishOnly":"vitest run"},"publishConfig":{"access":"public"},"dependencies":{"commander":"^12.0.0","tsx":"^4.0.0"},"devDependencies":{"typescript":"^5.5.0","vitest":"^4.1.10"},"peerDependencies":{"remotion":"^4.0.0","react":"^18.0.0","react-dom":"^18.0.0"},"_id":"@beast-course/video-pipeline@0.1.1","gitHead":"13324f46a3209d0ab53c45c02ca3be915ed5fb5f","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-4qc7XcFQsC0oZPo6Adm8sLYNoU9XI+/eldEwvWkY+ZlOdA7O9tS3B7I2GWNae7sOBfDrJHaLM8TZOifKTjMgwg==","shasum":"ead36951b0c924e4cce58a550d90438b9df1e256","tarball":"https://registry.npmjs.org/@beast-course/video-pipeline/-/video-pipeline-0.1.1.tgz","fileCount":135,"unpackedSize":280806,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEVvA3z+4MI5IDZ8//mvcj14z11b1/rFbubH5UcFlwl7AiEA4FbUOaIiqp2Up73lJudXvD+wXBmh2iNlEWE0tiUV7Lw="}]},"_npmUser":{"name":"beast-course","email":"beastcreates46@gmail.com"},"directories":{},"maintainers":[{"name":"beast-course","email":"beastcreates46@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/video-pipeline_0.1.1_1783610202740_0.8713659561419573"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-09T14:17:53.360Z","modified":"2026-07-09T15:16:42.992Z","0.1.0":"2026-07-09T14:17:53.744Z","0.1.1":"2026-07-09T15:16:42.903Z"},"description":"Autonomous, production-grade video generation pipeline for OpenCode — scene graph engine, motion library, 5-agent orchestration, and 3-layer QA","maintainers":[{"name":"beast-course","email":"beastcreates46@gmail.com"}],"readme":"# @beast-course/video-pipeline\n\n**Autonomous video generation for OpenCode.** From specification to rendered MP4, the pipeline orchestrates research, creative direction, production, and quality assurance — without a GUI, without timelines, without manual keyframing.\n\n```bash\nnpx @beast-course/video-pipeline init my-project\ncd my-project\nopencode\n/new-video \"30-second product launch for a fintech analytics tool\"\n```\n\n---\n\n## Why this exists\n\nVideo production tooling has bifurcated. On one side, professional NLEs (Premiere, After Effects, DaVinci) offer unlimited expressiveness but require hours of manual work per minute of output. On the other, template-based tools (Canva, Kapwing, Descript) trade control for speed.\n\nThis pipeline occupies the unexplored middle — **programmatic control without the timeline**. The scene graph is the canonical representation. Constraints handle layout across aspect ratios. Keyframes drive animation. Camera presets and effect stacks provide cinematic depth. The agent system orchestrates the creative workflow.\n\nThe result: one scene graph definition produces both 16:9 and 9:16 renders, with motion design quality enforced at every stage.\n\n---\n\n## Architecture\n\nThe system has four layers, each independently swappable.\n\n### Scene Graph Engine\n\nThe core data model. A scene graph is a tree of typed nodes (text, rect, image, gradient, circle) arranged in scenes, each with a camera configuration and timeline. Nodes carry constraints for layout, arrays of keyframes for animation, and an effect stack for post-processing. The engine evaluates these declaratively — constraints are solved per-frame, keyframes are interpolated, effects are composited in order.\n\n```\nSceneGraph\n└── Scene (× N, each with a camera + duration)\n    └── SceneNode (× M, arranged in a parent-child tree)\n        ├── transform — position, rotation, scale\n        ├── constraints — anchor, flex, padding, margin, aspect-ratio\n        ├── animations — per-property keyframe sequences\n        └── effects — composited in order (bloom, blur, glow, grain, ...)\n```\n\nOne scene graph → any aspect ratio. The constraint solver re-laysouts nodes for 16:9 (horizontal) and 9:16 (vertical) from the same definition. No safe zones, no conditional branches — the constraints express the intent, and the solver computes the layout.\n\n### Motion Library\n\n250+ primitives organized as typed configuration objects (not React components). Each preset exports frames that the timeline engine interprets. This means the LLM generates JSON — easier to produce correctly than JSX — and the results are deterministic, testable, and portable across renderers.\n\n- **96 animation presets** across 15 categories (fade, slide, pop, bounce, elastic, blur, counter, typing, wave, stagger, parallax, float, shake, pulse, light-sweep)\n- **17 transitions** (crossfade, slide, zoom, whip-pan, blur, morph, circular-reveal, grid-reveal, and more)\n- **8 camera movement configurations** mapped to the camera engine's presets\n- **14 backgrounds** (gradient mesh, noise, lights, solid, pattern)\n- **15 effect configurations** with sensible defaults\n- **15 caption styles** with 10 animation patterns and 7 layouts, plus a generator that resolves style + animation + layout into a scene graph fragment\n- **8 brand themes** (Apple, Stripe, Linear, Raycast, Framer, Vercel, Notion, OpenAI) — each defining color palettes, typography stacks, animation philosophy, camera style, and pacing\n- **10 UI presets** (hero sections, feature cards, notifications, toasts, buttons, badges, modals, tooltips, avatars)\n- **12 particle presets** (sparkle, confetti, snow, fire, smoke, bubbles, stars, rain, magic dust, embers)\n- **10 SVG animation presets** (morph, draw, stroke-animate, path-reveal, float)\n- **7 chart presets** (bar, line, pie, area, donut, radial)\n- **10 scene composition presets** covering product showcases, testimonials, data visualization, tutorials, announcements, social clips, intros, and outros\n- **7 complete video templates** (product demo, explainer, social clip, launch teaser, tutorial, testimonial, feature update) — each returning a full `Partial<SceneGraph>` with 3–6 scenes\n\n### Agent System\n\nFive OpenCode agents in a star topology. All communication flows through Director — sub-agents never talk to each other. Director reads pipeline state, dispatches the next stage with full context, evaluates output, and decides retry or advance. It never touches code, assets, or renders.\n\n| Agent | Responsibility | Max Retries |\n|-------|---------------|-------------|\n| **Director** | Orchestrates the pipeline; reads/writes state; decides retries | — |\n| **Research** | Gathers facts, writes script with timestamped scenes | 2 |\n| **Creative** | Designs storyboard, selects motion presets, caption styles, camera moves | 3 |\n| **Production** | Runs Remotion render, manages assets | 3 |\n| **QA** | Structural checks, ffprobe analysis, perceptual review | 5 |\n\nQuality thresholds: minimum 75 per dimension, 85 average, hard-fail on Facts and Rendering. Global ceiling of 12 retries across all stages.\n\n### Motion Design Skills\n\nFive skills loaded into Creative context, encoding production motion design knowledge — not as vague guidelines but as decision trees with measurable constraints.\n\n- **motion-design** — 12 animation principles, easing theory, timing/rhythm rules, anti-patterns, agency references\n- **visual-composition** — hierarchy, gestalt principles, rule of thirds, color psychology\n- **cinematography** — camera language, depth of field, parallax, shake constraints\n- **typography-motion** — kinetic typography, font pairing, readability thresholds (minimum 2× reading time, 4.5:1 contrast ratio)\n- **attention-psychology** — hook strategies, cognitive load limits, retention drop patterns\n\n---\n\n## Engine internals\n\n### Constraint solver\nNodes declare layout intent via constraints, not pixel positions. The solver evaluates anchor points, flex direction, grow/shrink ratios, padding, margin, aspect ratio preservation, and percentage/vw/vh units. This is what enables one scene graph to serve multiple aspect ratios — the same constraints produce correct layouts at 1920×1080 and 1080×1920.\n\n### Timeline engine\nPer-node, per-property keyframe arrays. Supports scalar and vector interpolation, configurable easing (linear, ease-in, ease-out, ease-in-out, spring, elastic, bounce), custom bezier curves, delay, loop, yoyo, and loop count. The engine is stateless — given the same keyframes and frame number, it produces the same output. Deterministic by design.\n\n### Camera engine\nEight presets (push-zoom, orbit-pan, shake, dolly, parallax, follow, tilt, focus-pull). Each is a function `(camera, progress) → camera` that mutates position, rotation, zoom, focal length, or depth of field over time. The CameraController applies the preset and then projects the camera state onto scene nodes as 2D transforms.\n\n### Effect stack\nSeven renderers (bloom, blur, glow, grain, chromatic-aberration, drop-shadow, color-grade) applied per-node in order. Each is a Canvas2D function that receives the rendering context and effect parameters. Effects are composited sequentially — a node can have bloom + glow + grain, each independently configured.\n\n### 3-layer QA\n- **Layer 1 — structural:** compares render manifest against blueprint for scene count, duration drift, caption fidelity, node completeness\n- **Layer 2 — technical:** ffprobe analysis for resolution (≥1080p), codec (H.264), audio presence, frame rate (≥24fps)\n- **Layer 3 — perceptual:** extracts one JPEG per scene at given timestamps for human or AI visual review\n\n---\n\n## Extending\n\n### Adding a preset\n\n```ts\n// packages/motion-library/presets/my-custom.ts\nexport const myCustomPresets = [\n  {\n    name: 'my-custom',\n    type: 'fade' as const,\n    keyframes: [\n      { property: 'opacity', frames: [{ at: 0, value: 0 }, { at: 30, value: 1 }] },\n    ],\n  },\n]\n```\n\nRegister it in `packages/motion-library/presets/index.ts`.\n\n### Creating a theme\n\n```ts\nimport { BrandTheme } from '../themes'\n\nexport const myBrand: BrandTheme = {\n  name: 'my-brand',\n  colorPalette: { primary: '#...', secondary: '#...', /* ... */ },\n  typography: { fonts: { heading: 'Inter', body: 'Inter', mono: 'JetBrains Mono' }, /* ... */ },\n  animationPhilosophy: { defaultEasing: 'ease-out', defaultDuration: 0.6, /* ... */ },\n  cameraStyle: { defaultPreset: 'push-zoom', movement: 'minimal', depth: true },\n  pacing: { sceneLength: 4, beatInterval: 2, hookDuration: 3 },\n}\n```\n\n### Building a template\n\nTemplates are functions that receive typed parameters and return a `Partial<SceneGraph>`. They compose scenes from nodes, each with its own constraints, animations, and effects.\n\n```ts\nimport { SceneGraph } from '@opencode/video-engine'\n\nexport function createMyVideo(params: MyParams): Partial<SceneGraph> {\n  return {\n    scenes: [\n      {\n        id: 'intro',\n        duration: 3,\n        fps: 30,\n        camera: { /* ... */ },\n        nodes: [ /* ... */ ],\n      },\n    ],\n  }\n}\n```\n\n---\n\n## Development\n\n```bash\nnpm install              # Install dependencies\nnpx vitest run           # Run all 111 tests\nnpx tsc --noEmit         # Type-check the entire project\n```\n\nTo render a video (requires Remotion and ffmpeg):\n\n```bash\nnpx remotion render packages/video-engine/src/renderers/remotion/Root.tsx Scene out/render.mp4\n```\n\n---\n\n## Project structure\n\n```\npackages/\n├── video-engine/        → Core: types, serialization, constraint solver,\n│                           timeline engine, camera controller, effect stack,\n│                           Remotion renderer adapter\n├── motion-library/      → Presets: 96 animations, 17 transitions, 8 cameras,\n│                           14 backgrounds, 15 effects, 15 caption styles,\n│                           10 animations, 7 layouts, 8 themes, 10 UI presets,\n│                           12 particle presets, 10 SVG animations, 7 charts,\n│                           7 loaders, 9 reveals, 10 icons, 10 scene comps,\n│                           7 templates\n├── .opencode/           → Agent definitions, motion design skills, commands\n├── scripts/             → QA scripts (structural, ffprobe, keyframe extraction)\n├── src/                 → CLI scaffold generator\n```\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}