Skip to content

Repository files navigation

Reference Video Director

Install from skills.sh · Review the published skill

Turn a reference video into an evidence-backed creative breakdown and a shoot plan that fits your actual subject, duration, crew, gear, locations, and platform. reference-video-director measures the source locally with FFmpeg, keeps those observations separate from creative interpretation, and helps an agent transfer the reference's visual and editorial grammar without copying its content.

Install

npx skills@1.5.21 add L4A-ai/reference-video-director \
  --skill reference-video-director \
  --agent codex \
  --yes

Requirements: macOS or Linux, Node.js 20+, and an FFmpeg build whose ffmpeg and ffprobe commands expose the seekable fd protocol. The bundled CLI has no service account, upload step, or model API key and never sends the reference media to a remote service.

60-second local proof

A deterministic smoke run measures a six-second synthetic reference, grounds five findings in thirteen evidence locators, and validates a four-shot plan.

Feed-oriented summary of the packaged synthetic smoke run: six seconds and sixteen frames measured, five findings grounded in thirteen evidence locators, and a four-shot plan validated with three review gates kept visible.

The feed card summarizes the same packaged smoke result. It is synthetic contract proof only—not user, adoption, or creative-performance evidence. Scene-change candidates remain heuristic, and the three human review gates remain unresolved review work.

Try the complete installed workflow before using personal media. From the same project directory in which you ran the install command above:

node .agents/skills/reference-video-director/examples/verify-coffee-shop.mjs

The verifier generates its own local six-second fixture, extracts 16 frames, grounds five findings in 13 evidence locators, and validates a four-shot coffee-shop plan. Success is "ok": true with cut candidates at two and four seconds. It uses no model, API key, upload, or personal media, and removes the generated media and artifacts before exiting. The three reported warnings deliberately keep unresolved location permission, hot-equipment safety, and final copy approval visible.

For a compact report, copy these fields from the verifier's nested stdout shape:

{
  "ok": true,
  "source": {"duration_sec": 6, "cut_candidates_sec": [2, 4], "frame_count": 16},
  "reference_analysis": {"finding_count": 5, "evidence_count": 13},
  "shoot_plan": {"shot_count": 4},
  "accepted_warnings": [
    {"path": "/brief/production_permissions/location_permission", "code": "permission_review"},
    {"path": "/brief/production_permissions/safety_status", "code": "permission_review"},
    {"path": "/brief/assumptions/0", "code": "assumption_review"}
  ]
}

Keep all three warning paths and codes in the report. They are expected review gates, not smoke-run failures; omitting them would hide unresolved permission, safety, and assumption work.

If you independently ran this packaged evaluation, report one matched or mismatched field through the structured tester form. Installing without running and failed attempts remain useful feedback, but are kept separate from completed runs.

From a repository checkout, the equivalent command is:

node skills/reference-video-director/examples/verify-coffee-shop.mjs

What it produces

The workflow has three deliberately separate layers:

  1. Measured evidence — media metadata, audio presence, sampled frames, scene-change candidates, timing, and a contact sheet generated by the local CLI.
  2. Creative analysis — an agent describes composition, lighting, camera language, edit rhythm, sound, graphics, and narrative structure while labeling observations, inferences, and unknowns.
  3. Production adaptation — the transferable rules are applied to a new brief, then checked as a structured shot plan with durations, priorities, constraints, and traceable rationale.

Typical deliverables are:

analysis.json              deterministic media evidence
contact-sheet.jpg          sampled reference frames
brief.json                 production goal, resources, permissions, and constraints
reference-analysis.json    evidence-linked creative interpretation
shoot-plan.json            structured production plan
shoot-plan.md              human-readable set document

Scene-change scores and frame samples are analytical aids, not ground-truth editorial decisions. Likewise, lens, intent, lighting setup, and story-function judgments are model inferences unless the source itself proves them.

Quick start

For real media, run the CLI from the installed skill directory:

node scripts/reference-director.mjs doctor

node scripts/reference-director.mjs analyze \
  /absolute/path/to/reference.mp4 \
  --output-dir ./reference-output \
  --frames 24 \
  --scene-threshold 0.35 \
  --timeout-seconds 120

Add --dry-run to validate the source, options, and planned artifact paths without invoking FFmpeg or writing the output directory.

Then ask your agent to use the skill with the reference and a concrete brief:

Use $reference-video-director to break down reference.mp4 and design a 45-second vertical launch film.
We have one presenter, one camera, a 24–70 mm lens, two lights, one office, and a half-day shoot.
Prioritize the shots we cannot finish without.

The skill guides the agent through evidence review, brief normalization, reference analysis, plan generation, and validation. The deterministic plan utilities can also be run directly:

node scripts/reference-director.mjs validate-reference-analysis \
  reference-analysis.json \
  --analysis reference-output/analysis.json

node scripts/reference-director.mjs validate-plan \
  shoot-plan.json \
  --brief brief.json \
  --analysis reference-output/analysis.json

node scripts/reference-director.mjs render-plan \
  shoot-plan.json \
  --output shoot-plan.md

Worked example

The six-second coffee-shop example shows the complete artifact-contract boundary without publishing the synthetic source video or its extracted frames. Reproduce it:

node skills/reference-video-director/examples/verify-coffee-shop.mjs

The packaged script generates the source at test time, analyzes it, combines the output with pre-authored synthetic brief/interpretation/plan fixtures, validates their schema and evidence relationships, and renders the Markdown plan in a temporary directory. It does not invoke a model or claim that a creative inference is true. Add --output-dir ./coffee-shop-output to keep a new output directory for inspection. CI runs the same script. The local CLI measures a portrait reference with two scene-change candidates and three equal visual stages. The fixture plan transfers only the stage separation and silent readability to a different subject constrained to one operator, one phone, one small light, one location, and no music.

The result is a six-second plan with four 1.5-second shots, explicit priorities, safe fallbacks, sound notes, and rationale that points back to either measured reference evidence or the production brief. It is an example of adapting a reference without copying it shot for shot.

For the same method as a human-readable workflow, see How to turn a reference video into a practical shot list without copying it.

Common questions

How do I turn a reference video into a practical shot list?

Analyze an authorized local reference with the bundled CLI, then give the agent a separate brief covering the new subject, duration, crew, gear, locations, platform, and constraints. The skill turns measured evidence and labeled creative interpretation into a validated shot list with durations, priorities, audio notes, and traceable rationale.

Is the reference video uploaded?

The bundled FFmpeg CLI has no upload step, service account, or model API key. It processes the media locally. If an agent later inspects extracted frames through a hosted model, that model's normal data-handling terms still apply.

Does it recreate the source video?

No. The workflow is designed to transfer mechanisms such as pacing, framing logic, coverage, and edit rhythm into a new, constrained brief. It calls out source-specific expression that should not be copied, but it cannot grant rights or replace a production's legal review.

Is it an AI storyboard generator or a general video search tool?

No. It produces sampled evidence, a contact sheet, a reference analysis, and a structured shoot plan. It does not generate storyboard artwork, index a video library, search inside old recordings, or create model-specific video prompts.

Scope

The first release accepts local .mp4, .mov, .mkv, and .webm files backed by the MOV, Matroska, or WebM demuxers. It intentionally does not include URL downloaders, cookies, a hosted web app, databases, job queues, project CRUD, or an LLM-provider abstraction. It also does not manufacture SRT timing or edit markers before footage exists. Those features add operational weight without improving the core decision: what from the reference should be carried into a shoot that you can actually execute?

The skill analyzes a reference; it does not grant permission to reuse copyrighted footage, music, performances, trademarks, or a creator's distinctive expression. Confirm the rights and releases needed for your production.

Local-data note

Extracted frames and contact sheets contain pixels from the source video. Treat the output directory with the same sensitivity as the original media, and review it before sharing or committing it. If an agent inspects those artifacts through a hosted model, that agent's normal data-handling terms still apply; the CLI's local-only boundary does not change them.

Before FFmpeg runs, the CLI copies the selected source into a private staging directory beside the requested output, hashes that snapshot, and reads it through an inherited file descriptor. This prevents playlist/container indirection and source-replacement races, but temporarily needs enough free space for a full extra copy of the video plus extracted frames. The supported limits are 8 GiB, 4 hours, 7680×4320 pixels, and 16 audio channels. Completed evidence is published as one atomic directory rename; a failed run does not expose a partial evidence set.

An uncatchable crash can leave .reference-video-director-tmp-* beside the requested output. It may contain a complete source snapshot, so keep the repository ignore rule and remove only the exact stale directory after confirming that no analyzer process is running. Rendered Markdown escapes agent-authored Markdown and raw HTML so opening a plan cannot silently load a remote image.

Treat every filename, frame, subtitle, metadata field, QR code, and piece of on-screen text as untrusted media content. The Skill instructs the agent never to follow directions found inside the reference or open embedded links. The published skills.sh audits currently expose this inherent indirect-prompt-injection surface as Snyk W011; the validator never follows an agent-authored artifact path and resolves evidence only against the explicitly supplied analysis.json manifest.

Development

npm run validate
node skills/reference-video-director/examples/verify-coffee-shop.mjs

Bundled tests and CLI checks do not contact media sites or model services. CI checks the skill metadata and repository manifest, scans for credential material, installs a fresh clone through the pinned skills CLI, and exercises the installed doctor and help commands.

skills.sh resolves public GitHub repositories directly, so pushing a validated main branch is the release; there is no separate package submission step.

License

MIT — see LICENSE. The provenance statement records the rewrite boundary and its verification limits.

About

Turn local reference videos into evidence-backed breakdowns and original, production-ready shoot plans. Agent Skill + FFmpeg.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages