[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92239":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":14,"rankGlobal":8,"rankLanguage":8,"license":15,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":8,"pushedAt":8,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":13,"starSnapshotCount":13,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},92239,"ai-agent-video-editor","pifferologo\u002Fai-agent-video-editor","pifferologo",null,"TypeScript",151,1164,81,0,46.2,"MIT License",false,"main",true,[],"2026-07-22 04:02:05","# video-use\n\nConversation-driven video editing for AI agents. Transcribe raw footage with ElevenLabs Scribe, pack phrase-level transcripts, reason over an EDL, render with ffmpeg, and self-evaluate cut boundaries — all through a typed Node.js CLI.\n\n## Overview\n\nvideo-use gives an LLM structured text (word-level transcripts) plus on-demand visual composites instead of dumping video frames. An agent reads `takes_packed.md`, proposes a cut strategy, writes `edl.json`, and renders `final.mp4` into `\u003Cvideos_dir>\u002Fedit\u002F`.\n\n```mermaid\nflowchart LR\n  subgraph inputs [Inputs]\n    RAW[Raw takes]\n    ENV[.env + ffmpeg]\n  end\n\n  subgraph pipeline [Pipeline]\n    T[transcribe]\n    P[pack]\n    E[EDL reasoning]\n    R[render]\n    V[self-eval timeline]\n  end\n\n  subgraph outputs [Outputs]\n    MD[takes_packed.md]\n    MP4[final.mp4]\n  end\n\n  RAW --> T --> P --> MD\n  MD --> E --> R --> MP4\n  R --> V --> MP4\n  ENV --> T\n  ENV --> R\n```\n\n## Features\n\n- **Word-level Scribe transcription** with speaker diarization, audio events, and per-file caching\n- **Phrase packing** — silence-aware markdown optimized for LLM token efficiency\n- **EDL render pipeline** — per-segment grade, 30 ms audio fades, HDR tone-map, overlay compositing, subtitle burn-in last\n- **Timeline composites** — filmstrip + waveform PNGs for cut-point drill-down\n- **Optional Redis cache** — cross-session transcript persistence when enabled\n- **Strict TypeScript** — shared libraries, Vitest tests, ESLint flat config\n\n## Installation\n\n### Prerequisites\n\n| Requirement | Notes |\n|-------------|-------|\n| Node.js 18+ | Required for the CLI |\n| ffmpeg \u002F ffprobe | Hard requirement for all media operations |\n| ElevenLabs API key | Scribe transcription ([get a key](https:\u002F\u002Felevenlabs.io\u002Fapp\u002Fsettings\u002Fapi-keys)) |\n| Redis 6+ | Optional; enable with `REDIS_ENABLED=true` |\n\n### Setup\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fbrowser-use\u002Fvideo-use ~\u002FDeveloper\u002Fvideo-use\ncd ~\u002FDeveloper\u002Fvideo-use\nnpm install\nnpm run build\ncp .env.example .env\n# Edit .env — set ELEVENLABS_API_KEY\n```\n\nRegister the skill with your agent (symlink the repo into your skills directory). See [install.md](.\u002Finstall.md) for agent-specific steps.\n\n### Agent setup prompt\n\n```text\nSet up https:\u002F\u002Fgithub.com\u002Fbrowser-use\u002Fvideo-use for me.\nRead install.md first, then SKILL.md for daily usage.\nUse npx video-use for all editing commands.\n```\n\n## Configuration\n\nCopy `.env.example` to `.env`:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `ELEVENLABS_API_KEY` | — | Required for transcription |\n| `LOG_LEVEL` | `info` | `debug`, `info`, `warn`, or `error` |\n| `REDIS_ENABLED` | `false` | Enable Redis transcript cache |\n| `REDIS_URL` | `redis:\u002F\u002F127.0.0.1:6379` | Redis connection URL |\n| `REDIS_KEY_PREFIX` | `video-use:` | Key namespace prefix |\n| `REDIS_DEFAULT_TTL_SECONDS` | `86400` | Cache TTL (24 h) |\n\nVerify Redis connectivity:\n\n```bash\nnpx video-use redis ping\n```\n\n## CLI reference\n\n```bash\nnpx video-use transcribe \u003Cvideo> [--edit-dir \u003Cdir>] [--num-speakers N]\nnpx video-use transcribe-batch \u003Cvideos_dir> [--workers 4]\nnpx video-use pack --edit-dir \u003Cdir> [--silence-threshold 0.5]\nnpx video-use timeline \u003Cvideo> \u003Cstart> \u003Cend> [-o out.png]\nnpx video-use render \u003Cedl.json> -o final.mp4 [--preview] [--build-subtitles]\nnpx video-use grade \u003Cinput> -o output [--preset warm_cinematic]\nnpx video-use redis ping\n```\n\nRun `npx video-use --help` for full option lists.\n\n## Project structure\n\n```\nvideo-use\u002F\n├── src\u002F\n│   ├── cli\u002F           # Commander entry point\n│   ├── config\u002F        # env + logger\n│   ├── lib\u002F           # ffmpeg, scribe, pack, grade, render, timeline\n│   ├── redis\u002F         # connection manager + cache\n│   └── types\u002F         # shared TypeScript interfaces\n├── tests\u002F             # Vitest unit tests\n├── docs\u002FAUDIT.md      # internal architecture audit\n├── SKILL.md           # agent editing instructions\n├── install.md         # first-time setup guide\n└── skills\u002Fmanim-video\u002F  # vendored animation skill\n```\n\n```mermaid\nflowchart TB\n  CLI[src\u002Fcli\u002Findex.ts]\n  CFG[src\u002Fconfig]\n  LIB[src\u002Flib]\n  REDIS[src\u002Fredis]\n  TYPES[src\u002Ftypes]\n\n  CLI --> CFG\n  CLI --> LIB\n  LIB --> CFG\n  LIB --> TYPES\n  LIB --> REDIS\n  REDIS --> CFG\n```\n\n## Development\n\n```bash\nnpm install\nnpm run dev -- --help          # run CLI via tsx without building\nnpm run typecheck              # tsc --noEmit (strict)\nnpm run lint                   # ESLint\nnpm run test                   # Vitest\nnpm run build                  # emit dist\u002F\nnpm run validate               # all of the above\n```\n\n### Render pipeline order\n\n```mermaid\nsequenceDiagram\n  participant EDL as edl.json\n  participant X as extract segments\n  participant C as concat base\n  participant O as overlays\n  participant S as subtitles\n  participant L as loudnorm\n\n  EDL->>X: per-range grade + fades\n  X->>C: lossless -c copy\n  C->>O: PTS-shifted overlays\n  O->>S: burn captions LAST\n  S->>L: -14 LUFS normalize\n  L->>EDL: final.mp4\n```\n\n## Testing\n\n```bash\nnpm run test\n```\n\nTests cover phrase packing logic and Redis manager lifecycle (disabled-mode paths). Integration tests against ffmpeg and Scribe are intentionally manual — they require external services and burn API credits.\n\n## Troubleshooting\n\n### `ELEVENLABS_API_KEY not found`\n\nEnsure `.env` exists at the repo root with a non-empty key, or export the variable in your shell.\n\n### `ffmpeg failed with exit code`\n\nConfirm `ffmpeg` and `ffprobe` are on `PATH` and support libx264. Run `ffprobe -version`.\n\n### Redis ping fails\n\nSet `REDIS_ENABLED=true` and confirm Redis is running locally (`redis-cli ping` → `PONG`).\n\n### Subtitles hidden behind overlays\n\nSubtitles must be applied last in the filter chain (Hard Rule 1 in SKILL.md). Use `npx video-use render` — it enforces this order.\n\n### HDR footage looks oversaturated after render\n\nThe render pipeline detects PQ\u002FHLG sources and applies tone-mapping automatically. If issues persist, probe with `ffprobe -show_entries stream=color_transfer`.\n\n## FAQ\n\n**Does the LLM watch the video?**\nNo. It reads packed transcripts (~12 KB per hour of takes) and requests timeline PNGs only at decision points.\n\n**Where do session outputs go?**\nAlways `\u003Cvideos_dir>\u002Fedit\u002F` — never inside the video-use repo.\n\n**Can I skip Redis?**\nYes. Redis is off by default. Filesystem caching in `edit\u002Ftranscripts\u002F` is always used.\n\n**What animation engines are supported?**\nHyperFrames, Remotion, Manim, and PIL sequences — see SKILL.md. Each renders inside `edit\u002Fanimations\u002Fslot_\u003Cid>\u002F`.\n\n**How do I update the skill?**\n`git pull` in the clone; re-run `npm install && npm run build` if dependencies changed.\n\n## Contributing\n\n1. Fork and clone the repository\n2. Create a feature branch\n3. Run `npm run validate` before opening a PR\n4. Follow existing TypeScript conventions (strict mode, ESM imports with `.js` extensions)\n\nSee [SKILL.md](.\u002FSKILL.md) for production editing rules and [docs\u002FAUDIT.md](.\u002Fdocs\u002FAUDIT.md) for architecture notes.\n\n## License\n\nMIT — see [LICENSE](.\u002FLICENSE).\n","video-use 是一个面向 AI 代理的对话式视频剪辑工具，通过结构化文本交互实现自动化视频编辑。它基于 ElevenLabs Scribe 提供词级转录与说话人区分，支持静音感知的短语打包、EDL（编辑决策列表）驱动的智能剪辑策略生成、ffmpeg 渲染（含音频淡入淡出、HDR 调色、字幕烧录、图层合成），并提供波形+胶片条复合预览及剪辑点自评估。项目采用严格 TypeScript 编写，支持 Redis 缓存跨会话转录，适用于 LLM 驱动的自动化视频生产流程，如播客精剪、课程片段生成、AI 内容创作流水线等轻量级专业场景。",2,"2026-07-08 04:29:55","CREATED_QUERY"]