### Run the capture example Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/capture/README.md Commands to install Chromium and run the capture example script (capture.mjs). ```bash npx playwright install chromium node capture.mjs ``` -------------------------------- ### Quick Setup Commands Source: https://github.com/anaydhawan/openvidstudio/blob/main/CONTRIBUTING.md Commands to clone the repository, install dependencies, and run build/dev commands for the MCP server and site packages. No .env file is required. ```bash git clone https://github.com/AnayDhawan/openvidstudio.git cd openvidstudio pnpm install (no .env required) # work on the MCP server pnpm --filter @openvidstudio/mcp-server build # work on the public site pnpm --filter @openvidstudio/site dev ``` -------------------------------- ### Install prerequisites on Windows, macOS, and Debian/Ubuntu Source: https://github.com/anaydhawan/openvidstudio/blob/main/README.md Installation commands for ffmpeg, Playwright, Chromium, and edge-tts on each platform. On Windows, reopen the terminal after installing ffmpeg so PATH updates take effect. `preflight` checks these prerequisites and names the fix for your platform. ```bash # Windows. Reopen the terminal after installing ffmpeg, winget only puts it on # PATH for new shells. winget install --id Gyan.FFmpeg -e npm install playwright && npx playwright install chromium pip install edge-tts ``` ```bash # macOS brew install ffmpeg npm install playwright && npx playwright install chromium pip install edge-tts ``` ```bash # Debian or Ubuntu sudo apt update && sudo apt install -y ffmpeg npm install playwright && npx playwright install chromium pip install edge-tts ``` -------------------------------- ### Install @openvidstudio/capture and Playwright Chromium Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/capture/README.md Install the package and the Playwright Chromium browser for browser capture. The second command is required only for browser capture. ```bash npm install @openvidstudio/capture npx playwright install chromium # browser capture only ``` -------------------------------- ### Use launchChromium, detectAndCompensateZoom, replayInteractions Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/capture/README.md Example usage of the main browser capture functions: launch Chromium, set viewport size, navigate, detect and compensate zoom, replay interactions, and take a screenshot. Requires an app running on localhost:3000 and Chromium installed. ```ts import { launchChromium, detectAndCompensateZoom, replayInteractions } from "@openvidstudio/capture"; const browser = await launchChromium(); const page = await browser.newPage(); await page.setViewportSize({ width: 1600, height: 1000 }); await page.goto("http://localhost:3000"); const { zoom } = await detectAndCompensateZoom(page, { width: 1600, height: 1000 }); await replayInteractions(page, [{ type: "click", selector: "[data-tour=start]" }]); await page.screenshot({ path: "shot.png" }); ``` -------------------------------- ### Clone and build OpenVidStudio from source Source: https://github.com/anaydhawan/openvidstudio/blob/main/README.md Commands to clone the repository, install dependencies with pnpm, and build. After building, point the MCP config at `packages/mcp-server/dist/stdio.js` with `"command": "node"`. ```bash git clone https://github.com/AnayDhawan/openvidstudio.git cd openvidstudio && pnpm install pnpm build # then point the config at packages/mcp-server/dist/stdio.js with "command": "node" ``` -------------------------------- ### Install Remotion skills on Windows Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/docs/PIPELINE.md Use this command to add the Remotion skills package on Windows, where the standard 'npx remotion skills add' fails with spawn EINVAL. ```bash npx -y skills@1.2.0 add remotion-dev/skills ``` -------------------------------- ### Build desktop capture arguments with buildDesktopCaptureArgs Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/capture/README.md Example of building ffmpeg arguments for desktop capture on Windows, specifying window, framerate, duration, and output path. The result is intended to be passed to spawn("ffmpeg", args). ```ts import { buildDesktopCaptureArgs } from "@openvidstudio/capture"; const args = buildDesktopCaptureArgs({ platform: "win32", window: "My App", framerate: 30, durationSeconds: 8, outPath: "out.mp4", }); // spawn("ffmpeg", args) ``` -------------------------------- ### Prompt for agent to create demo video Source: https://github.com/anaydhawan/openvidstudio/blob/main/README.md Paste this prompt to your agent from inside the repo you want a video of. The agent handles the process end to end, including starting the app, checking the machine with `preflight`, reading brand assets with `extract_brand`, and showing a plan before writing anything. ```text make a demo video of this project with openvidstudio. handle it end to end. work out what this project is and how to start it, get it running, and use its own brand rather than your defaults. ask me anything you need along the way, one question at a time, and show me the result when it is done. ``` -------------------------------- ### Example beats.json with all captureMethod variants Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/docs/PLANNING.md Example beats.json fragment for a fictional product, showing one beat per captureMethod (higgsfield, screenshot, recording, dom-demo). The demo-schedule beat includes optional transition and artifacts fields; other beats omit them to rely on defaults. ```json { "fps": 30, "title": "Loomcard", "beats": [ { "id": "hook", "start": 0, "duration": 180, "vo": "Loomcard turns your notes into spaced-repetition flashcards, and schedules review so you actually remember them.", "visual": { "captureMethod": "higgsfield", "higgsfieldPrompt": "slow push-in on a warm desk scene, hands resting near a closed notebook, soft morning light, no screens or readable text in frame, cinematic shallow depth of field" } }, { "id": "demo-review", "start": 180, "duration": 120, "vo": "Flip a card, and Loomcard scores your confidence on the spot.", "visual": { "captureMethod": "screenshot", "url": "https://app.loomcard.example/review", "interactions": [ { "type": "click", "selector": "[data-testid=flip-card]" }, { "type": "click", "selector": "[data-testid=confidence-4]" } ] } }, { "id": "demo-schedule", "start": 300, "duration": 240, "vo": "That confidence score adjusts your next review date live, so easy cards fade back and hard ones come around sooner.", "transition": "whip", "visual": { "captureMethod": "recording", "url": "https://app.loomcard.example/review", "interactions": [ { "type": "click", "selector": "[data-testid=confidence-1]" }, { "type": "wait", "ms": 600 } ] }, "artifacts": { "recordingPath": "public/video/demo-schedule.mp4" } }, { "id": "cta", "start": 540, "duration": 180, "vo": "Loomcard is free and open source. Star it, try it, or send a pull request.", "visual": { "captureMethod": "dom-demo" } } ] } ``` -------------------------------- ### CodePanel lines prop example Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/docs/API.md Example of the `lines` prop for `CodePanel`, showing a JSON-like structure with tokens. The `c` field is optional and can be omitted for plain text. ```tsx lines={[ [{ t: "{", c: "plain" }], [{ t: ' "name"', c: "str" }, { t: ": ", c: "plain" }, { t: '"value"', c: "str" }], ]} ``` -------------------------------- ### Install node-pty for faithful terminal recording Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/capture/README.md Install node-pty to enable faithful terminal recording with colour and cursor addressing. It is not a declared dependency and is loaded at runtime if present. ```bash npm install node-pty ``` -------------------------------- ### Example beats.json with tone field Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/docs/PLANNING.md Shows a minimal `beats.json` object with a top-level `tone` field set to `"release"`. The `beats` array is elided with `[ ... ]` in the source. Omitting `tone` defaults to `"default"`. ```json { "title": "Loomcard", "tone": "release", "beats": [ ... ] } ``` -------------------------------- ### Conventional Commits Examples Source: https://github.com/anaydhawan/openvidstudio/blob/main/CONTRIBUTING.md Example commit messages following the Conventional Commits specification. Types include feat, fix, docs, style, refactor, perf, test, ci, and chore. ```text feat: add dark mode toggle fix: correct timezone offset in tournament dates docs: update quick start steps ``` -------------------------------- ### Using the MusicBed component Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/docs/NARRATION.md Import and render the MusicBed component with a duration and volume. Keep the volume low (0.16) as it sits under narration. ```tsx import { MusicBed } from "@openvidstudio/core"; ``` -------------------------------- ### Importing a music bed with import_music_bed Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/docs/NARRATION.md Command to download and process a music track from a CC0 catalog. Trims, fades, normalizes to -20 LUFS, and writes provenance files. ```text import_music_bed(id: "lofi:terminal-rain", out: "public/audio/music-bed.mp3", seconds: 45, start: 12) ``` -------------------------------- ### Generate markers and subtitles Source: https://github.com/anaydhawan/openvidstudio/blob/main/packages/docs/PIPELINE.md Writes output/