How browser-use/video-use works
1. What this repo is
- video-use is not a conventional app; it is an agent-oriented video editing skill. The primary “runtime” is a Claude Code–style agent with shell access that reads the repo docs, runs helper scripts, and iterates on edits.
2. Core control plane
- The human gives a folder of raw footage and a goal.
- The agent follows SKILL.md and install.md, inventories the sources, proposes an edit strategy, then drives the rest of the pipeline.
- The repo is designed so outputs stay in <videos_dir>/edit/, while the skill repo itself remains clean.
3. Input/output contract
- Inputs: raw video/audio takes in a working folder, plus configuration via .env and the agent session.
- Outputs: edited media artifacts, especially final.mp4, plus intermediate transcripts, packed notes, render previews, and session memory like project.md.
4. Transcription subsystem
- helpers/transcribe.py and helpers/transcribe_batch.py form the ingestion layer for source media.
- The README indicates these rely on ElevenLabs Scribe to produce word-level timestamps, speaker diarization, and audio events like laughter or applause.
- This is the foundation for all cut decisions: the LLM reasons over text, not raw frames.
5. Transcript packing layer
- helpers/pack_transcripts.py compresses the per-take transcript output into a compact markdown view such as takes_packed.md.
- This packed transcript is the agent’s main reading surface and is intentionally small enough to support precise editing decisions without frame-by-frame inspection.
6. On-demand visual inspection
- helpers/timeline_view.py generates a composite visual for selected time ranges: filmstrip, waveform, speaker/word labels, and cut candidates.
- This is used only at decision points or sanity checks, so visual data acts as a targeted supplement to transcript reasoning rather than the primary representation.
7. Render and finishing pipeline
- helpers/render.py is the execution boundary that turns the chosen edit decisions into actual media output.
- The README highlights the main finishing operations: filler-word removal, dead-space cuts, 30 ms audio fades, subtitle burn-in, color grading, and overlay insertion.
- helpers/grade.py suggests grading is treated as a separate concern, likely reusable across segments or styles.
8. Self-evaluation loop
- After rendering, the system re-inspects the output around each cut boundary using the same timeline-view approach.
- This creates a render → inspect → fix → re-render loop, capped to a small number of retries, so problems like pops, jumps, or hidden captions are caught before the user sees the final result.
9. Animation overlay subsystem
- The skills/manim-video subtree is a specialized sub-skill for generating animation overlays.
- Its references/ directory acts as a knowledge base for Manim-specific topics like scene planning, rendering, camera/3D, graphs, equations, and production quality.
- This is a parallel capability, not the core edit pipeline: overlays can be generated by separate sub-agents and then composed into the main edit.
10. Tooling and external dependencies
- The repo is Python-based (pyproject.toml) and expects ffmpeg for media processing.
- yt-dlp is optional for downloading online sources.
- .env.example indicates API-key based integration, with ElevenLabs explicitly required for transcription.
- The repo is built to be used under different agent hosts, but the architecture assumes an LLM that can read docs, invoke shell commands, and manage iterative media workflows.
11. Important architectural boundary
- The key design boundary is between LLM reasoning and media execution.
- The LLM does not “watch” the whole video; it reasons from packed transcripts and selective timeline composites, then delegates concrete media operations to helper scripts and ffmpeg-based tooling.
- That separation is what makes the system scalable across content types: talking heads, tutorials, travel, interviews, montages, and more.
Main entry points: render.py render · manim-video manim-video · transcribe.py transcribe · SKILL.md SKILL.md
Components 22
Repo Surface
User-facing docs and repo-wide entry points that define the skill workflow.
- SKILL.md · Primary operating instructions for the agent workflow.
SKILL.md - README.md · Explains the repository purpose and editing flow.
README.md - install.md · Environment and setup instructions for using the skill.
install.md
Edit Pipeline
Main agent-driven transcription, planning, rendering, and review loop.
- transcribe · Single-source transcription entry point with word-level timing.
helpers/transcribe.py - batch transcribe · Runs transcription across multiple source takes.
helpers/transcribe_batch.py - pack transcripts · Condenses per-take transcripts into a compact agent-readable summary.
helpers/pack_transcripts.py - timeline view · Builds filmstrip and waveform composites for targeted review windows.
helpers/timeline_view.py - render · Applies edit decisions and produces final media outputs.
helpers/render.py - grade · Handles color grading as a separate finishing concern.
helpers/grade.py - final.mp4 · Primary finished deliverable produced in the edit folder.
- project.md · Persistent project notes and working memory maintained by the agent.
- edit folder · Destination for outputs and intermediates under the videos directory.
Overlay Skill
Specialized Manim-based sub-skill for animation overlays and references.
- manim-video · Specialized skill for generating animation overlays.
skills/manim-video - manim SKILL · Operating instructions for the Manim overlay sub-skill.
skills/manim-video/SKILL.md - manim README · Overview of the overlay sub-skill and its usage.
skills/manim-video/README.md - reference notes · Topic-specific Manim guidance for planning, rendering, and production quality.
skills/manim-video/references - setup.sh · Shell setup for the Manim sub-skill environment.
skills/manim-video/scripts/setup.sh
Support
Project metadata, packaging, and install/dependency boundary.
- .env.example · Template for API keys and runtime configuration.
.env.example - pyproject.toml · Python project metadata and dependency definition.
pyproject.toml - ffmpeg · Core external tool used for media processing and rendering.
- ElevenLabs Scribe · External transcription service providing timestamps, diarization, and audio events.
- yt-dlp · Optional source acquisition tool for online media.
Connections 24
- SKILL.md → README.md: orients · The skill instructions are explained by the repository README.
- SKILL.md → install.md: depends on · Setup guidance is required before the workflow can run.
- SKILL.md → transcribe: drives · The agent uses transcription as the first operational step.
- README.md → transcribe: describes · Documentation frames transcription as the foundation for edit decisions.
- install.md → .env.example: configures · Installation expects environment variables and API credentials.
- pyproject.toml → ffmpeg: packages around · Python tooling wraps media work that ultimately relies on ffmpeg.
- .env.example → ElevenLabs Scribe: authenticates · The env template exposes API-key integration for transcription.
- batch transcribe → transcribe: coordinates · Batch transcription orchestrates repeated single-take ingestion.
- transcribe → ElevenLabs Scribe: calls · Transcription is backed by ElevenLabs Scribe.
- transcribe → pack transcripts: feeds · Raw transcript output is compressed into a compact reading surface.
- pack transcripts → timeline view: supplements · Packed text is complemented by targeted visual inspection windows.
- timeline view → render: validates · Timeline inspection is used before and after rendering decisions.
- render → grade: invokes · Finishing may route through a separate grading step.
- render → final.mp4: produces · Rendering writes the finished video deliverable.
- render → edit folder: writes to · Outputs are kept inside the edit working folder.
- edit folder → project.md: stores · The workflow preserves session memory alongside media artifacts.
- timeline view → edit folder: reads from · Inspection composites are built from working edit assets.
- manim-video → manim SKILL: specified by · The sub-skill is governed by its own instructions.
- manim-video → manim README: explained by · The sub-skill has dedicated usage documentation.
- manim-video → reference notes: relies on · Overlay generation is supported by curated reference material.
- manim-video → setup.sh: bootstraps · Setup script prepares the Manim environment.
- manim-video → render: composes with · Overlay artifacts are intended to be inserted into the main edit render.
- yt-dlp → batch transcribe: optionally supplies · Online sources can be fetched before batch transcription.
- render → ffmpeg: executes via · Media assembly and finishing are performed through ffmpeg-based tooling.